Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch login-enhancements Excluding Merge-Ins
This is equivalent to a diff from c62e94f8a3 to bcebe55e91
|
2015-03-09
| ||
| 04:42 | Always report full UUID for checkin and branch commands since they actually alter the repository and should report a complete, unambiguous UUID. ... (check-in: 153e17c5eb user: andybradford tags: trunk) | |
|
2015-02-14
| ||
| 15:06 | Improvements to login/logout processing: (1) When the user is "nobody", show hyperlinks to pages that require "anonymous" but have those links redirect to the /login page. (2) Clean up the /login page - less verbage. (3) Redirects from /login to /tarball or /zip provide a button to press, rather than immediately starting the download. ... (check-in: 653dd402ea user: drh tags: trunk) | |
| 14:55 | 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. ... (Closed-Leaf check-in: bcebe55e91 user: drh tags: login-enhancements) | |
| 14:05 | Change default headers to show menu-bar items that would be available to user "anonymous" even if the current user is not logged in. ... (check-in: 72cddddbcc user: drh tags: login-enhancements) | |
| 12:24 | 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. ... (check-in: 2f50d427a9 user: drh tags: login-enhancements) | |
|
2015-02-13
| ||
| 21:21 | Merge enhancements and fixes from trunk. ... (check-in: 23c86b503f user: drh tags: search-enhancements) | |
| 09:03 | A few more places where displayed UUID length should be configurable. ... (check-in: c62e94f8a3 user: jan.nijtmans tags: trunk) | |
| 09:00 | Take over latest shell.c, but without SQLITE_TESTCTRL_IMPOSTER support (included SQLite doesn't have that yet). Reason: add '.dbinfo' command to "fossil sqlite" [http://www.sqlite.org/src/info/0f65a7e2e09f801b|0f65a7e2e0] and fix bug in '.import' [http://www.sqlite.org/src/info/9c5bcad1f7d04c16|9c5bcad1] ... (check-in: d96488860f user: jan.nijtmans tags: trunk) | |
Changes to skins/black_and_white/header.txt.
| ︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - + - + - + - + |
</div>
<div class="mainmenu">
<th1>
html "<a href='$home$index_page'>Home</a>\n"
if {[anycap jor]} {
html "<a href='$home/timeline'>Timeline</a>\n"
}
|
| ︙ |
Changes to skins/default/header.txt.
| ︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - + - + - + - + |
</div>
<div class="mainmenu">
<th1>
html "<a href='$home$index_page'>Home</a>\n"
if {[anycap jor]} {
html "<a href='$home/timeline'>Timeline</a>\n"
}
|
| ︙ |
Changes to skins/eagle/header.txt.
| ︙ | |||
104 105 106 107 108 109 110 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | - + - + - + - + |
<div class="mainmenu">
<th1>
html "<a href='$home$index_page'>Home</a>\n"
html "<a href='$home/help'>Help</a>\n"
if {[anycap jor]} {
html "<a href='$home/timeline'>Timeline</a>\n"
}
|
| ︙ |
Changes to skins/enhanced1/header.txt.
| ︙ | |||
104 105 106 107 108 109 110 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | - + - + - + - + |
<div class="mainmenu">
<th1>
html "<a href='$home$index_page'>Home</a>\n"
html "<a href='$home/help'>Help</a>\n"
if {[anycap jor]} {
html "<a href='$home/timeline'>Timeline</a>\n"
}
|
| ︙ |
Changes to skins/etienne1/header.txt.
| ︙ | |||
63 64 65 66 67 68 69 | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | - + - + - + - + |
}
menulink "home" $index_page Home
if {[anycap jor]} {
menulink "timeline" "/timeline" Timeline
}
|
| ︙ |
Changes to skins/khaki/header.txt.
| ︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | - + - + - + - + |
</div>
<div class="mainmenu">
<th1>
html "<a href='$home$index_page'>Home</a>\n"
if {[anycap jor]} {
html "<a href='$home/timeline'>Timeline</a>\n"
}
|
| ︙ |
Changes to skins/plain_gray/header.txt.
| ︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - + - + - + - + |
</div>
<div class="mainmenu">
<th1>
html "<a href='$home$index_page'>Home</a>\n"
if {[anycap jor]} {
html "<a href='$home/timeline'>Timeline</a>\n"
}
|
| ︙ |
Changes to skins/rounded1/header.txt.
| ︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - + - + - + - + |
</div>
<div class="mainmenu">
<th1>
html "<a href='$home$index_page'>Home</a>\n"
if {[anycap jor]} {
html "<a href='$home/timeline'>Timeline</a>\n"
}
|
| ︙ |
Changes to src/attach.c.
| ︙ | |||
46 47 48 49 50 51 52 | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - + - + - + + + + |
"SELECT datetime(mtime%s), src, target, filename,"
" comment, user,"
" (SELECT uuid FROM blob WHERE rid=attachid), attachid"
" FROM attachment",
timeline_utc()
);
if( zPage ){
|
| ︙ | |||
148 149 150 151 152 153 154 | 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | - + - + |
int attachid = atoi(PD("attachid","0"));
char *zUUID;
if( zPage && zTkt ) zTkt = 0;
if( zFile==0 ) fossil_redirect_home();
login_check_credentials();
if( zPage ){
|
| ︙ | |||
241 242 243 244 245 246 247 | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | - + + + + - + + + + |
int goodCaptcha = 1;
if( P("cancel") ) cgi_redirect(zFrom);
if( zPage && zTkt ) fossil_redirect_home();
if( zPage==0 && zTkt==0 ) fossil_redirect_home();
login_check_credentials();
if( zPage ){
|
| ︙ | |||
367 368 369 370 371 372 373 | 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 | - + + + + |
int isModerator; /* TRUE if user is the moderator */
const char *zMime; /* MIME Type */
Blob attach; /* Content of the attachment */
int fShowContent = 0;
const char *zLn = P("ln");
login_check_credentials();
|
| ︙ | |||
397 398 399 400 401 402 403 | 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | - + - + |
zDesc = pAttach->zComment;
zMime = mimetype_from_name(zName);
fShowContent = zMime ? strncmp(zMime,"text/", 5)==0 : 0;
if( validate16(zTarget, strlen(zTarget))
&& db_exists("SELECT 1 FROM ticket WHERE tkt_uuid='%q'", zTarget)
){
zTktUuid = zTarget;
|
| ︙ |
Changes to src/branch.c.
| ︙ | |||
337 338 339 340 341 342 343 | 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | - + |
** Control jumps to this routine from brlist_page() (the /brlist handler)
** if there are no query parameters.
*/
static void new_brlist_page(void){
Stmt q;
double rNow;
login_check_credentials();
|
| ︙ | |||
406 407 408 409 410 411 412 | 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | - + |
int brFlags = BRL_OPEN_ONLY;
if( showClosed==0 && showAll==0 && showOpen==0 && colorTest==0 ){
new_brlist_page();
return;
}
login_check_credentials();
|
| ︙ | |||
513 514 515 516 517 518 519 | 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | - + |
**
** Show a timeline of all branches
*/
void brtimeline_page(void){
Stmt q;
login_check_credentials();
|
| ︙ |
Changes to src/browse.c.
| ︙ | |||
128 129 130 131 132 133 134 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | - + |
const char *zSubdirLink;
int linkTrunk = 1;
int linkTip = 1;
HQuery sURI;
if( strcmp(PD("type","flat"),"tree")==0 ){ page_tree(); return; }
login_check_credentials();
|
| ︙ | |||
540 541 542 543 544 545 546 | 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 | - + |
int showDirOnly; /* Show directories only. Omit files */
int nDir = 0; /* Number of directories. Used for ID attributes */
char *zProjectName = db_get("project-name", 0);
if( strcmp(PD("type","flat"),"flat")==0 ){ page_dir(); return; }
memset(&sTree, 0, sizeof(sTree));
login_check_credentials();
|
| ︙ | |||
1000 1001 1002 1003 1004 1005 1006 | 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 | - + |
const char *zGlob;
const char *zUuid;
const char *zNow; /* Time of checkin */
int showId = PB("showid");
Stmt q1, q2;
double baseTime;
login_check_credentials();
|
| ︙ |
Changes to src/cache.c.
| ︙ | |||
328 329 330 331 332 333 334 | 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | - + |
*/
void cache_page(void){
sqlite3 *db;
sqlite3_stmt *pStmt;
char zBuf[100];
login_check_credentials();
|
| ︙ | |||
376 377 378 379 380 381 382 | 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | - + |
** This page is normally a hyperlink from the /cachestat page.
*/
void cache_getpage(void){
const char *zKey;
Blob content;
login_check_credentials();
|
Changes to src/descendants.c.
| ︙ | |||
437 438 439 440 441 442 443 | 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 | - + |
void leaves_page(void){
Blob sql;
Stmt q;
int showAll = P("all")!=0;
int showClosed = P("closed")!=0;
login_check_credentials();
|
| ︙ |
Changes to src/diff.c.
| ︙ | |||
2232 2233 2234 2235 2236 2237 2238 | 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 | - + |
struct AnnVers *p;
unsigned clr1, clr2, clr;
int bBlame = g.zPath[0]!='a';/* True for BLAME output. False for ANNOTATE. */
/* Gather query parameters */
showLog = atoi(PD("log","1"));
login_check_credentials();
|
| ︙ |
Changes to src/diffcmd.c.
| ︙ | |||
839 840 841 842 843 844 845 | 839 840 841 842 843 844 845 846 847 848 849 850 851 | - + |
** WEBPAGE: vpatch
** URL vpatch?from=UUID&to=UUID
*/
void vpatch_page(void){
const char *zFrom = P("from");
const char *zTo = P("to");
login_check_credentials();
|
Changes to src/doc.c.
| ︙ | |||
541 542 543 544 545 546 547 | 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 | - + |
Blob title; /* Document title */
int nMiss = (-1); /* Failed attempts to find the document */
static const char *const azSuffix[] = {
"index.html", "index.wiki", "index.md"
};
login_check_credentials();
|
| ︙ |
Changes to src/event.c.
| ︙ | |||
67 68 69 70 71 72 73 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | - + |
int verboseFlag; /* True to show details */
/* wiki-read privilege is needed in order to read events.
*/
login_check_credentials();
if( !g.perm.RdWiki ){
|
| ︙ | |||
231 232 233 234 235 236 237 | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | - + |
);
free(zTag);
/* Need both check-in and wiki-write or wiki-create privileges in order
** to edit/create an event.
*/
if( !g.perm.Write || (rid && !g.perm.WrWiki) || (!rid && !g.perm.NewWiki) ){
|
| ︙ |
Changes to src/finfo.c.
| ︙ | |||
303 304 305 306 307 308 309 | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | - + |
GraphContext *pGraph;
int brBg = P("brbg")!=0;
int uBg = P("ubg")!=0;
int fDebug = atoi(PD("debug","0"));
int fShowId = P("showid")!=0;
login_check_credentials();
|
| ︙ |
Changes to src/info.c.
| ︙ | |||
525 526 527 528 529 530 531 | 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 | - + | const char *zRe; /* regex parameter */ ReCompiled *pRe = 0; /* regex */ const char *zW; /* URL param for ignoring whitespace */ const char *zPage = "vinfo"; /* Page that shows diffs */ const char *zPageHide = "ci"; /* Page that hides diffs */ login_check_credentials(); |
| ︙ | |||
655 656 657 658 659 660 661 | 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 | - + - + |
const char *zTagName = db_column_text(&q2, 0);
@ | %z(href("%R/timeline?r=%T&unhide",zTagName))%h(zTagName)</a>
}
db_finalize(&q2);
/* The Download: line */
|
| ︙ | |||
771 772 773 774 775 776 777 | 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 | - + | char *zUuid; char *zDate; Blob wiki; int modPending; const char *zModAction; login_check_credentials(); |
| ︙ | |||
989 990 991 992 993 994 995 | 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 | - + | const char *zTo; const char *zRe; const char *zW; const char *zVerbose; const char *zGlob; ReCompiled *pRe = 0; login_check_credentials(); |
| ︙ | |||
1361 1362 1363 1364 1365 1366 1367 | 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 | - + - + |
if( cnt>0 ){
@ Also attachment "%h(zFilename)" to
}else{
@ Attachment "%h(zFilename)" to
}
objType |= OBJTYPE_ATTACHMENT;
if( strlen(zTarget)==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){
|
| ︙ | |||
1419 1420 1421 1422 1423 1424 1425 | 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 | - + | const char *zRe; const char *zW; /* URL param for ignoring whitespace */ ReCompiled *pRe = 0; u64 diffFlags; u32 objdescFlags = 0; login_check_credentials(); |
| ︙ | |||
1504 1505 1506 1507 1508 1509 1510 | 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 | - + |
int rid;
char *zUuid;
const char *zMime;
Blob content;
rid = name_to_rid_www("name");
login_check_credentials();
|
| ︙ | |||
1601 1602 1603 1604 1605 1606 1607 | 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 | - + |
Blob content;
Blob downloadName;
char *zUuid;
u32 objdescFlags = 0;
rid = name_to_rid_www("name");
login_check_credentials();
|
| ︙ | |||
1787 1788 1789 1790 1791 1792 1793 | 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 | - + |
rid = artifact_from_ci_and_filename_www();
}
if( rid==0 ){
rid = name_to_rid_www("name");
}
login_check_credentials();
|
| ︙ | |||
1902 1903 1904 1905 1906 1907 1908 | 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 | - + | const char *zUuid; char zTktName[UUID_SIZE+1]; Manifest *pTktChng; int modPending; const char *zModAction; char *zTktTitle; login_check_credentials(); |
| ︙ | |||
2274 2275 2276 2277 2278 2279 2280 | 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 | - + | const char *zChngTime = 0; /* Value of chngtime= query param, if any */ char *zUuid; Blob comment; char *zBranchName = 0; Stmt q; login_check_credentials(); |
| ︙ |
Changes to src/login.c.
| ︙ | |||
350 351 352 353 354 355 356 | 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 | - - + + - - - - |
/* To logout, change the cookie value to an empty string */
cgi_set_cookie(cookie, "",
login_cookie_path(), -86400);
db_multi_exec("UPDATE user SET cookie=NULL, ipaddr=NULL, "
" cexpire=0 WHERE uid=%d"
" AND login NOT IN ('anonymous','nobody',"
" 'developer','reader')", g.userUid);
|
| ︙ | |||
449 450 451 452 453 454 455 | 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 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 | - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + |
rc = rc | (buf1[i] ^ buf2[i]);
}
}
sqlite3_result_int(context, rc);
}
/*
|
| ︙ | |||
487 488 489 490 491 492 493 | 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 | - - + + + + + + + |
cgi_redirectf("%s%s%s", g.zHttpsURL, P("PATH_INFO"), zQS);
return;
}
sqlite3_create_function(g.db, "constant_time_cmp", 2, SQLITE_UTF8, 0,
constant_time_cmp_function, 0, 0);
zUsername = P("u");
zPasswd = P("p");
|
| ︙ | |||
575 576 577 578 579 580 581 | 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 | - - + + + + + + + + + + + + + + + + + + + + + + + - + |
login_set_user_cookie(zUsername, uid, NULL);
redirect_to_g();
}
}
style_header("Login/Logout");
style_adunit_config(ADUNIT_OFF);
@ %s(zErrMsg)
|
| ︙ | |||
622 623 624 625 626 627 628 | 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 | - - + - - - - - - - - |
char *zSSL = mprintf("https:%s", &g.zBaseURL[5]);
@ if( form.u.value!="anonymous" ){
@ form.action = "%h(zSSL)/login";
@ }
}
@ }
@ </script>
|
| ︙ | |||
655 656 657 658 659 660 661 | 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 | - - - - - - - - + - |
if( bAutoCaptcha ) {
@ <input type="button" value="Fill out captcha"
@ onclick="gebi('u').value='anonymous'; gebi('p').value='%s(zDecoded)';" />
}
@ </div>
free(zCaptcha);
}
|
| ︙ | |||
809 810 811 812 813 814 815 816 817 818 819 820 821 822 | 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 | + |
** This routine examines the login cookie to see if it exists and
** is valid. If the login cookie checks out, it then sets global
** variables appropriately.
**
** g.userUid Database USER.UID value. Might be -1 for "nobody"
** g.zLogin Database USER.LOGIN value. NULL for user "nobody"
** g.perm Permissions granted to this user
** g.anon Permissions that would be available to anonymous
** g.isHuman True if the user is human, not a spider or robot
**
*/
void login_check_credentials(void){
int uid = 0; /* User id */
const char *zCookie; /* Text of the login cookie */
const char *zIpAddr; /* Raw IP address of the requestor */
|
| ︙ | |||
1000 1001 1002 1003 1004 1005 1006 | 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 | - - + + + + + + - + - + + - + + + + - - + + + + - + + - - - - - - - + + + + + + + - - - + + + - - - - + + + + - - - - - + + + + + - - - - - - - - - - + + + + + + + + + + | /* ** Memory of settings */ static int login_anon_once = 1; /* |
| ︙ | |||
1108 1109 1110 1111 1112 1113 1114 | 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 | - + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + + - + | } /* ** If the current login lacks any of the capabilities listed in ** the input, then return 0. If all capabilities are present, then ** return 1. */ |
| ︙ | |||
1193 1194 1195 1196 1197 1198 1199 | 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 | - + + + + + + + - + + + + + + + - + - - - | return (g.zLogin && g.zLogin[0]) ? g.zLogin : "nobody"; } /* ** Call this routine when the credential check fails. It causes ** a redirect to the "login" page. */ |
| ︙ |
Changes to src/main.c.
| ︙ | |||
191 192 193 194 195 196 197 | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | - + + + + + + | int comFmtFlags; /* Zero or more "COMMENT_PRINT_*" bit flags */ /* Information used to populate the RCVFROM table */ int rcvid; /* The rcvid. 0 if not yet defined. */ char *zIpAddr; /* The remote IP address */ char *zNonce; /* The nonce used for login */ |
| ︙ |
Changes to src/moderate.c.
| ︙ | |||
142 143 144 145 146 147 148 | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | - + + + + |
** Show all pending moderation request
*/
void modreq_page(void){
Blob sql;
Stmt q;
login_check_credentials();
|
| ︙ |
Changes to src/name.c.
| ︙ | |||
985 986 987 988 989 990 991 | 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 | - + |
Stmt q;
int s = atoi(PD("s","0"));
int n = atoi(PD("n","5000"));
int mx = db_int(0, "SELECT max(rid) FROM blob");
char *zRange;
login_check_credentials();
|
| ︙ | |||
1081 1082 1083 1084 1085 1086 1087 | 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 | - + |
char zPrev[UUID_SIZE+1];
struct {
int cnt;
char *azHit[MAX_COLLIDE];
char z[UUID_SIZE+1];
} aCollide[UUID_SIZE+1];
login_check_credentials();
|
| ︙ |
Changes to src/path.c.
| ︙ | |||
541 542 543 544 545 546 547 | 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 | - + |
** This page is intended for for testing purposes only and may change
** or be discontinued without notice.
*/
void test_rename_list_page(void){
Stmt q;
login_check_credentials();
|
| ︙ |
Changes to src/report.c.
| ︙ | |||
38 39 40 41 42 43 44 | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | - + + + + | const char *zScript; Blob ril; /* Report Item List */ Stmt q; int rn = 0; int cnt = 0; login_check_credentials(); |
| ︙ | |||
291 292 293 294 295 296 297 | 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | - + |
const char *zSQL;
const char *zOwner;
const char *zClrKey;
Stmt q;
login_check_credentials();
if( !g.perm.TktFmt ){
|
| ︙ | |||
341 342 343 344 345 346 347 | 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 | - + |
const char *zOwner;
const char *zClrKey;
char *zSQL;
char *zErr = 0;
login_check_credentials();
if( !g.perm.TktFmt ){
|
| ︙ | |||
1076 1077 1078 1079 1080 1081 1082 | 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 | - + | char *zClrKey; int tabs; Stmt q; char *zErr1 = 0; char *zErr2 = 0; login_check_credentials(); |
| ︙ |
Changes to src/setup.c.
| ︙ | |||
57 58 59 60 61 62 63 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - + |
/*
** WEBPAGE: /setup
*/
void setup_page(void){
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | |||
150 151 152 153 154 155 156 | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | - + |
*/
void setup_ulist(void){
Stmt s;
int prevLevel = 0;
login_check_credentials();
if( !g.perm.Admin ){
|
| ︙ | |||
334 335 336 337 338 339 340 | 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 | - + | char *inherit[128]; int a[128]; const char *oa[128]; /* Must have ADMIN privileges to access this page */ login_check_credentials(); |
| ︙ | |||
996 997 998 999 1000 1001 1002 | 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 | - + + |
/*
** WEBPAGE: setup_access
*/
void setup_access(void){
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | |||
1201 1202 1203 1204 1205 1206 1207 | 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 | - + + |
const char *zRepo = PD("repo", "");
const char *zLogin = PD("login", "");
const char *zPw = PD("pw", "");
const char *zNewName = PD("newname", "New Login Group");
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | |||
1313 1314 1315 1316 1317 1318 1319 | 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 | - + + |
"1", "HH:MM:SS",
"2", "YYYY-MM-DD HH:MM",
"3", "YYMMDD HH:MM",
"4", "(off)"
};
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | |||
1391 1392 1393 1394 1395 1396 1397 | 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 | - + + |
** WEBPAGE: setup_settings
*/
void setup_settings(void){
Setting const *pSet;
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | |||
1471 1472 1473 1474 1475 1476 1477 | 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 | - + + |
/*
** WEBPAGE: setup_config
*/
void setup_config(void){
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | |||
1549 1550 1551 1552 1553 1554 1555 | 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 | - + + |
/*
** WEBPAGE: setup_editcss
*/
void setup_editcss(void){
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | |||
1594 1595 1596 1597 1598 1599 1600 | 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 | - + + |
/*
** WEBPAGE: setup_header
*/
void setup_header(void){
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | |||
1658 1659 1660 1661 1662 1663 1664 | 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 | - + + |
/*
** WEBPAGE: setup_footer
*/
void setup_footer(void){
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | |||
1695 1696 1697 1698 1699 1700 1701 | 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 | - + + |
/*
** WEBPAGE: setup_modreq
*/
void setup_modreq(void){
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | |||
1739 1740 1741 1742 1743 1744 1745 | 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 | - + + |
/*
** WEBPAGE: setup_adunit
*/
void setup_adunit(void){
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | |||
1820 1821 1822 1823 1824 1825 1826 | 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 | - + + |
zLogoMime = PD("logoim:mimetype","image/gif");
}
if( szBgImg>0 ){
zBgMime = PD("bgim:mimetype","image/gif");
}
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | |||
1959 1960 1961 1962 1963 1964 1965 | 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 | - + + |
** Run raw SQL commands against the database file using the web interface.
*/
void sql_page(void){
const char *zQ = P("q");
int go = P("go")!=0;
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | |||
2080 2081 2082 2083 2084 2085 2086 | 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 | - + + |
** may be run as well.
*/
void th1_page(void){
const char *zQ = P("q");
int go = P("go")!=0;
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | |||
2140 2141 2142 2143 2144 2145 2146 | 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 | - + + |
Stmt stLog = empty_Stmt;
Blob qLog = empty_blob;
int limit;
int fLogEnabled;
int counter = 0;
login_check_credentials();
if( !g.perm.Setup && !g.perm.Admin ){
|
| ︙ | |||
2197 2198 2199 2200 2201 2202 2203 | 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 | - + + |
** WEBPAGE: srchsetup
**
** Configure the search engine.
*/
void page_srchsetup(){
login_check_credentials();
if( !g.perm.Setup && !g.perm.Admin ){
|
| ︙ |
Changes to src/shun.c.
| ︙ | |||
47 48 49 50 51 52 53 | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | - + + |
const char *zRcvid = P("rcvid");
int nRcvid = 0;
int numRows = 3;
char *zCanonical = 0;
login_check_credentials();
if( !g.perm.Admin ){
|
| ︙ | |||
299 300 301 302 303 304 305 | 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 | - + + |
int ofst = atoi(PD("ofst","0"));
int showAll = P("all")!=0;
int cnt;
Stmt q;
login_check_credentials();
if( !g.perm.Admin ){
|
| ︙ | |||
379 380 381 382 383 384 385 | 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | - + + |
*/
void rcvfrom_page(void){
int rcvid = atoi(PD("rcvid","0"));
Stmt q;
login_check_credentials();
if( !g.perm.Admin ){
|
| ︙ |
Changes to src/skins.c.
| ︙ | |||
287 288 289 290 291 292 293 | 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | - + + |
const char *zCurrent = 0; /* Current skin */
int i; /* Loop counter */
Stmt q;
int seenCurrent = 0;
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ |
Changes to src/stat.c.
| ︙ | |||
50 51 52 53 54 55 56 | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | - + | int szMax, szAvg; const char *zDb; int brief; char zBuf[100]; const char *p; login_check_credentials(); |
| ︙ | |||
290 291 292 293 294 295 296 | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | - + |
**
** Show ways in which this repository has been accessed
*/
void urllist_page(void){
Stmt q;
int cnt;
login_check_credentials();
|
| ︙ | |||
337 338 339 340 341 342 343 | 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | - + |
** WEBPAGE: repo_schema
**
** Show the repository schema
*/
void repo_schema_page(void){
Stmt q;
login_check_credentials();
|
| ︙ |
Changes to src/statrep.c.
| ︙ | |||
726 727 728 729 730 731 732 | 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 | - + |
*/
void stats_report_page(){
HQuery url; /* URL for various branch links */
const char *zView = P("view"); /* Which view/report to show. */
const char *zUserName = P("user");
login_check_credentials();
|
| ︙ |
Changes to src/style.c.
| ︙ | |||
1409 1410 1411 1412 1413 1414 1415 | 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 | - + - + + + + + + + + + |
"HTTP_USER_AGENT", "HTTP_REFERER", "PATH_INFO", "PATH_TRANSLATED",
"QUERY_STRING", "REMOTE_ADDR", "REMOTE_PORT", "REQUEST_METHOD",
"REQUEST_URI", "SCRIPT_FILENAME", "SCRIPT_NAME", "SERVER_PROTOCOL",
};
login_check_credentials();
if( !g.perm.Admin && !g.perm.Setup && !db_get_boolean("test_env_enable",0) ){
|
| ︙ |
Changes to src/tag.c.
| ︙ | |||
540 541 542 543 544 545 546 | 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 | - + |
** WEBPAGE: taglist
*/
void taglist_page(void){
Stmt q;
login_check_credentials();
if( !g.perm.Read ){
|
| ︙ | |||
578 579 580 581 582 583 584 | 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 | - + |
/*
** WEBPAGE: /tagtimeline
*/
void tagtimeline_page(void){
Stmt q;
login_check_credentials();
|
| ︙ |
Changes to src/tar.c.
| ︙ | |||
601 602 603 604 605 606 607 | 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 | - + |
void tarball_page(void){
int rid;
char *zName, *zRid, *zKey;
int nName, nRid;
Blob tarball;
login_check_credentials();
|
| ︙ | |||
636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 | 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 | + + + + + + + + + + + |
if( P("debug")!=0 ){
style_header("Tarball Generator Debug Screen");
@ zName = "%h(zName)"<br>
@ rid = %d(rid)<br>
@ zKey = "%h(zKey)"
style_footer();
return;
}
if( referred_from_login() ){
style_header("Tarball Download");
@ <form action='%R/tarball'>
cgi_query_parameters_to_hidden();
@ <p>Tarball named <b>%h(zName).tar.gz</b> holding the content
@ of check-in <b>%h(zRid)</b>:
@ <input type="submit" value="Download" />
@ </form>
style_footer();
return;
}
blob_zero(&tarball);
if( cache_read(&tarball, zKey)==0 ){
tarball_of_checkin(rid, &tarball, zName);
cache_write(&tarball, zKey);
}
free( zName );
free( zRid );
free( zKey );
cgi_set_content(&tarball);
cgi_set_content_type("application/x-compressed");
}
|
Changes to src/th_main.c.
| ︙ | |||
340 341 342 343 344 345 346 347 | 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | + + - + - + | Th_SetResult(interp, zOut, -1); free(zOut); return TH_OK; } /* ** TH1 command: hascap STRING... ** TH1 command: anoncap STRING... ** ** Return true if the current user (hascap) or if the anonymous user |
| ︙ | |||
541 542 543 544 545 546 547 | 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 | + - + - + | return TH_OK; } /* ** TH1 command: anycap STRING ** ** Return true if the current user user |
| ︙ | |||
1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 | 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 | + + + - + |
void Th_FossilInit(u32 flags){
int wasInit = 0;
int needConfig = flags & TH_INIT_NEED_CONFIG;
int forceReset = flags & TH_INIT_FORCE_RESET;
int forceTcl = flags & TH_INIT_FORCE_TCL;
int forceSetup = flags & TH_INIT_FORCE_SETUP;
static unsigned int aFlags[] = { 0, 1, WIKI_LINKSONLY };
static int anonFlag = LOGIN_ANON;
static int zeroInt = 0;
static struct _Command {
const char *zName;
Th_CommandProc xProc;
void *pContext;
} aCommand[] = {
{"anoncap", hascapCmd, (void*)&anonFlag},
{"anycap", anycapCmd, 0},
{"artifact", artifactCmd, 0},
{"checkout", checkoutCmd, 0},
{"combobox", comboboxCmd, 0},
{"date", dateCmd, 0},
{"decorate", wikiCmd, (void*)&aFlags[2]},
{"enable_output", enableOutputCmd, 0},
{"getParameter", getParameterCmd, 0},
{"globalState", globalStateCmd, 0},
{"httpize", httpizeCmd, 0},
|
| ︙ |
Changes to src/timeline.c.
| ︙ | |||
161 162 163 164 165 166 167 | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | - + |
** testing the hash_color() function.
*/
void test_hash_color_page(void){
const char *zBr;
char zNm[10];
int i, cnt;
login_check_credentials();
|
| ︙ | |||
1173 1174 1175 1176 1177 1178 1179 | 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 | - + |
*/
pd_rid = name_to_typed_rid(P("dp"),"ci");
if( pd_rid ){
p_rid = d_rid = pd_rid;
}
login_check_credentials();
if( !g.perm.Read && !g.perm.RdTkt && !g.perm.RdWiki ){
|
| ︙ | |||
2066 2067 2068 2069 2070 2071 2072 | 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 | - + + + + |
/*
** WEBPAGE: test_timewarps
*/
void test_timewarp_page(void){
Stmt q;
login_check_credentials();
|
| ︙ |
Changes to src/tkt.c.
| ︙ | |||
447 448 449 450 451 452 453 | 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 | - - + + - + - + |
*/
void tktview_page(void){
const char *zScript;
char *zFullName;
const char *zUuid = PD("name","");
login_check_credentials();
|
| ︙ | |||
685 686 687 688 689 690 691 | 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 | - + |
** top of the screen.
*/
void tktnew_page(void){
const char *zScript;
char *zNewUuid = 0;
login_check_credentials();
|
| ︙ | |||
736 737 738 739 740 741 742 | 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 | - + + + + |
void tktedit_page(void){
const char *zScript;
int nName;
const char *zName;
int nRec;
login_check_credentials();
|
| ︙ | |||
837 838 839 840 841 842 843 | 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 | - + + + + | const char *zUuid; char *zFullUuid; int tagid; char zGlobPattern[50]; const char *zType; login_check_credentials(); |
| ︙ | |||
910 911 912 913 914 915 916 | 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 | - + + + + | Stmt q; char *zTitle; const char *zUuid; int tagid; int nChng = 0; login_check_credentials(); |
| ︙ | |||
1401 1402 1403 1404 1405 1406 1407 | 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 | - + |
void ticket_standard_submenu(unsigned int ok){
if( (ok & T_SRCH)!=0 && search_restrict(SRCH_TKT)!=0 ){
style_submenu_element("Search","Search","%R/tktsrch");
}
if( (ok & T_REPLIST)!=0 ){
style_submenu_element("Reports","Reports","%R/reportlist");
}
|
| ︙ |
Changes to src/tktsetup.c.
| ︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | - + + |
/*
** Main sub-menu for configuring the ticketing system.
** WEBPAGE: tktsetup
*/
void tktsetup_page(void){
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | |||
116 117 118 119 120 121 122 | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | - + + - + |
int height /* Height of the edit box */
){
const char *z;
int isSubmit;
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | |||
711 712 713 714 715 716 717 | 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 | - + - + - + - + | } /* ** The default report list page */ static const char zDefaultReportList[] = @ <th1> |
| ︙ | |||
856 857 858 859 860 861 862 | 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 | - + + |
/*
** WEBPAGE: tktsetup_timeline
*/
void tktsetup_timeline_page(void){
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ |
Changes to src/user.c.
| ︙ | |||
422 423 424 425 426 427 428 | 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 | - + |
int skip = atoi(PD("o","0"));
Blob sql;
Stmt q;
int cnt = 0;
int rc;
login_check_credentials();
|
| ︙ |
Changes to src/wiki.c.
| ︙ | |||
220 221 222 223 224 225 226 | 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | - + - + |
}
if( (ok & W_LIST)!=0 ){
style_submenu_element("List","List","%R/wcontent");
}
if( (ok & W_HELP)!=0 ){
style_submenu_element("Help","Help","%R/wikihelp");
}
|
| ︙ | |||
259 260 261 262 263 264 265 | 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | - + - - + + - + |
}
}
@ <li> %z(href("%R/timeline?y=w"))Recent changes</a> to wiki pages.</li>
@ <li> Formatting rules for %z(href("%R/wiki_rules"))Fossil Wiki</a> and for
@ %z(href("%R/md_rules"))Markdown Wiki</a>.</li>
@ <li> Use the %z(href("%R/wiki?name=Sandbox"))Sandbox</a>
@ to experiment.</li>
|
| ︙ | |||
310 311 312 313 314 315 316 | 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | - + |
Blob wiki;
Manifest *pWiki = 0;
const char *zPageName;
const char *zMimetype = 0;
char *zBody = mprintf("%s","<i>Empty Page</i>");
login_check_credentials();
|
| ︙ | |||
353 354 355 356 357 358 359 | 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | - + - + - + |
if( rid ){
style_submenu_element("Diff", "Last change",
"%R/wdiff?name=%T&a=%d", zPageName, rid);
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
style_submenu_element("Details", "Details",
"%R/info/%s", zUuid);
}
|
| ︙ | |||
483 484 485 486 487 488 489 | 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 | - + - + |
}
login_check_credentials();
zPageName = PD("name","");
if( check_name(zPageName) ) return;
isSandbox = is_sandbox(zPageName);
if( isSandbox ){
if( !g.perm.WrWiki ){
|
| ︙ | |||
623 624 625 626 627 628 629 | 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 | - + |
** to the wikiedit screen for that new page.
*/
void wikinew_page(void){
const char *zName;
const char *zMimetype;
login_check_credentials();
if( !g.perm.NewWiki ){
|
| ︙ | |||
725 726 727 728 729 730 731 | 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 | - + |
free(zTag);
if( !rid ){
fossil_redirect_home();
return;
}
}
if( !g.perm.ApndWiki ){
|
| ︙ | |||
838 839 840 841 842 843 844 | 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 | - + |
**
** Show the complete change history for a single wiki page.
*/
void whistory_page(void){
Stmt q;
const char *zPageName;
login_check_credentials();
|
| ︙ | |||
870 871 872 873 874 875 876 | 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 | - + |
const char *zPageName;
Manifest *pW1, *pW2 = 0;
Blob w1, w2, d;
u64 diffFlags;
login_check_credentials();
rid1 = atoi(PD("a","0"));
|
| ︙ | |||
933 934 935 936 937 938 939 | 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 | - + |
** List all available wiki pages with date created and last modified.
*/
void wcontent_page(void){
Stmt q;
int showAll = P("all")!=0;
login_check_credentials();
|
| ︙ | |||
967 968 969 970 971 972 973 | 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 | - + |
** URL: /wfind?title=TITLE
** List all wiki pages whose titles contain the search text
*/
void wfind_page(void){
Stmt q;
const char *zTitle;
login_check_credentials();
|
| ︙ |
Changes to src/xfersetup.c.
| ︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | - + + |
/*
** Main sub-menu for configuring the transfer system.
** WEBPAGE: xfersetup
*/
void xfersetup_page(void){
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | |||
102 103 104 105 106 107 108 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | - + + |
int height /* Height of the edit box */
){
const char *z;
int isSubmit;
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ |
Changes to src/zip.c.
| ︙ | |||
446 447 448 449 450 451 452 | 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | - + | int rid; char *zName, *zRid; int nName, nRid; Blob zip; char *zKey; login_check_credentials(); |
| ︙ | |||
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);
|
| ︙ |