Fossil SCM
Fix a bug in wiki editing. Make the /info header for associated wiki be "Edit Wiki:".
Commit
c40863abdb3a5818e98909bfb24dcab72bb2ae3dd04adfdf1dbf029dde9ecc8f
Parent
ae1dac83d6bc4a3…
2 files changed
+6
-4
+5
-1
+6
-4
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -784,21 +784,23 @@ | ||
| 784 | 784 | @ (<a href="%R/rcvfrom?rcvid=%d(rcvid)">Rcvid %d(rcvid)</a>)</td></tr> |
| 785 | 785 | } |
| 786 | 786 | db_finalize(&q2); |
| 787 | 787 | } |
| 788 | 788 | |
| 789 | - /* Only show links to read wiki pages if the users can read wiki | |
| 789 | + /* Only show links to edit wiki pages if the users can read wiki | |
| 790 | 790 | ** and if the wiki pages already exist */ |
| 791 | - if( g.perm.RdWiki | |
| 791 | + if( g.perm.WrWiki | |
| 792 | + && g.perm.RdWiki | |
| 793 | + && g.perm.Write | |
| 792 | 794 | && ((okWiki = wiki_tagid2("checkin",zUuid))!=0 || |
| 793 | 795 | blob_size(&wiki_read_links)>0) |
| 794 | 796 | && db_get_boolean("wiki-about",1) |
| 795 | 797 | ){ |
| 796 | 798 | const char *zLinks = blob_str(&wiki_read_links); |
| 797 | - @ <tr><th>Wiki:</th><td>\ | |
| 799 | + @ <tr><th>Edit Wiki:</th><td>\ | |
| 798 | 800 | if( okWiki ){ |
| 799 | - @ %z(href("%R/wiki?name=checkin/%s",zUuid))this checkin</a>\ | |
| 801 | + @ %z(href("%R/wikiedit?name=checkin/%s",zUuid))this checkin</a>\ | |
| 800 | 802 | }else if( zLinks[0] ){ |
| 801 | 803 | zLinks += 3; |
| 802 | 804 | } |
| 803 | 805 | @ %s(zLinks)</td></tr> |
| 804 | 806 | } |
| 805 | 807 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -784,21 +784,23 @@ | |
| 784 | @ (<a href="%R/rcvfrom?rcvid=%d(rcvid)">Rcvid %d(rcvid)</a>)</td></tr> |
| 785 | } |
| 786 | db_finalize(&q2); |
| 787 | } |
| 788 | |
| 789 | /* Only show links to read wiki pages if the users can read wiki |
| 790 | ** and if the wiki pages already exist */ |
| 791 | if( g.perm.RdWiki |
| 792 | && ((okWiki = wiki_tagid2("checkin",zUuid))!=0 || |
| 793 | blob_size(&wiki_read_links)>0) |
| 794 | && db_get_boolean("wiki-about",1) |
| 795 | ){ |
| 796 | const char *zLinks = blob_str(&wiki_read_links); |
| 797 | @ <tr><th>Wiki:</th><td>\ |
| 798 | if( okWiki ){ |
| 799 | @ %z(href("%R/wiki?name=checkin/%s",zUuid))this checkin</a>\ |
| 800 | }else if( zLinks[0] ){ |
| 801 | zLinks += 3; |
| 802 | } |
| 803 | @ %s(zLinks)</td></tr> |
| 804 | } |
| 805 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -784,21 +784,23 @@ | |
| 784 | @ (<a href="%R/rcvfrom?rcvid=%d(rcvid)">Rcvid %d(rcvid)</a>)</td></tr> |
| 785 | } |
| 786 | db_finalize(&q2); |
| 787 | } |
| 788 | |
| 789 | /* Only show links to edit wiki pages if the users can read wiki |
| 790 | ** and if the wiki pages already exist */ |
| 791 | if( g.perm.WrWiki |
| 792 | && g.perm.RdWiki |
| 793 | && g.perm.Write |
| 794 | && ((okWiki = wiki_tagid2("checkin",zUuid))!=0 || |
| 795 | blob_size(&wiki_read_links)>0) |
| 796 | && db_get_boolean("wiki-about",1) |
| 797 | ){ |
| 798 | const char *zLinks = blob_str(&wiki_read_links); |
| 799 | @ <tr><th>Edit Wiki:</th><td>\ |
| 800 | if( okWiki ){ |
| 801 | @ %z(href("%R/wikiedit?name=checkin/%s",zUuid))this checkin</a>\ |
| 802 | }else if( zLinks[0] ){ |
| 803 | zLinks += 3; |
| 804 | } |
| 805 | @ %s(zLinks)</td></tr> |
| 806 | } |
| 807 |
+5
-1
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -2292,11 +2292,15 @@ | ||
| 2292 | 2292 | zComment = mprintf("%s wiki page [%h]", zPrefix, p->zWikiTitle); |
| 2293 | 2293 | break; |
| 2294 | 2294 | } |
| 2295 | 2295 | } |
| 2296 | 2296 | search_doc_touch('w',rid,p->zWikiTitle); |
| 2297 | - add_pending_crosslink('w',p->zWikiTitle); | |
| 2297 | + if( manifest_crosslink_busy ){ | |
| 2298 | + add_pending_crosslink('w',p->zWikiTitle); | |
| 2299 | + }else{ | |
| 2300 | + backlink_wiki_refresh(p->zWikiTitle); | |
| 2301 | + } | |
| 2298 | 2302 | db_multi_exec( |
| 2299 | 2303 | "REPLACE INTO event(type,mtime,objid,user,comment," |
| 2300 | 2304 | " bgcolor,euser,ecomment)" |
| 2301 | 2305 | "VALUES('w',%.17g,%d,%Q,%Q," |
| 2302 | 2306 | " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype>1)," |
| 2303 | 2307 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -2292,11 +2292,15 @@ | |
| 2292 | zComment = mprintf("%s wiki page [%h]", zPrefix, p->zWikiTitle); |
| 2293 | break; |
| 2294 | } |
| 2295 | } |
| 2296 | search_doc_touch('w',rid,p->zWikiTitle); |
| 2297 | add_pending_crosslink('w',p->zWikiTitle); |
| 2298 | db_multi_exec( |
| 2299 | "REPLACE INTO event(type,mtime,objid,user,comment," |
| 2300 | " bgcolor,euser,ecomment)" |
| 2301 | "VALUES('w',%.17g,%d,%Q,%Q," |
| 2302 | " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype>1)," |
| 2303 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -2292,11 +2292,15 @@ | |
| 2292 | zComment = mprintf("%s wiki page [%h]", zPrefix, p->zWikiTitle); |
| 2293 | break; |
| 2294 | } |
| 2295 | } |
| 2296 | search_doc_touch('w',rid,p->zWikiTitle); |
| 2297 | if( manifest_crosslink_busy ){ |
| 2298 | add_pending_crosslink('w',p->zWikiTitle); |
| 2299 | }else{ |
| 2300 | backlink_wiki_refresh(p->zWikiTitle); |
| 2301 | } |
| 2302 | db_multi_exec( |
| 2303 | "REPLACE INTO event(type,mtime,objid,user,comment," |
| 2304 | " bgcolor,euser,ecomment)" |
| 2305 | "VALUES('w',%.17g,%d,%Q,%Q," |
| 2306 | " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype>1)," |
| 2307 |