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].

stephan 2021-08-18 18:18 trunk
Commit 6e442303146cbcc2cf85b3a0f147f706589b31f2eaf01bed238a2b2ddb1006c1
1 file changed +5 -1
+5 -1
--- src/wiki.c
+++ src/wiki.c
@@ -612,11 +612,15 @@
612612
wiki_render_by_mimetype(&wiki, zMimetype);
613613
blob_reset(&wiki);
614614
}
615615
manifest_destroy(pWiki);
616616
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);
618622
document_emit_js(/*for optional pikchr support*/);
619623
style_finish_page();
620624
}
621625
}
622626
623627
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button