Differences From Artifact [47fabdf7bb]:
- File src/zip.c — part of check-in [2f50d427a9] at 2015-02-14 12:24:12 on branch login-enhancements — When the user is "nobody", make the g.anon permission vector for "anonymous" available in addition to g.perm. Hyperlinks to pages that would be available to anonymous are shown rather than suppressed. When permission is denied and control jumps to login_needed() a new flag shows whether or not logging in as "anonymous" would help. Work in progress. (user: drh size: 13069)
To Artifact [4493de5cc2]:
- File src/zip.c — part of check-in [bcebe55e91] at 2015-02-14 14:55:41 on branch login-enhancements — Added the referred_from_login() function and use it to enhance the /zip and /tarball pages so that they show a download button to click if the referrer page was /login. (user: drh size: 13409) [more...]
| ︙ | |||
470 471 472 473 474 475 476 477 478 479 480 481 482 483 | 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 | + + + + + + + + + + + |
}
}
}
rid = name_to_typed_rid(nRid?zRid:zName,"ci");
if( rid==0 ){
@ Not found
return;
}
if( referred_from_login() ){
style_header("ZIP Archive Download");
@ <form action='%R/zip'>
cgi_query_parameters_to_hidden();
@ <p>ZIP Archive named <b>%h(zName).zip</b> holding the content
@ of check-in <b>%h(zRid)</b>:
@ <input type="submit" value="Download" />
@ </form>
style_footer();
return;
}
if( nRid==0 && nName>10 ) zName[10] = 0;
zKey = db_text(0, "SELECT '/zip/'||uuid||'/%q' FROM blob WHERE rid=%d",zName,rid);
blob_zero(&zip);
if( cache_read(&zip, zKey)==0 ){
zip_of_baseline(rid, &zip, zName);
cache_write(&zip, zKey);
|
| ︙ |