Fossil SCM
In the attachment list of /wiki, link the word Attachments to the /attachlist page as a workaround for downloading the attachments using their expected names (rather than change the historical behaviour of the in-page links, which download using artifact IDs). Discussed in [forum:6566f665a3685c4f | forum post 6566f665a3685c4f].
Commit
6e442303146cbcc2cf85b3a0f147f706589b31f2eaf01bed238a2b2ddb1006c1
Parent
5bb4f12a8fedd4f…
1 file changed
+5
-1
+5
-1
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -612,11 +612,15 @@ | ||
| 612 | 612 | wiki_render_by_mimetype(&wiki, zMimetype); |
| 613 | 613 | blob_reset(&wiki); |
| 614 | 614 | } |
| 615 | 615 | manifest_destroy(pWiki); |
| 616 | 616 | if( !isPopup ){ |
| 617 | - attachment_list(zPageName, "<hr /><h2>Attachments:</h2><ul>"); | |
| 617 | + char * zLabel = mprintf("<hr /><h2><a href='%R/attachlist?name=%T'>" | |
| 618 | + "Attachments</a>:</h2><ul>", | |
| 619 | + zPageName); | |
| 620 | + attachment_list(zPageName, zLabel); | |
| 621 | + fossil_free(zLabel); | |
| 618 | 622 | document_emit_js(/*for optional pikchr support*/); |
| 619 | 623 | style_finish_page(); |
| 620 | 624 | } |
| 621 | 625 | } |
| 622 | 626 | |
| 623 | 627 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -612,11 +612,15 @@ | |
| 612 | wiki_render_by_mimetype(&wiki, zMimetype); |
| 613 | blob_reset(&wiki); |
| 614 | } |
| 615 | manifest_destroy(pWiki); |
| 616 | if( !isPopup ){ |
| 617 | attachment_list(zPageName, "<hr /><h2>Attachments:</h2><ul>"); |
| 618 | document_emit_js(/*for optional pikchr support*/); |
| 619 | style_finish_page(); |
| 620 | } |
| 621 | } |
| 622 | |
| 623 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -612,11 +612,15 @@ | |
| 612 | wiki_render_by_mimetype(&wiki, zMimetype); |
| 613 | blob_reset(&wiki); |
| 614 | } |
| 615 | manifest_destroy(pWiki); |
| 616 | if( !isPopup ){ |
| 617 | char * zLabel = mprintf("<hr /><h2><a href='%R/attachlist?name=%T'>" |
| 618 | "Attachments</a>:</h2><ul>", |
| 619 | zPageName); |
| 620 | attachment_list(zPageName, zLabel); |
| 621 | fossil_free(zLabel); |
| 622 | document_emit_js(/*for optional pikchr support*/); |
| 623 | style_finish_page(); |
| 624 | } |
| 625 | } |
| 626 | |
| 627 |