Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Fix the URL on some Download submenu links. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
9d18585d544b41f27dcce9b5e531fe58 |
| User & Date: | drh 2020-05-21 13:00:10.607 |
Context
|
2020-05-21
| ||
| 23:56 | Add a Content-Disposition: header to the HTTP reply for the "Download" button. ... (check-in: 34cb4766f1 user: drh tags: trunk) | |
| 17:12 | This does not work. Was: Alternative way of fixing Download links that provides web-browsers with a suggested filename for saving the file. ... (Closed-Leaf check-in: 232033c98b user: drh tags: mistake) | |
| 13:00 | Fix the URL on some Download submenu links. ... (check-in: 9d18585d54 user: drh tags: trunk) | |
|
2020-05-19
| ||
| 16:51 | Update the built-in SQLite to the third beta for 3.32.0. ... (check-in: a8098efebf user: drh tags: trunk) | |
Changes
Changes to src/info.c.
| ︙ | ︙ | |||
1927 1928 1929 1930 1931 1932 1933 |
@ (%d(rid)):</h2>
}else{
@ :</h2>
}
blob_zero(&downloadName);
if( P("verbose")!=0 ) objdescFlags |= OBJDESC_DETAIL;
object_description(rid, objdescFlags, 0, &downloadName);
| | < | 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 |
@ (%d(rid)):</h2>
}else{
@ :</h2>
}
blob_zero(&downloadName);
if( P("verbose")!=0 ) objdescFlags |= OBJDESC_DETAIL;
object_description(rid, objdescFlags, 0, &downloadName);
style_submenu_element("Download", "%R/raw/%s", zUuid);
@ <hr />
content_get(rid, &content);
@ <blockquote><pre>
hexdump(&content);
@ </pre></blockquote>
style_footer();
}
|
| ︙ | ︙ | |||
2257 2258 2259 2260 2261 2262 2263 |
}
blob_zero(&downloadName);
if( asText ) objdescFlags &= ~OBJDESC_BASE;
objType = object_description(rid, objdescFlags,
(isFile?zName:0), &downloadName);
}
if( !descOnly && P("download")!=0 ){
| | | 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 |
}
blob_zero(&downloadName);
if( asText ) objdescFlags &= ~OBJDESC_BASE;
objType = object_description(rid, objdescFlags,
(isFile?zName:0), &downloadName);
}
if( !descOnly && P("download")!=0 ){
cgi_redirectf("%R/raw/%s",
db_text("?", "SELECT uuid FROM blob WHERE rid=%d", rid));
/*NOTREACHED*/
}
if( g.perm.Admin ){
const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){
style_submenu_element("Unshun", "%s/shun?accept=%s&sub=1#accshun",
|
| ︙ | ︙ | |||
2303 2304 2305 2306 2307 2308 2309 |
const char *zUser = db_column_text(&q,0);
const char *zDate = db_column_text(&q,1);
const char *zIp = db_column_text(&q,2);
@ <p>Received on %s(zDate) from %h(zUser) at %h(zIp).</p>
}
db_finalize(&q);
}
| | < | 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 |
const char *zUser = db_column_text(&q,0);
const char *zDate = db_column_text(&q,1);
const char *zIp = db_column_text(&q,2);
@ <p>Received on %s(zDate) from %h(zUser) at %h(zIp).</p>
}
db_finalize(&q);
}
style_submenu_element("Download", "%R/raw/%s", zUuid);
if( db_exists("SELECT 1 FROM mlink WHERE fid=%d", rid) ){
style_submenu_element("Check-ins Using", "%R/timeline?n=200&uf=%s", zUuid);
}
zMime = mimetype_from_name(blob_str(&downloadName));
if( zMime ){
if( fossil_strcmp(zMime, "text/html")==0 ){
if( asText ){
|
| ︙ | ︙ | |||
2338 2339 2340 2341 2342 2343 2344 |
style_submenu_element("Content", "%R/artifact/%s", zUuid);
}else{
@ <hr />
content_get(rid, &content);
if( renderAsWiki ){
wiki_render_by_mimetype(&content, zMime);
}else if( renderAsHtml ){
| | | 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 |
style_submenu_element("Content", "%R/artifact/%s", zUuid);
}else{
@ <hr />
content_get(rid, &content);
if( renderAsWiki ){
wiki_render_by_mimetype(&content, zMime);
}else if( renderAsHtml ){
@ <iframe src="%R/raw/%s(zUuid)"
@ width="100%%" frameborder="0" marginwidth="0" marginheight="0"
@ sandbox="allow-same-origin" id="ifm1">
@ </iframe>
@ <script nonce="%h(style_nonce())">
@ document.getElementById("ifm1").addEventListener("load",
@ function(){
@ this.height=this.contentDocument.documentElement.scrollHeight + 75;
|
| ︙ | ︙ |