Fossil SCM

Exchanged most uses of %s(g.zTop) and such in the code for use of Fossil's special printf() type functions. (The branch is named after just one of several of these, mprintf(), being one of the shortest names.) At the least, this is shorter, simpler code, but there is also some hope that it may fix some doubled slash problems someone is having on the forum. (https://www.fossil-scm.org/forum/forumpost/1ea72176e0)

wyoung 2020-10-04 14:35 trunk
Commit 2907721acd547b3ed7712beb02fc79268e04a4ee18e8d95c9a8ddf20aac9780a
+1 -14
--- src/attach.c
+++ src/attach.c
@@ -375,11 +375,11 @@
375375
}
376376
zTarget = zTkt;
377377
zTargetType = mprintf("Ticket <a href=\"%R/tktview/%s\">%S</a>",
378378
zTkt, zTkt);
379379
}
380
- if( zFrom==0 ) zFrom = mprintf("%s/home", g.zTop);
380
+ if( zFrom==0 ) zFrom = mprintf("%R/home");
381381
if( P("cancel") ){
382382
cgi_redirect(zFrom);
383383
}
384384
if( P("ok") && szContent>0 && (goodCaptcha = captcha_is_correct(0)) ){
385385
int needModerator = (zTkt!=0 && ticket_need_moderation(0)) ||
@@ -449,23 +449,10 @@
449449
return;
450450
}
451451
rid = name_to_rid_www("name");
452452
if( rid==0 ){ fossil_redirect_home(); }
453453
zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
454
-#if 0
455
- /* Shunning here needs to get both the attachment control artifact and
456
- ** the object that is attached. */
457
- if( g.perm.Admin ){
458
- if( db_exists("SELECT 1 FROM shun WHERE uuid='%q'", zUuid) ){
459
- style_submenu_element("Unshun", "%s/shun?uuid=%s&sub=1",
460
- g.zTop, zUuid);
461
- }else{
462
- style_submenu_element("Shun", "%s/shun?shun=%s#addshun",
463
- g.zTop, zUuid);
464
- }
465
- }
466
-#endif
467454
pAttach = manifest_get(rid, CFTYPE_ATTACHMENT, 0);
468455
if( pAttach==0 ) fossil_redirect_home();
469456
zTarget = pAttach->zAttachTarget;
470457
zSrc = pAttach->zAttachSrc;
471458
ridSrc = db_int(0,"SELECT rid FROM blob WHERE uuid='%q'", zSrc);
472459
--- src/attach.c
+++ src/attach.c
@@ -375,11 +375,11 @@
375 }
376 zTarget = zTkt;
377 zTargetType = mprintf("Ticket <a href=\"%R/tktview/%s\">%S</a>",
378 zTkt, zTkt);
379 }
380 if( zFrom==0 ) zFrom = mprintf("%s/home", g.zTop);
381 if( P("cancel") ){
382 cgi_redirect(zFrom);
383 }
384 if( P("ok") && szContent>0 && (goodCaptcha = captcha_is_correct(0)) ){
385 int needModerator = (zTkt!=0 && ticket_need_moderation(0)) ||
@@ -449,23 +449,10 @@
449 return;
450 }
451 rid = name_to_rid_www("name");
452 if( rid==0 ){ fossil_redirect_home(); }
453 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
454 #if 0
455 /* Shunning here needs to get both the attachment control artifact and
456 ** the object that is attached. */
457 if( g.perm.Admin ){
458 if( db_exists("SELECT 1 FROM shun WHERE uuid='%q'", zUuid) ){
459 style_submenu_element("Unshun", "%s/shun?uuid=%s&sub=1",
460 g.zTop, zUuid);
461 }else{
462 style_submenu_element("Shun", "%s/shun?shun=%s#addshun",
463 g.zTop, zUuid);
464 }
465 }
466 #endif
467 pAttach = manifest_get(rid, CFTYPE_ATTACHMENT, 0);
468 if( pAttach==0 ) fossil_redirect_home();
469 zTarget = pAttach->zAttachTarget;
470 zSrc = pAttach->zAttachSrc;
471 ridSrc = db_int(0,"SELECT rid FROM blob WHERE uuid='%q'", zSrc);
472
--- src/attach.c
+++ src/attach.c
@@ -375,11 +375,11 @@
375 }
376 zTarget = zTkt;
377 zTargetType = mprintf("Ticket <a href=\"%R/tktview/%s\">%S</a>",
378 zTkt, zTkt);
379 }
380 if( zFrom==0 ) zFrom = mprintf("%R/home");
381 if( P("cancel") ){
382 cgi_redirect(zFrom);
383 }
384 if( P("ok") && szContent>0 && (goodCaptcha = captcha_is_correct(0)) ){
385 int needModerator = (zTkt!=0 && ticket_need_moderation(0)) ||
@@ -449,23 +449,10 @@
449 return;
450 }
451 rid = name_to_rid_www("name");
452 if( rid==0 ){ fossil_redirect_home(); }
453 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
 
 
 
 
 
 
 
 
 
 
 
 
 
454 pAttach = manifest_get(rid, CFTYPE_ATTACHMENT, 0);
455 if( pAttach==0 ) fossil_redirect_home();
456 zTarget = pAttach->zAttachTarget;
457 zSrc = pAttach->zAttachSrc;
458 ridSrc = db_int(0,"SELECT rid FROM blob WHERE uuid='%q'", zSrc);
459
+1 -1
--- src/dispatch.c
+++ src/dispatch.c
@@ -749,11 +749,11 @@
749749
int rc;
750750
const CmdOrPage *pCmd = 0;
751751
752752
style_header("Help: %s", zCmd);
753753
754
- style_submenu_element("Command-List", "%s/help", g.zTop);
754
+ style_submenu_element("Command-List", "%R/help");
755755
rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd);
756756
if( *zCmd=='/' ){
757757
/* Some of the webpages require query parameters in order to work.
758758
** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
759759
@ <h1>The "%h(zCmd)" page:</h1>
760760
--- src/dispatch.c
+++ src/dispatch.c
@@ -749,11 +749,11 @@
749 int rc;
750 const CmdOrPage *pCmd = 0;
751
752 style_header("Help: %s", zCmd);
753
754 style_submenu_element("Command-List", "%s/help", g.zTop);
755 rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd);
756 if( *zCmd=='/' ){
757 /* Some of the webpages require query parameters in order to work.
758 ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
759 @ <h1>The "%h(zCmd)" page:</h1>
760
--- src/dispatch.c
+++ src/dispatch.c
@@ -749,11 +749,11 @@
749 int rc;
750 const CmdOrPage *pCmd = 0;
751
752 style_header("Help: %s", zCmd);
753
754 style_submenu_element("Command-List", "%R/help");
755 rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd);
756 if( *zCmd=='/' ){
757 /* Some of the webpages require query parameters in order to work.
758 ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
759 @ <h1>The "%h(zCmd)" page:</h1>
760
+7 -10
--- src/info.c
+++ src/info.c
@@ -1933,14 +1933,13 @@
19331933
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
19341934
if( rid==0 ) fossil_redirect_home();
19351935
if( g.perm.Admin ){
19361936
const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
19371937
if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){
1938
- style_submenu_element("Unshun", "%s/shun?accept=%s&sub=1#delshun",
1939
- g.zTop, zUuid);
1938
+ style_submenu_element("Unshun", "%R/shun?accept=%s&sub=1#delshun", zUuid);
19401939
}else{
1941
- style_submenu_element("Shun", "%s/shun?shun=%s#addshun", g.zTop, zUuid);
1940
+ style_submenu_element("Shun", "%R/shun?shun=%s#addshun", zUuid);
19421941
}
19431942
}
19441943
style_header("Hex Artifact Content");
19451944
zUuid = db_text("?","SELECT uuid FROM blob WHERE rid=%d", rid);
19461945
etag_check(ETAG_HASH, zUuid);
@@ -2361,14 +2360,13 @@
23612360
/*NOTREACHED*/
23622361
}
23632362
if( g.perm.Admin ){
23642363
const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
23652364
if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){
2366
- style_submenu_element("Unshun", "%s/shun?accept=%s&sub=1#accshun",
2367
- g.zTop, zUuid);
2365
+ style_submenu_element("Unshun", "%R/shun?accept=%s&sub=1#accshun", zUuid);
23682366
}else{
2369
- style_submenu_element("Shun", "%s/shun?shun=%s#addshun", g.zTop, zUuid);
2367
+ style_submenu_element("Shun", "%R/shun?shun=%s#addshun",zUuid);
23702368
}
23712369
}
23722370
23732371
if( isFile ){
23742372
if( isSymbolicCI ){
@@ -2462,11 +2460,11 @@
24622460
@ );
24632461
@ </script>
24642462
}else if( renderAsSvg ){
24652463
@ <object type="image/svg+xml" data="%R/raw/%s(zUuid)"></object>
24662464
}else{
2467
- style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
2465
+ style_submenu_element("Hex", "%R/hexdump?name=%s", zUuid);
24682466
if( zLn==0 || atoi(zLn)==0 ){
24692467
style_submenu_checkbox("ln", "Line Numbers", 0, 0);
24702468
}
24712469
blob_to_utf8_no_bom(&content, 0);
24722470
zMime = mimetype_from_content(&content);
@@ -2525,14 +2523,13 @@
25252523
rid = name_to_rid_www("name");
25262524
if( rid==0 ){ fossil_redirect_home(); }
25272525
zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
25282526
if( g.perm.Admin ){
25292527
if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){
2530
- style_submenu_element("Unshun", "%s/shun?accept=%s&sub=1#accshun",
2531
- g.zTop, zUuid);
2528
+ style_submenu_element("Unshun", "%R/shun?accept=%s&sub=1#accshun", zUuid);
25322529
}else{
2533
- style_submenu_element("Shun", "%s/shun?shun=%s#addshun", g.zTop, zUuid);
2530
+ style_submenu_element("Shun", "%R/shun?shun=%s#addshun", zUuid);
25342531
}
25352532
}
25362533
pTktChng = manifest_get(rid, CFTYPE_TICKET, 0);
25372534
if( pTktChng==0 ) fossil_redirect_home();
25382535
zDate = db_text(0, "SELECT datetime(%.12f)", pTktChng->rDate);
25392536
--- src/info.c
+++ src/info.c
@@ -1933,14 +1933,13 @@
1933 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
1934 if( rid==0 ) fossil_redirect_home();
1935 if( g.perm.Admin ){
1936 const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
1937 if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){
1938 style_submenu_element("Unshun", "%s/shun?accept=%s&sub=1#delshun",
1939 g.zTop, zUuid);
1940 }else{
1941 style_submenu_element("Shun", "%s/shun?shun=%s#addshun", g.zTop, zUuid);
1942 }
1943 }
1944 style_header("Hex Artifact Content");
1945 zUuid = db_text("?","SELECT uuid FROM blob WHERE rid=%d", rid);
1946 etag_check(ETAG_HASH, zUuid);
@@ -2361,14 +2360,13 @@
2361 /*NOTREACHED*/
2362 }
2363 if( g.perm.Admin ){
2364 const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
2365 if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){
2366 style_submenu_element("Unshun", "%s/shun?accept=%s&sub=1#accshun",
2367 g.zTop, zUuid);
2368 }else{
2369 style_submenu_element("Shun", "%s/shun?shun=%s#addshun", g.zTop, zUuid);
2370 }
2371 }
2372
2373 if( isFile ){
2374 if( isSymbolicCI ){
@@ -2462,11 +2460,11 @@
2462 @ );
2463 @ </script>
2464 }else if( renderAsSvg ){
2465 @ <object type="image/svg+xml" data="%R/raw/%s(zUuid)"></object>
2466 }else{
2467 style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
2468 if( zLn==0 || atoi(zLn)==0 ){
2469 style_submenu_checkbox("ln", "Line Numbers", 0, 0);
2470 }
2471 blob_to_utf8_no_bom(&content, 0);
2472 zMime = mimetype_from_content(&content);
@@ -2525,14 +2523,13 @@
2525 rid = name_to_rid_www("name");
2526 if( rid==0 ){ fossil_redirect_home(); }
2527 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
2528 if( g.perm.Admin ){
2529 if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){
2530 style_submenu_element("Unshun", "%s/shun?accept=%s&sub=1#accshun",
2531 g.zTop, zUuid);
2532 }else{
2533 style_submenu_element("Shun", "%s/shun?shun=%s#addshun", g.zTop, zUuid);
2534 }
2535 }
2536 pTktChng = manifest_get(rid, CFTYPE_TICKET, 0);
2537 if( pTktChng==0 ) fossil_redirect_home();
2538 zDate = db_text(0, "SELECT datetime(%.12f)", pTktChng->rDate);
2539
--- src/info.c
+++ src/info.c
@@ -1933,14 +1933,13 @@
1933 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
1934 if( rid==0 ) fossil_redirect_home();
1935 if( g.perm.Admin ){
1936 const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
1937 if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){
1938 style_submenu_element("Unshun", "%R/shun?accept=%s&sub=1#delshun", zUuid);
 
1939 }else{
1940 style_submenu_element("Shun", "%R/shun?shun=%s#addshun", zUuid);
1941 }
1942 }
1943 style_header("Hex Artifact Content");
1944 zUuid = db_text("?","SELECT uuid FROM blob WHERE rid=%d", rid);
1945 etag_check(ETAG_HASH, zUuid);
@@ -2361,14 +2360,13 @@
2360 /*NOTREACHED*/
2361 }
2362 if( g.perm.Admin ){
2363 const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
2364 if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){
2365 style_submenu_element("Unshun", "%R/shun?accept=%s&sub=1#accshun", zUuid);
 
2366 }else{
2367 style_submenu_element("Shun", "%R/shun?shun=%s#addshun",zUuid);
2368 }
2369 }
2370
2371 if( isFile ){
2372 if( isSymbolicCI ){
@@ -2462,11 +2460,11 @@
2460 @ );
2461 @ </script>
2462 }else if( renderAsSvg ){
2463 @ <object type="image/svg+xml" data="%R/raw/%s(zUuid)"></object>
2464 }else{
2465 style_submenu_element("Hex", "%R/hexdump?name=%s", zUuid);
2466 if( zLn==0 || atoi(zLn)==0 ){
2467 style_submenu_checkbox("ln", "Line Numbers", 0, 0);
2468 }
2469 blob_to_utf8_no_bom(&content, 0);
2470 zMime = mimetype_from_content(&content);
@@ -2525,14 +2523,13 @@
2523 rid = name_to_rid_www("name");
2524 if( rid==0 ){ fossil_redirect_home(); }
2525 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
2526 if( g.perm.Admin ){
2527 if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){
2528 style_submenu_element("Unshun", "%R/shun?accept=%s&sub=1#accshun", zUuid);
 
2529 }else{
2530 style_submenu_element("Shun", "%R/shun?shun=%s#addshun", zUuid);
2531 }
2532 }
2533 pTktChng = manifest_get(rid, CFTYPE_TICKET, 0);
2534 if( pTktChng==0 ) fossil_redirect_home();
2535 zDate = db_text(0, "SELECT datetime(%.12f)", pTktChng->rDate);
2536
+3 -3
--- src/main.c
+++ src/main.c
@@ -1390,11 +1390,11 @@
13901390
13911391
/*
13921392
** Send an HTTP redirect back to the designated Index Page.
13931393
*/
13941394
NORETURN void fossil_redirect_home(void){
1395
- cgi_redirectf("%s%s", g.zTop, db_get("index-page", "/index"));
1395
+ cgi_redirectf("%R%s", db_get("index-page", "/index"));
13961396
}
13971397
13981398
/*
13991399
** If running as root, chroot to the directory containing the
14001400
** repository zRepo and then drop root privileges. Return the
@@ -1754,11 +1754,11 @@
17541754
/* Add the repository name (without the ".fossil" suffix) to the end
17551755
** of SCRIPT_NAME and g.zTop and g.zBaseURL and remove the repository
17561756
** name from the beginning of PATH_INFO.
17571757
*/
17581758
zNewScript = mprintf("%s%.*s", zOldScript, i, zPathInfo);
1759
- if( g.zTop ) g.zTop = mprintf("%s%.*s", g.zTop, i, zPathInfo);
1759
+ if( g.zTop ) g.zTop = mprintf("%R%.*s", i, zPathInfo);
17601760
if( g.zBaseURL ) g.zBaseURL = mprintf("%s%.*s", g.zBaseURL, i, zPathInfo);
17611761
cgi_replace_parameter("PATH_INFO", &zPathInfo[i+1]);
17621762
zPathInfo += i;
17631763
cgi_replace_parameter("SCRIPT_NAME", zNewScript);
17641764
db_open_repository(file_cleanup_fullpath(zRepo));
@@ -1794,11 +1794,11 @@
17941794
){
17951795
int iSkin = zPathInfo[6] - '0';
17961796
char *zNewScript;
17971797
skin_use_draft(iSkin);
17981798
zNewScript = mprintf("%T/draft%d", P("SCRIPT_NAME"), iSkin);
1799
- if( g.zTop ) g.zTop = mprintf("%s/draft%d", g.zTop, iSkin);
1799
+ if( g.zTop ) g.zTop = mprintf("%R/draft%d", iSkin);
18001800
if( g.zBaseURL ) g.zBaseURL = mprintf("%s/draft%d", g.zBaseURL, iSkin);
18011801
zPathInfo += 7;
18021802
cgi_replace_parameter("PATH_INFO", zPathInfo);
18031803
cgi_replace_parameter("SCRIPT_NAME", zNewScript);
18041804
etag_cancel();
18051805
--- src/main.c
+++ src/main.c
@@ -1390,11 +1390,11 @@
1390
1391 /*
1392 ** Send an HTTP redirect back to the designated Index Page.
1393 */
1394 NORETURN void fossil_redirect_home(void){
1395 cgi_redirectf("%s%s", g.zTop, db_get("index-page", "/index"));
1396 }
1397
1398 /*
1399 ** If running as root, chroot to the directory containing the
1400 ** repository zRepo and then drop root privileges. Return the
@@ -1754,11 +1754,11 @@
1754 /* Add the repository name (without the ".fossil" suffix) to the end
1755 ** of SCRIPT_NAME and g.zTop and g.zBaseURL and remove the repository
1756 ** name from the beginning of PATH_INFO.
1757 */
1758 zNewScript = mprintf("%s%.*s", zOldScript, i, zPathInfo);
1759 if( g.zTop ) g.zTop = mprintf("%s%.*s", g.zTop, i, zPathInfo);
1760 if( g.zBaseURL ) g.zBaseURL = mprintf("%s%.*s", g.zBaseURL, i, zPathInfo);
1761 cgi_replace_parameter("PATH_INFO", &zPathInfo[i+1]);
1762 zPathInfo += i;
1763 cgi_replace_parameter("SCRIPT_NAME", zNewScript);
1764 db_open_repository(file_cleanup_fullpath(zRepo));
@@ -1794,11 +1794,11 @@
1794 ){
1795 int iSkin = zPathInfo[6] - '0';
1796 char *zNewScript;
1797 skin_use_draft(iSkin);
1798 zNewScript = mprintf("%T/draft%d", P("SCRIPT_NAME"), iSkin);
1799 if( g.zTop ) g.zTop = mprintf("%s/draft%d", g.zTop, iSkin);
1800 if( g.zBaseURL ) g.zBaseURL = mprintf("%s/draft%d", g.zBaseURL, iSkin);
1801 zPathInfo += 7;
1802 cgi_replace_parameter("PATH_INFO", zPathInfo);
1803 cgi_replace_parameter("SCRIPT_NAME", zNewScript);
1804 etag_cancel();
1805
--- src/main.c
+++ src/main.c
@@ -1390,11 +1390,11 @@
1390
1391 /*
1392 ** Send an HTTP redirect back to the designated Index Page.
1393 */
1394 NORETURN void fossil_redirect_home(void){
1395 cgi_redirectf("%R%s", db_get("index-page", "/index"));
1396 }
1397
1398 /*
1399 ** If running as root, chroot to the directory containing the
1400 ** repository zRepo and then drop root privileges. Return the
@@ -1754,11 +1754,11 @@
1754 /* Add the repository name (without the ".fossil" suffix) to the end
1755 ** of SCRIPT_NAME and g.zTop and g.zBaseURL and remove the repository
1756 ** name from the beginning of PATH_INFO.
1757 */
1758 zNewScript = mprintf("%s%.*s", zOldScript, i, zPathInfo);
1759 if( g.zTop ) g.zTop = mprintf("%R%.*s", i, zPathInfo);
1760 if( g.zBaseURL ) g.zBaseURL = mprintf("%s%.*s", g.zBaseURL, i, zPathInfo);
1761 cgi_replace_parameter("PATH_INFO", &zPathInfo[i+1]);
1762 zPathInfo += i;
1763 cgi_replace_parameter("SCRIPT_NAME", zNewScript);
1764 db_open_repository(file_cleanup_fullpath(zRepo));
@@ -1794,11 +1794,11 @@
1794 ){
1795 int iSkin = zPathInfo[6] - '0';
1796 char *zNewScript;
1797 skin_use_draft(iSkin);
1798 zNewScript = mprintf("%T/draft%d", P("SCRIPT_NAME"), iSkin);
1799 if( g.zTop ) g.zTop = mprintf("%R/draft%d", iSkin);
1800 if( g.zBaseURL ) g.zBaseURL = mprintf("%s/draft%d", g.zBaseURL, iSkin);
1801 zPathInfo += 7;
1802 cgi_replace_parameter("PATH_INFO", zPathInfo);
1803 cgi_replace_parameter("SCRIPT_NAME", zNewScript);
1804 etag_cancel();
1805
+1 -1
--- src/name.c
+++ src/name.c
@@ -688,11 +688,11 @@
688688
}
689689
#endif
690690
if( zName==0 || zName[0]==0 ) return 0;
691691
rid = symbolic_name_to_rid(zName, "*");
692692
if( rid<0 ){
693
- cgi_redirectf("%s/ambiguous/%T?src=%t", g.zTop, zName, g.zPath);
693
+ cgi_redirectf("%R/ambiguous/%T?src=%t", zName, g.zPath);
694694
rid = 0;
695695
}
696696
return rid;
697697
}
698698
699699
--- src/name.c
+++ src/name.c
@@ -688,11 +688,11 @@
688 }
689 #endif
690 if( zName==0 || zName[0]==0 ) return 0;
691 rid = symbolic_name_to_rid(zName, "*");
692 if( rid<0 ){
693 cgi_redirectf("%s/ambiguous/%T?src=%t", g.zTop, zName, g.zPath);
694 rid = 0;
695 }
696 return rid;
697 }
698
699
--- src/name.c
+++ src/name.c
@@ -688,11 +688,11 @@
688 }
689 #endif
690 if( zName==0 || zName[0]==0 ) return 0;
691 rid = symbolic_name_to_rid(zName, "*");
692 if( rid<0 ){
693 cgi_redirectf("%R/ambiguous/%T?src=%t", zName, g.zPath);
694 rid = 0;
695 }
696 return rid;
697 }
698
699
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -246,11 +246,11 @@
246246
| PIKCHR_PROCESS_SRC
247247
| PIKCHR_PROCESS_ERR_PRE;
248248
249249
login_check_credentials();
250250
if( !g.perm.RdWiki && !g.perm.Read && !g.perm.RdForum ){
251
- cgi_redirectf("%s/login?g=%s/pikchrshow", g.zTop, g.zTop);
251
+ cgi_redirectf("%R/login?g=%R/pikchrshow");
252252
}
253253
zContent = PD("content",P("p"));
254254
if(P("ajax")!=0){
255255
/* Called from the JS-side preview updater. */
256256
cgi_set_content_type("text/html");
257257
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -246,11 +246,11 @@
246 | PIKCHR_PROCESS_SRC
247 | PIKCHR_PROCESS_ERR_PRE;
248
249 login_check_credentials();
250 if( !g.perm.RdWiki && !g.perm.Read && !g.perm.RdForum ){
251 cgi_redirectf("%s/login?g=%s/pikchrshow", g.zTop, g.zTop);
252 }
253 zContent = PD("content",P("p"));
254 if(P("ajax")!=0){
255 /* Called from the JS-side preview updater. */
256 cgi_set_content_type("text/html");
257
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -246,11 +246,11 @@
246 | PIKCHR_PROCESS_SRC
247 | PIKCHR_PROCESS_ERR_PRE;
248
249 login_check_credentials();
250 if( !g.perm.RdWiki && !g.perm.Read && !g.perm.RdForum ){
251 cgi_redirectf("%R/login?g=%R/pikchrshow");
252 }
253 zContent = PD("content",P("p"));
254 if(P("ajax")!=0){
255 /* Called from the JS-side preview updater. */
256 cgi_set_content_type("text/html");
257
+1 -1
--- src/report.c
+++ src/report.c
@@ -1029,11 +1029,11 @@
10291029
}
10301030
if( g.perm.TktFmt ){
10311031
style_submenu_element("SQL", "rptsql?rn=%d",rn);
10321032
}
10331033
if( g.perm.NewTkt ){
1034
- style_submenu_element("New Ticket", "%s/tktnew", g.zTop);
1034
+ style_submenu_element("New Ticket", "%R/tktnew");
10351035
}
10361036
style_header("%s", zTitle);
10371037
output_color_key(zClrKey, 1,
10381038
"border=\"0\" cellpadding=\"3\" cellspacing=\"0\" class=\"report\"");
10391039
@ <table border="1" cellpadding="2" cellspacing="0" class="report sortable"
10401040
--- src/report.c
+++ src/report.c
@@ -1029,11 +1029,11 @@
1029 }
1030 if( g.perm.TktFmt ){
1031 style_submenu_element("SQL", "rptsql?rn=%d",rn);
1032 }
1033 if( g.perm.NewTkt ){
1034 style_submenu_element("New Ticket", "%s/tktnew", g.zTop);
1035 }
1036 style_header("%s", zTitle);
1037 output_color_key(zClrKey, 1,
1038 "border=\"0\" cellpadding=\"3\" cellspacing=\"0\" class=\"report\"");
1039 @ <table border="1" cellpadding="2" cellspacing="0" class="report sortable"
1040
--- src/report.c
+++ src/report.c
@@ -1029,11 +1029,11 @@
1029 }
1030 if( g.perm.TktFmt ){
1031 style_submenu_element("SQL", "rptsql?rn=%d",rn);
1032 }
1033 if( g.perm.NewTkt ){
1034 style_submenu_element("New Ticket", "%R/tktnew");
1035 }
1036 style_header("%s", zTitle);
1037 output_color_key(zClrKey, 1,
1038 "border=\"0\" cellpadding=\"3\" cellspacing=\"0\" class=\"report\"");
1039 @ <table border="1" cellpadding="2" cellspacing="0" class="report sortable"
1040
+18 -18
--- src/setup.c
+++ src/setup.c
@@ -341,11 +341,11 @@
341341
return;
342342
}
343343
344344
style_header("Access Control Settings");
345345
db_begin_transaction();
346
- @ <form action="%s(g.zTop)/setup_access" method="post"><div>
346
+ @ <form action="%R/setup_access" method="post"><div>
347347
login_insert_csrf_secret();
348348
@ <input type="submit" name="submit" value="Apply Changes" /></p>
349349
@ <hr />
350350
multiple_choice_attribute("Redirect to HTTPS",
351351
"redirect-to-https", "redirhttps", "0",
@@ -618,11 +618,11 @@
618618
if( zGroup==0 ){
619619
@ <p>This repository (in the file named "%h(zSelfRepo)")
620620
@ is not currently part of any login-group.
621621
@ To join a login group, fill out the form below.</p>
622622
@
623
- @ <form action="%s(g.zTop)/setup_login_group" method="post"><div>
623
+ @ <form action="%R/setup_login_group" method="post"><div>
624624
login_insert_csrf_secret();
625625
@ <blockquote><table border="0">
626626
@
627627
@ <tr><th align="right" id="rfigtj">Repository filename \
628628
@ in group to join:</th>
@@ -674,11 +674,11 @@
674674
@ <td>%h(zTitle)<td width="10"><td>%h(zRepo)</tr>
675675
}
676676
db_finalize(&q);
677677
@ </table>
678678
@
679
- @ <p><form action="%s(g.zTop)/setup_login_group" method="post"><div>
679
+ @ <p><form action="%R/setup_login_group" method="post"><div>
680680
login_insert_csrf_secret();
681681
@ To leave this login group press
682682
@ <input type="submit" value="Leave Login Group" name="leave">
683683
@ </form></p>
684684
@ <br />For best results, use the same number of <a href="setup_access#ipt">
@@ -731,11 +731,11 @@
731731
return;
732732
}
733733
734734
style_header("Timeline Display Preferences");
735735
db_begin_transaction();
736
- @ <form action="%s(g.zTop)/setup_timeline" method="post"><div>
736
+ @ <form action="%R/setup_timeline" method="post"><div>
737737
login_insert_csrf_secret();
738738
@ <p><input type="submit" name="submit" value="Apply Changes" /></p>
739739
740740
@ <hr />
741741
onoff_attribute("Allow block-markup in timeline",
@@ -877,11 +877,11 @@
877877
@ by the contents of managed files named
878878
@ "<tt>.fossil-settings/</tt><i>SETTING-NAME</i>".
879879
@ If the file for a versionable setting exists, the value cannot be
880880
@ changed on this screen.</p><hr /><p>
881881
@
882
- @ <form action="%s(g.zTop)/setup_settings" method="post"><div>
882
+ @ <form action="%R/setup_settings" method="post"><div>
883883
@ <table border="0"><tr><td valign="top">
884884
login_insert_csrf_secret();
885885
for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){
886886
if( pSet->width==0 ){
887887
int hasVersionableValue = pSet->versionable &&
@@ -953,11 +953,11 @@
953953
return;
954954
}
955955
956956
style_header("WWW Configuration");
957957
db_begin_transaction();
958
- @ <form action="%s(g.zTop)/setup_config" method="post"><div>
958
+ @ <form action="%R/setup_config" method="post"><div>
959959
login_insert_csrf_secret();
960960
@ <input type="submit" name="submit" value="Apply Changes" /></p>
961961
@ <hr />
962962
entry_attribute("Project Name", 60, "project-name", "pn", "", 0);
963963
@ <p>A brief project name so visitors know what this site is about.
@@ -1049,11 +1049,11 @@
10491049
return;
10501050
}
10511051
10521052
style_header("Wiki Configuration");
10531053
db_begin_transaction();
1054
- @ <form action="%s(g.zTop)/setup_wiki" method="post"><div>
1054
+ @ <form action="%R/setup_wiki" method="post"><div>
10551055
login_insert_csrf_secret();
10561056
@ <input type="submit" name="submit" value="Apply Changes" /></p>
10571057
@ <hr />
10581058
onoff_attribute("Associate Wiki Pages With Branches, Tags, or Checkins",
10591059
"wiki-about", "wiki-about", 1, 0);
@@ -1181,11 +1181,11 @@
11811181
cgi_replace_parameter("adright","");
11821182
setup_incr_cfgcnt();
11831183
}
11841184
11851185
style_header("Edit Ad Unit");
1186
- @ <form action="%s(g.zTop)/setup_adunit" method="post"><div>
1186
+ @ <form action="%R/setup_adunit" method="post"><div>
11871187
login_insert_csrf_secret();
11881188
@ <b>Banner Ad-Unit:</b><br />
11891189
textarea_attribute("", 6, 80, "adunit", "adunit", "", 0);
11901190
@ <br />
11911191
@ <b>Right-Column Ad-Unit:</b><br />
@@ -1364,15 +1364,15 @@
13641364
cgi_redirect("setup_logo");
13651365
}
13661366
style_header("Edit Project Logo And Background");
13671367
@ <p>The current project logo has a MIME-Type of <b>%h(zLogoMime)</b>
13681368
@ and looks like this:</p>
1369
- @ <blockquote><p><img src="%s(g.zTop)/logo/%z(zLogoMtime)" \
1369
+ @ <blockquote><p><img src="%R/logo/%z(zLogoMtime)" \
13701370
@ alt="logo" border="1" />
13711371
@ </p></blockquote>
13721372
@
1373
- @ <form action="%s(g.zTop)/setup_logo" method="post"
1373
+ @ <form action="%R/setup_logo" method="post"
13741374
@ enctype="multipart/form-data"><div>
13751375
@ <p>The logo is accessible to all users at this URL:
13761376
@ <a href="%s(g.zBaseURL)/logo">%s(g.zBaseURL)/logo</a>.
13771377
@ The logo may or may not appear on each
13781378
@ page depending on the <a href="setup_skinedit?w=0">CSS</a> and
@@ -1388,15 +1388,15 @@
13881388
@ </div></form>
13891389
@ <hr />
13901390
@
13911391
@ <p>The current background image has a MIME-Type of <b>%h(zBgMime)</b>
13921392
@ and looks like this:</p>
1393
- @ <blockquote><p><img src="%s(g.zTop)/background/%z(zBgMtime)" \
1393
+ @ <blockquote><p><img src="%R/background/%z(zBgMtime)" \
13941394
@ alt="background" border=1 />
13951395
@ </p></blockquote>
13961396
@
1397
- @ <form action="%s(g.zTop)/setup_logo" method="post"
1397
+ @ <form action="%R/setup_logo" method="post"
13981398
@ enctype="multipart/form-data"><div>
13991399
@ <p>The background image is accessible to all users at this URL:
14001400
@ <a href="%s(g.zBaseURL)/background">%s(g.zBaseURL)/background</a>.
14011401
@ The background image may or may not appear on each
14021402
@ page depending on the <a href="setup_skinedit?w=0">CSS</a> and
@@ -1412,15 +1412,15 @@
14121412
@ <p>(Properties: "background-image" and "background-mimetype")
14131413
@ <hr />
14141414
@
14151415
@ <p>The current icon image has a MIME-Type of <b>%h(zIconMime)</b>
14161416
@ and looks like this:</p>
1417
- @ <blockquote><p><img src="%s(g.zTop)/favicon.ico/%z(zIconMtime)" \
1417
+ @ <blockquote><p><img src="%R/favicon.ico/%z(zIconMtime)" \
14181418
@ alt="icon" border=1 />
14191419
@ </p></blockquote>
14201420
@
1421
- @ <form action="%s(g.zTop)/setup_logo" method="post"
1421
+ @ <form action="%R/setup_logo" method="post"
14221422
@ enctype="multipart/form-data"><div>
14231423
@ <p>The icon image is accessible to all users at this URL:
14241424
@ <a href="%s(g.zBaseURL)/favicon.ico">%s(g.zBaseURL)/favicon.ico</a>.
14251425
@ The icon image may or may not appear on each
14261426
@ page depending on the web browser in use and the MIME-Types that it
@@ -1514,11 +1514,11 @@
15141514
"FROM config\n"
15151515
"-- ORDER BY mtime DESC; -- optional";
15161516
go = 1;
15171517
}
15181518
@
1519
- @ <form method="post" action="%s(g.zTop)/admin_sql">
1519
+ @ <form method="post" action="%R/admin_sql">
15201520
login_insert_csrf_secret();
15211521
@ SQL:<br />
15221522
@ <textarea name="q" rows="8" cols="80">%h(zQ)</textarea><br />
15231523
@ <input type="submit" name="go" value="Run SQL">
15241524
@ <input type="submit" name="schema" value="Show Schema">
@@ -1623,11 +1623,11 @@
16231623
style_header("Raw TH1 Commands");
16241624
@ <p><b>Caution:</b> There are no restrictions on the TH1 that can be
16251625
@ run by this page. If Tcl integration was enabled at compile-time and
16261626
@ the "tcl" setting is enabled, Tcl commands may be run as well.</p>
16271627
@
1628
- @ <form method="post" action="%s(g.zTop)/admin_th1">
1628
+ @ <form method="post" action="%R/admin_th1">
16291629
login_insert_csrf_secret();
16301630
@ TH1:<br />
16311631
@ <textarea name="q" rows="5" cols="80">%h(zQ)</textarea><br />
16321632
@ <input type="submit" name="go" value="Run TH1">
16331633
@ </form>
@@ -1725,11 +1725,11 @@
17251725
if( !g.perm.Admin ){
17261726
login_needed(0);
17271727
return;
17281728
}
17291729
style_header("Search Configuration");
1730
- @ <form action="%s(g.zTop)/srchsetup" method="post"><div>
1730
+ @ <form action="%R/srchsetup" method="post"><div>
17311731
login_insert_csrf_secret();
17321732
@ <div style="text-align:center;font-weight:bold;">
17331733
@ Server-specific settings that affect the
17341734
@ <a href="%R/search">/search</a> webpage.
17351735
@ </div>
@@ -1885,11 +1885,11 @@
18851885
}
18861886
db_prepare(&q,
18871887
"SELECT substr(name,8), value FROM config WHERE name GLOB 'walias:/*'"
18881888
" UNION ALL SELECT '', ''"
18891889
);
1890
- @ <form action="%s(g.zTop)/waliassetup" method="post"><div>
1890
+ @ <form action="%R/waliassetup" method="post"><div>
18911891
login_insert_csrf_secret();
18921892
@ <table border=0 cellpadding=5>
18931893
@ <tr><th>Alias<th>URI That The Alias Maps Into
18941894
blob_init(&namelist, 0, 0);
18951895
while( db_step(&q)==SQLITE_ROW ){
18961896
--- src/setup.c
+++ src/setup.c
@@ -341,11 +341,11 @@
341 return;
342 }
343
344 style_header("Access Control Settings");
345 db_begin_transaction();
346 @ <form action="%s(g.zTop)/setup_access" method="post"><div>
347 login_insert_csrf_secret();
348 @ <input type="submit" name="submit" value="Apply Changes" /></p>
349 @ <hr />
350 multiple_choice_attribute("Redirect to HTTPS",
351 "redirect-to-https", "redirhttps", "0",
@@ -618,11 +618,11 @@
618 if( zGroup==0 ){
619 @ <p>This repository (in the file named "%h(zSelfRepo)")
620 @ is not currently part of any login-group.
621 @ To join a login group, fill out the form below.</p>
622 @
623 @ <form action="%s(g.zTop)/setup_login_group" method="post"><div>
624 login_insert_csrf_secret();
625 @ <blockquote><table border="0">
626 @
627 @ <tr><th align="right" id="rfigtj">Repository filename \
628 @ in group to join:</th>
@@ -674,11 +674,11 @@
674 @ <td>%h(zTitle)<td width="10"><td>%h(zRepo)</tr>
675 }
676 db_finalize(&q);
677 @ </table>
678 @
679 @ <p><form action="%s(g.zTop)/setup_login_group" method="post"><div>
680 login_insert_csrf_secret();
681 @ To leave this login group press
682 @ <input type="submit" value="Leave Login Group" name="leave">
683 @ </form></p>
684 @ <br />For best results, use the same number of <a href="setup_access#ipt">
@@ -731,11 +731,11 @@
731 return;
732 }
733
734 style_header("Timeline Display Preferences");
735 db_begin_transaction();
736 @ <form action="%s(g.zTop)/setup_timeline" method="post"><div>
737 login_insert_csrf_secret();
738 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
739
740 @ <hr />
741 onoff_attribute("Allow block-markup in timeline",
@@ -877,11 +877,11 @@
877 @ by the contents of managed files named
878 @ "<tt>.fossil-settings/</tt><i>SETTING-NAME</i>".
879 @ If the file for a versionable setting exists, the value cannot be
880 @ changed on this screen.</p><hr /><p>
881 @
882 @ <form action="%s(g.zTop)/setup_settings" method="post"><div>
883 @ <table border="0"><tr><td valign="top">
884 login_insert_csrf_secret();
885 for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){
886 if( pSet->width==0 ){
887 int hasVersionableValue = pSet->versionable &&
@@ -953,11 +953,11 @@
953 return;
954 }
955
956 style_header("WWW Configuration");
957 db_begin_transaction();
958 @ <form action="%s(g.zTop)/setup_config" method="post"><div>
959 login_insert_csrf_secret();
960 @ <input type="submit" name="submit" value="Apply Changes" /></p>
961 @ <hr />
962 entry_attribute("Project Name", 60, "project-name", "pn", "", 0);
963 @ <p>A brief project name so visitors know what this site is about.
@@ -1049,11 +1049,11 @@
1049 return;
1050 }
1051
1052 style_header("Wiki Configuration");
1053 db_begin_transaction();
1054 @ <form action="%s(g.zTop)/setup_wiki" method="post"><div>
1055 login_insert_csrf_secret();
1056 @ <input type="submit" name="submit" value="Apply Changes" /></p>
1057 @ <hr />
1058 onoff_attribute("Associate Wiki Pages With Branches, Tags, or Checkins",
1059 "wiki-about", "wiki-about", 1, 0);
@@ -1181,11 +1181,11 @@
1181 cgi_replace_parameter("adright","");
1182 setup_incr_cfgcnt();
1183 }
1184
1185 style_header("Edit Ad Unit");
1186 @ <form action="%s(g.zTop)/setup_adunit" method="post"><div>
1187 login_insert_csrf_secret();
1188 @ <b>Banner Ad-Unit:</b><br />
1189 textarea_attribute("", 6, 80, "adunit", "adunit", "", 0);
1190 @ <br />
1191 @ <b>Right-Column Ad-Unit:</b><br />
@@ -1364,15 +1364,15 @@
1364 cgi_redirect("setup_logo");
1365 }
1366 style_header("Edit Project Logo And Background");
1367 @ <p>The current project logo has a MIME-Type of <b>%h(zLogoMime)</b>
1368 @ and looks like this:</p>
1369 @ <blockquote><p><img src="%s(g.zTop)/logo/%z(zLogoMtime)" \
1370 @ alt="logo" border="1" />
1371 @ </p></blockquote>
1372 @
1373 @ <form action="%s(g.zTop)/setup_logo" method="post"
1374 @ enctype="multipart/form-data"><div>
1375 @ <p>The logo is accessible to all users at this URL:
1376 @ <a href="%s(g.zBaseURL)/logo">%s(g.zBaseURL)/logo</a>.
1377 @ The logo may or may not appear on each
1378 @ page depending on the <a href="setup_skinedit?w=0">CSS</a> and
@@ -1388,15 +1388,15 @@
1388 @ </div></form>
1389 @ <hr />
1390 @
1391 @ <p>The current background image has a MIME-Type of <b>%h(zBgMime)</b>
1392 @ and looks like this:</p>
1393 @ <blockquote><p><img src="%s(g.zTop)/background/%z(zBgMtime)" \
1394 @ alt="background" border=1 />
1395 @ </p></blockquote>
1396 @
1397 @ <form action="%s(g.zTop)/setup_logo" method="post"
1398 @ enctype="multipart/form-data"><div>
1399 @ <p>The background image is accessible to all users at this URL:
1400 @ <a href="%s(g.zBaseURL)/background">%s(g.zBaseURL)/background</a>.
1401 @ The background image may or may not appear on each
1402 @ page depending on the <a href="setup_skinedit?w=0">CSS</a> and
@@ -1412,15 +1412,15 @@
1412 @ <p>(Properties: "background-image" and "background-mimetype")
1413 @ <hr />
1414 @
1415 @ <p>The current icon image has a MIME-Type of <b>%h(zIconMime)</b>
1416 @ and looks like this:</p>
1417 @ <blockquote><p><img src="%s(g.zTop)/favicon.ico/%z(zIconMtime)" \
1418 @ alt="icon" border=1 />
1419 @ </p></blockquote>
1420 @
1421 @ <form action="%s(g.zTop)/setup_logo" method="post"
1422 @ enctype="multipart/form-data"><div>
1423 @ <p>The icon image is accessible to all users at this URL:
1424 @ <a href="%s(g.zBaseURL)/favicon.ico">%s(g.zBaseURL)/favicon.ico</a>.
1425 @ The icon image may or may not appear on each
1426 @ page depending on the web browser in use and the MIME-Types that it
@@ -1514,11 +1514,11 @@
1514 "FROM config\n"
1515 "-- ORDER BY mtime DESC; -- optional";
1516 go = 1;
1517 }
1518 @
1519 @ <form method="post" action="%s(g.zTop)/admin_sql">
1520 login_insert_csrf_secret();
1521 @ SQL:<br />
1522 @ <textarea name="q" rows="8" cols="80">%h(zQ)</textarea><br />
1523 @ <input type="submit" name="go" value="Run SQL">
1524 @ <input type="submit" name="schema" value="Show Schema">
@@ -1623,11 +1623,11 @@
1623 style_header("Raw TH1 Commands");
1624 @ <p><b>Caution:</b> There are no restrictions on the TH1 that can be
1625 @ run by this page. If Tcl integration was enabled at compile-time and
1626 @ the "tcl" setting is enabled, Tcl commands may be run as well.</p>
1627 @
1628 @ <form method="post" action="%s(g.zTop)/admin_th1">
1629 login_insert_csrf_secret();
1630 @ TH1:<br />
1631 @ <textarea name="q" rows="5" cols="80">%h(zQ)</textarea><br />
1632 @ <input type="submit" name="go" value="Run TH1">
1633 @ </form>
@@ -1725,11 +1725,11 @@
1725 if( !g.perm.Admin ){
1726 login_needed(0);
1727 return;
1728 }
1729 style_header("Search Configuration");
1730 @ <form action="%s(g.zTop)/srchsetup" method="post"><div>
1731 login_insert_csrf_secret();
1732 @ <div style="text-align:center;font-weight:bold;">
1733 @ Server-specific settings that affect the
1734 @ <a href="%R/search">/search</a> webpage.
1735 @ </div>
@@ -1885,11 +1885,11 @@
1885 }
1886 db_prepare(&q,
1887 "SELECT substr(name,8), value FROM config WHERE name GLOB 'walias:/*'"
1888 " UNION ALL SELECT '', ''"
1889 );
1890 @ <form action="%s(g.zTop)/waliassetup" method="post"><div>
1891 login_insert_csrf_secret();
1892 @ <table border=0 cellpadding=5>
1893 @ <tr><th>Alias<th>URI That The Alias Maps Into
1894 blob_init(&namelist, 0, 0);
1895 while( db_step(&q)==SQLITE_ROW ){
1896
--- src/setup.c
+++ src/setup.c
@@ -341,11 +341,11 @@
341 return;
342 }
343
344 style_header("Access Control Settings");
345 db_begin_transaction();
346 @ <form action="%R/setup_access" method="post"><div>
347 login_insert_csrf_secret();
348 @ <input type="submit" name="submit" value="Apply Changes" /></p>
349 @ <hr />
350 multiple_choice_attribute("Redirect to HTTPS",
351 "redirect-to-https", "redirhttps", "0",
@@ -618,11 +618,11 @@
618 if( zGroup==0 ){
619 @ <p>This repository (in the file named "%h(zSelfRepo)")
620 @ is not currently part of any login-group.
621 @ To join a login group, fill out the form below.</p>
622 @
623 @ <form action="%R/setup_login_group" method="post"><div>
624 login_insert_csrf_secret();
625 @ <blockquote><table border="0">
626 @
627 @ <tr><th align="right" id="rfigtj">Repository filename \
628 @ in group to join:</th>
@@ -674,11 +674,11 @@
674 @ <td>%h(zTitle)<td width="10"><td>%h(zRepo)</tr>
675 }
676 db_finalize(&q);
677 @ </table>
678 @
679 @ <p><form action="%R/setup_login_group" method="post"><div>
680 login_insert_csrf_secret();
681 @ To leave this login group press
682 @ <input type="submit" value="Leave Login Group" name="leave">
683 @ </form></p>
684 @ <br />For best results, use the same number of <a href="setup_access#ipt">
@@ -731,11 +731,11 @@
731 return;
732 }
733
734 style_header("Timeline Display Preferences");
735 db_begin_transaction();
736 @ <form action="%R/setup_timeline" method="post"><div>
737 login_insert_csrf_secret();
738 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
739
740 @ <hr />
741 onoff_attribute("Allow block-markup in timeline",
@@ -877,11 +877,11 @@
877 @ by the contents of managed files named
878 @ "<tt>.fossil-settings/</tt><i>SETTING-NAME</i>".
879 @ If the file for a versionable setting exists, the value cannot be
880 @ changed on this screen.</p><hr /><p>
881 @
882 @ <form action="%R/setup_settings" method="post"><div>
883 @ <table border="0"><tr><td valign="top">
884 login_insert_csrf_secret();
885 for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){
886 if( pSet->width==0 ){
887 int hasVersionableValue = pSet->versionable &&
@@ -953,11 +953,11 @@
953 return;
954 }
955
956 style_header("WWW Configuration");
957 db_begin_transaction();
958 @ <form action="%R/setup_config" method="post"><div>
959 login_insert_csrf_secret();
960 @ <input type="submit" name="submit" value="Apply Changes" /></p>
961 @ <hr />
962 entry_attribute("Project Name", 60, "project-name", "pn", "", 0);
963 @ <p>A brief project name so visitors know what this site is about.
@@ -1049,11 +1049,11 @@
1049 return;
1050 }
1051
1052 style_header("Wiki Configuration");
1053 db_begin_transaction();
1054 @ <form action="%R/setup_wiki" method="post"><div>
1055 login_insert_csrf_secret();
1056 @ <input type="submit" name="submit" value="Apply Changes" /></p>
1057 @ <hr />
1058 onoff_attribute("Associate Wiki Pages With Branches, Tags, or Checkins",
1059 "wiki-about", "wiki-about", 1, 0);
@@ -1181,11 +1181,11 @@
1181 cgi_replace_parameter("adright","");
1182 setup_incr_cfgcnt();
1183 }
1184
1185 style_header("Edit Ad Unit");
1186 @ <form action="%R/setup_adunit" method="post"><div>
1187 login_insert_csrf_secret();
1188 @ <b>Banner Ad-Unit:</b><br />
1189 textarea_attribute("", 6, 80, "adunit", "adunit", "", 0);
1190 @ <br />
1191 @ <b>Right-Column Ad-Unit:</b><br />
@@ -1364,15 +1364,15 @@
1364 cgi_redirect("setup_logo");
1365 }
1366 style_header("Edit Project Logo And Background");
1367 @ <p>The current project logo has a MIME-Type of <b>%h(zLogoMime)</b>
1368 @ and looks like this:</p>
1369 @ <blockquote><p><img src="%R/logo/%z(zLogoMtime)" \
1370 @ alt="logo" border="1" />
1371 @ </p></blockquote>
1372 @
1373 @ <form action="%R/setup_logo" method="post"
1374 @ enctype="multipart/form-data"><div>
1375 @ <p>The logo is accessible to all users at this URL:
1376 @ <a href="%s(g.zBaseURL)/logo">%s(g.zBaseURL)/logo</a>.
1377 @ The logo may or may not appear on each
1378 @ page depending on the <a href="setup_skinedit?w=0">CSS</a> and
@@ -1388,15 +1388,15 @@
1388 @ </div></form>
1389 @ <hr />
1390 @
1391 @ <p>The current background image has a MIME-Type of <b>%h(zBgMime)</b>
1392 @ and looks like this:</p>
1393 @ <blockquote><p><img src="%R/background/%z(zBgMtime)" \
1394 @ alt="background" border=1 />
1395 @ </p></blockquote>
1396 @
1397 @ <form action="%R/setup_logo" method="post"
1398 @ enctype="multipart/form-data"><div>
1399 @ <p>The background image is accessible to all users at this URL:
1400 @ <a href="%s(g.zBaseURL)/background">%s(g.zBaseURL)/background</a>.
1401 @ The background image may or may not appear on each
1402 @ page depending on the <a href="setup_skinedit?w=0">CSS</a> and
@@ -1412,15 +1412,15 @@
1412 @ <p>(Properties: "background-image" and "background-mimetype")
1413 @ <hr />
1414 @
1415 @ <p>The current icon image has a MIME-Type of <b>%h(zIconMime)</b>
1416 @ and looks like this:</p>
1417 @ <blockquote><p><img src="%R/favicon.ico/%z(zIconMtime)" \
1418 @ alt="icon" border=1 />
1419 @ </p></blockquote>
1420 @
1421 @ <form action="%R/setup_logo" method="post"
1422 @ enctype="multipart/form-data"><div>
1423 @ <p>The icon image is accessible to all users at this URL:
1424 @ <a href="%s(g.zBaseURL)/favicon.ico">%s(g.zBaseURL)/favicon.ico</a>.
1425 @ The icon image may or may not appear on each
1426 @ page depending on the web browser in use and the MIME-Types that it
@@ -1514,11 +1514,11 @@
1514 "FROM config\n"
1515 "-- ORDER BY mtime DESC; -- optional";
1516 go = 1;
1517 }
1518 @
1519 @ <form method="post" action="%R/admin_sql">
1520 login_insert_csrf_secret();
1521 @ SQL:<br />
1522 @ <textarea name="q" rows="8" cols="80">%h(zQ)</textarea><br />
1523 @ <input type="submit" name="go" value="Run SQL">
1524 @ <input type="submit" name="schema" value="Show Schema">
@@ -1623,11 +1623,11 @@
1623 style_header("Raw TH1 Commands");
1624 @ <p><b>Caution:</b> There are no restrictions on the TH1 that can be
1625 @ run by this page. If Tcl integration was enabled at compile-time and
1626 @ the "tcl" setting is enabled, Tcl commands may be run as well.</p>
1627 @
1628 @ <form method="post" action="%R/admin_th1">
1629 login_insert_csrf_secret();
1630 @ TH1:<br />
1631 @ <textarea name="q" rows="5" cols="80">%h(zQ)</textarea><br />
1632 @ <input type="submit" name="go" value="Run TH1">
1633 @ </form>
@@ -1725,11 +1725,11 @@
1725 if( !g.perm.Admin ){
1726 login_needed(0);
1727 return;
1728 }
1729 style_header("Search Configuration");
1730 @ <form action="%R/srchsetup" method="post"><div>
1731 login_insert_csrf_secret();
1732 @ <div style="text-align:center;font-weight:bold;">
1733 @ Server-specific settings that affect the
1734 @ <a href="%R/search">/search</a> webpage.
1735 @ </div>
@@ -1885,11 +1885,11 @@
1885 }
1886 db_prepare(&q,
1887 "SELECT substr(name,8), value FROM config WHERE name GLOB 'walias:/*'"
1888 " UNION ALL SELECT '', ''"
1889 );
1890 @ <form action="%R/waliassetup" method="post"><div>
1891 login_insert_csrf_secret();
1892 @ <table border=0 cellpadding=5>
1893 @ <tr><th>Alias<th>URI That The Alias Maps Into
1894 blob_init(&namelist, 0, 0);
1895 while( db_step(&q)==SQLITE_ROW ){
1896
+3 -3
--- src/shun.c
+++ src/shun.c
@@ -185,11 +185,11 @@
185185
@ or artifacts that by design or accident interfere with the processing
186186
@ of the repository. Do not shun artifacts merely to remove them from
187187
@ sight - set the "hidden" tag on such artifacts instead.</p>
188188
@
189189
@ <blockquote>
190
- @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div>
190
+ @ <form method="post" action="%R/%s(g.zPath)"><div>
191191
login_insert_csrf_secret();
192192
@ <textarea class="fullsize-text" cols="70" rows="%d(numRows)" name="uuid">
193193
if( zShun ){
194194
if( strlen(zShun) ){
195195
@ %h(zShun)
@@ -212,11 +212,11 @@
212212
@ restored because the content is unknown. The only change is that
213213
@ the formerly shunned artifacts will be accepted on subsequent sync
214214
@ operations.</p>
215215
@
216216
@ <blockquote>
217
- @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div>
217
+ @ <form method="post" action="%R/%s(g.zPath)"><div>
218218
login_insert_csrf_secret();
219219
@ <textarea class="fullsize-text" cols="70" rows="%d(numRows)" name="uuid">
220220
if( zAccept ){
221221
if( strlen(zAccept) ){
222222
@ %h(zAccept)
@@ -237,11 +237,11 @@
237237
@ content of newly shunned artifacts is not purged until the repository
238238
@ is rebuilt. On larger repositories, the rebuild may take minute or
239239
@ two, so be patient after pressing the button.</p>
240240
@
241241
@ <blockquote>
242
- @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div>
242
+ @ <form method="post" action="%R/%s(g.zPath)"><div>
243243
login_insert_csrf_secret();
244244
@ <input type="submit" name="rebuild" value="Rebuild" />
245245
@ </div></form>
246246
@ </blockquote>
247247
@
248248
--- src/shun.c
+++ src/shun.c
@@ -185,11 +185,11 @@
185 @ or artifacts that by design or accident interfere with the processing
186 @ of the repository. Do not shun artifacts merely to remove them from
187 @ sight - set the "hidden" tag on such artifacts instead.</p>
188 @
189 @ <blockquote>
190 @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div>
191 login_insert_csrf_secret();
192 @ <textarea class="fullsize-text" cols="70" rows="%d(numRows)" name="uuid">
193 if( zShun ){
194 if( strlen(zShun) ){
195 @ %h(zShun)
@@ -212,11 +212,11 @@
212 @ restored because the content is unknown. The only change is that
213 @ the formerly shunned artifacts will be accepted on subsequent sync
214 @ operations.</p>
215 @
216 @ <blockquote>
217 @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div>
218 login_insert_csrf_secret();
219 @ <textarea class="fullsize-text" cols="70" rows="%d(numRows)" name="uuid">
220 if( zAccept ){
221 if( strlen(zAccept) ){
222 @ %h(zAccept)
@@ -237,11 +237,11 @@
237 @ content of newly shunned artifacts is not purged until the repository
238 @ is rebuilt. On larger repositories, the rebuild may take minute or
239 @ two, so be patient after pressing the button.</p>
240 @
241 @ <blockquote>
242 @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div>
243 login_insert_csrf_secret();
244 @ <input type="submit" name="rebuild" value="Rebuild" />
245 @ </div></form>
246 @ </blockquote>
247 @
248
--- src/shun.c
+++ src/shun.c
@@ -185,11 +185,11 @@
185 @ or artifacts that by design or accident interfere with the processing
186 @ of the repository. Do not shun artifacts merely to remove them from
187 @ sight - set the "hidden" tag on such artifacts instead.</p>
188 @
189 @ <blockquote>
190 @ <form method="post" action="%R/%s(g.zPath)"><div>
191 login_insert_csrf_secret();
192 @ <textarea class="fullsize-text" cols="70" rows="%d(numRows)" name="uuid">
193 if( zShun ){
194 if( strlen(zShun) ){
195 @ %h(zShun)
@@ -212,11 +212,11 @@
212 @ restored because the content is unknown. The only change is that
213 @ the formerly shunned artifacts will be accepted on subsequent sync
214 @ operations.</p>
215 @
216 @ <blockquote>
217 @ <form method="post" action="%R/%s(g.zPath)"><div>
218 login_insert_csrf_secret();
219 @ <textarea class="fullsize-text" cols="70" rows="%d(numRows)" name="uuid">
220 if( zAccept ){
221 if( strlen(zAccept) ){
222 @ %h(zAccept)
@@ -237,11 +237,11 @@
237 @ content of newly shunned artifacts is not purged until the repository
238 @ is rebuilt. On larger repositories, the rebuild may take minute or
239 @ two, so be patient after pressing the button.</p>
240 @
241 @ <blockquote>
242 @ <form method="post" action="%R/%s(g.zPath)"><div>
243 login_insert_csrf_secret();
244 @ <input type="submit" name="rebuild" value="Rebuild" />
245 @ </div></form>
246 @ </blockquote>
247 @
248
+8 -8
--- src/skins.c
+++ src/skins.c
@@ -389,11 +389,11 @@
389389
style_header("Rename A Skin");
390390
if( ex ){
391391
@ <p><span class="generalError">There is already another skin
392392
@ named "%h(zNewName)". Choose a different name.</span></p>
393393
}
394
- @ <form action="%s(g.zTop)/setup_skin_admin" method="post"><div>
394
+ @ <form action="%R/setup_skin_admin" method="post"><div>
395395
@ <table border="0"><tr>
396396
@ <tr><td align="right">Current name:<td align="left"><b>%h(zOldName)</b>
397397
@ <tr><td align="right">New name:<td align="left">
398398
@ <input type="text" size="35" name="newname" value="%h(zNewName)">
399399
@ <tr><td><td>
@@ -431,11 +431,11 @@
431431
style_header("Save Current Skin");
432432
if( ex ){
433433
@ <p><span class="generalError">There is already another skin
434434
@ named "%h(zNewName)". Choose a different name.</span></p>
435435
}
436
- @ <form action="%s(g.zTop)/setup_skin_admin" method="post"><div>
436
+ @ <form action="%R/setup_skin_admin" method="post"><div>
437437
@ <table border="0"><tr>
438438
@ <tr><td align="right">Name for this skin:<td align="left">
439439
@ <input type="text" size="35" name="svname" value="%h(zNewName)">
440440
@ <tr><td><td>
441441
@ <input type="submit" name="save" value="Save">
@@ -484,11 +484,11 @@
484484
485485
if( cgi_csrf_safe(1) ){
486486
/* Process requests to delete a user-defined skin */
487487
if( P("del1") && (zName = skinVarName(P("sn"), 1))!=0 ){
488488
style_header("Confirm Custom Skin Delete");
489
- @ <form action="%s(g.zTop)/setup_skin_admin" method="post"><div>
489
+ @ <form action="%R/setup_skin_admin" method="post"><div>
490490
@ <p>Deletion of a custom skin is a permanent action that cannot
491491
@ be undone. Please confirm that this is what you want to do:</p>
492492
@ <input type="hidden" name="sn" value="%h(P("sn"))" />
493493
@ <input type="submit" name="del2" value="Confirm - Delete The Skin" />
494494
@ <input type="submit" name="cancel" value="Cancel - Do Not Delete" />
@@ -574,11 +574,11 @@
574574
@ <tr><td>%d(i+1).<td>%h(z)<td>&nbsp;&nbsp;<td>
575575
if( fossil_strcmp(aBuiltinSkin[i].zSQL, zCurrent)==0 ){
576576
@ (Currently In Use)
577577
seenCurrent = 1;
578578
}else{
579
- @ <form action="%s(g.zTop)/setup_skin_admin" method="post">
579
+ @ <form action="%R/setup_skin_admin" method="post">
580580
@ <input type="hidden" name="sn" value="%h(z)" />
581581
@ <input type="submit" name="load" value="Install" />
582582
if( pAltSkin==&aBuiltinSkin[i] ){
583583
@ (Current override)
584584
}
@@ -600,11 +600,11 @@
600600
once = 0;
601601
@ <tr><td colspan=4><h2>Skins saved as "skin:*' entries \
602602
@ in the CONFIG table:</h2></td></tr>
603603
}
604604
@ <tr><td>%d(i).<td>%h(zN)<td>&nbsp;&nbsp;<td>
605
- @ <form action="%s(g.zTop)/setup_skin_admin" method="post">
605
+ @ <form action="%R/setup_skin_admin" method="post">
606606
if( fossil_strcmp(zV, zCurrent)==0 ){
607607
@ (Currently In Use)
608608
seenCurrent = 1;
609609
}else{
610610
@ <input type="submit" name="load" value="Install">
@@ -618,11 +618,11 @@
618618
if( !seenCurrent ){
619619
i++;
620620
@ <tr><td colspan=4><h2>Current skin in css/header/footer/details entries \
621621
@ in the CONFIG table:</h2></td></tr>
622622
@ <tr><td>%d(i).<td><i>Current</i><td>&nbsp;&nbsp;<td>
623
- @ <form action="%s(g.zTop)/setup_skin_admin" method="post">
623
+ @ <form action="%R/setup_skin_admin" method="post">
624624
@ <input type="submit" name="save" value="Backup">
625625
@ </form>
626626
}
627627
db_prepare(&q,
628628
"SELECT DISTINCT substr(name, 1, 6) FROM config"
@@ -637,11 +637,11 @@
637637
once = 0;
638638
@ <tr><td colspan=4><h2>Draft skins stored as "draft[1-9]-*' entries \
639639
@ in the CONFIG table:</h2></td></tr>
640640
}
641641
@ <tr><td>%d(i).<td>%h(zN)<td>&nbsp;&nbsp;<td>
642
- @ <form action="%s(g.zTop)/setup_skin_admin" method="post">
642
+ @ <form action="%R/setup_skin_admin" method="post">
643643
@ <input type="submit" name="draftdel" value="Delete">
644644
@ <input type="hidden" name="name" value="%h(zN)">
645645
@ </form></tr>
646646
}
647647
db_finalize(&q);
@@ -798,11 +798,11 @@
798798
style_header("%s", zTitle);
799799
for(j=0; j<count(aSkinAttr); j++){
800800
style_submenu_element(aSkinAttr[j].zSubmenu,
801801
"%R/setup_skinedit?w=%d&basis=%h&sk=%d",j,zBasis,iSkin);
802802
}
803
- @ <form action="%s(g.zTop)/setup_skinedit" method="post"><div>
803
+ @ <form action="%R/setup_skinedit" method="post"><div>
804804
login_insert_csrf_secret();
805805
@ <input type='hidden' name='w' value='%d(ii)'>
806806
@ <input type='hidden' name='sk' value='%d(iSkin)'>
807807
@ <h2>Edit %s(zTitle):</h2>
808808
if( P("submit") && cgi_csrf_safe(0) && strcmp(zOrig,zContent)!=0 ){
809809
--- src/skins.c
+++ src/skins.c
@@ -389,11 +389,11 @@
389 style_header("Rename A Skin");
390 if( ex ){
391 @ <p><span class="generalError">There is already another skin
392 @ named "%h(zNewName)". Choose a different name.</span></p>
393 }
394 @ <form action="%s(g.zTop)/setup_skin_admin" method="post"><div>
395 @ <table border="0"><tr>
396 @ <tr><td align="right">Current name:<td align="left"><b>%h(zOldName)</b>
397 @ <tr><td align="right">New name:<td align="left">
398 @ <input type="text" size="35" name="newname" value="%h(zNewName)">
399 @ <tr><td><td>
@@ -431,11 +431,11 @@
431 style_header("Save Current Skin");
432 if( ex ){
433 @ <p><span class="generalError">There is already another skin
434 @ named "%h(zNewName)". Choose a different name.</span></p>
435 }
436 @ <form action="%s(g.zTop)/setup_skin_admin" method="post"><div>
437 @ <table border="0"><tr>
438 @ <tr><td align="right">Name for this skin:<td align="left">
439 @ <input type="text" size="35" name="svname" value="%h(zNewName)">
440 @ <tr><td><td>
441 @ <input type="submit" name="save" value="Save">
@@ -484,11 +484,11 @@
484
485 if( cgi_csrf_safe(1) ){
486 /* Process requests to delete a user-defined skin */
487 if( P("del1") && (zName = skinVarName(P("sn"), 1))!=0 ){
488 style_header("Confirm Custom Skin Delete");
489 @ <form action="%s(g.zTop)/setup_skin_admin" method="post"><div>
490 @ <p>Deletion of a custom skin is a permanent action that cannot
491 @ be undone. Please confirm that this is what you want to do:</p>
492 @ <input type="hidden" name="sn" value="%h(P("sn"))" />
493 @ <input type="submit" name="del2" value="Confirm - Delete The Skin" />
494 @ <input type="submit" name="cancel" value="Cancel - Do Not Delete" />
@@ -574,11 +574,11 @@
574 @ <tr><td>%d(i+1).<td>%h(z)<td>&nbsp;&nbsp;<td>
575 if( fossil_strcmp(aBuiltinSkin[i].zSQL, zCurrent)==0 ){
576 @ (Currently In Use)
577 seenCurrent = 1;
578 }else{
579 @ <form action="%s(g.zTop)/setup_skin_admin" method="post">
580 @ <input type="hidden" name="sn" value="%h(z)" />
581 @ <input type="submit" name="load" value="Install" />
582 if( pAltSkin==&aBuiltinSkin[i] ){
583 @ (Current override)
584 }
@@ -600,11 +600,11 @@
600 once = 0;
601 @ <tr><td colspan=4><h2>Skins saved as "skin:*' entries \
602 @ in the CONFIG table:</h2></td></tr>
603 }
604 @ <tr><td>%d(i).<td>%h(zN)<td>&nbsp;&nbsp;<td>
605 @ <form action="%s(g.zTop)/setup_skin_admin" method="post">
606 if( fossil_strcmp(zV, zCurrent)==0 ){
607 @ (Currently In Use)
608 seenCurrent = 1;
609 }else{
610 @ <input type="submit" name="load" value="Install">
@@ -618,11 +618,11 @@
618 if( !seenCurrent ){
619 i++;
620 @ <tr><td colspan=4><h2>Current skin in css/header/footer/details entries \
621 @ in the CONFIG table:</h2></td></tr>
622 @ <tr><td>%d(i).<td><i>Current</i><td>&nbsp;&nbsp;<td>
623 @ <form action="%s(g.zTop)/setup_skin_admin" method="post">
624 @ <input type="submit" name="save" value="Backup">
625 @ </form>
626 }
627 db_prepare(&q,
628 "SELECT DISTINCT substr(name, 1, 6) FROM config"
@@ -637,11 +637,11 @@
637 once = 0;
638 @ <tr><td colspan=4><h2>Draft skins stored as "draft[1-9]-*' entries \
639 @ in the CONFIG table:</h2></td></tr>
640 }
641 @ <tr><td>%d(i).<td>%h(zN)<td>&nbsp;&nbsp;<td>
642 @ <form action="%s(g.zTop)/setup_skin_admin" method="post">
643 @ <input type="submit" name="draftdel" value="Delete">
644 @ <input type="hidden" name="name" value="%h(zN)">
645 @ </form></tr>
646 }
647 db_finalize(&q);
@@ -798,11 +798,11 @@
798 style_header("%s", zTitle);
799 for(j=0; j<count(aSkinAttr); j++){
800 style_submenu_element(aSkinAttr[j].zSubmenu,
801 "%R/setup_skinedit?w=%d&basis=%h&sk=%d",j,zBasis,iSkin);
802 }
803 @ <form action="%s(g.zTop)/setup_skinedit" method="post"><div>
804 login_insert_csrf_secret();
805 @ <input type='hidden' name='w' value='%d(ii)'>
806 @ <input type='hidden' name='sk' value='%d(iSkin)'>
807 @ <h2>Edit %s(zTitle):</h2>
808 if( P("submit") && cgi_csrf_safe(0) && strcmp(zOrig,zContent)!=0 ){
809
--- src/skins.c
+++ src/skins.c
@@ -389,11 +389,11 @@
389 style_header("Rename A Skin");
390 if( ex ){
391 @ <p><span class="generalError">There is already another skin
392 @ named "%h(zNewName)". Choose a different name.</span></p>
393 }
394 @ <form action="%R/setup_skin_admin" method="post"><div>
395 @ <table border="0"><tr>
396 @ <tr><td align="right">Current name:<td align="left"><b>%h(zOldName)</b>
397 @ <tr><td align="right">New name:<td align="left">
398 @ <input type="text" size="35" name="newname" value="%h(zNewName)">
399 @ <tr><td><td>
@@ -431,11 +431,11 @@
431 style_header("Save Current Skin");
432 if( ex ){
433 @ <p><span class="generalError">There is already another skin
434 @ named "%h(zNewName)". Choose a different name.</span></p>
435 }
436 @ <form action="%R/setup_skin_admin" method="post"><div>
437 @ <table border="0"><tr>
438 @ <tr><td align="right">Name for this skin:<td align="left">
439 @ <input type="text" size="35" name="svname" value="%h(zNewName)">
440 @ <tr><td><td>
441 @ <input type="submit" name="save" value="Save">
@@ -484,11 +484,11 @@
484
485 if( cgi_csrf_safe(1) ){
486 /* Process requests to delete a user-defined skin */
487 if( P("del1") && (zName = skinVarName(P("sn"), 1))!=0 ){
488 style_header("Confirm Custom Skin Delete");
489 @ <form action="%R/setup_skin_admin" method="post"><div>
490 @ <p>Deletion of a custom skin is a permanent action that cannot
491 @ be undone. Please confirm that this is what you want to do:</p>
492 @ <input type="hidden" name="sn" value="%h(P("sn"))" />
493 @ <input type="submit" name="del2" value="Confirm - Delete The Skin" />
494 @ <input type="submit" name="cancel" value="Cancel - Do Not Delete" />
@@ -574,11 +574,11 @@
574 @ <tr><td>%d(i+1).<td>%h(z)<td>&nbsp;&nbsp;<td>
575 if( fossil_strcmp(aBuiltinSkin[i].zSQL, zCurrent)==0 ){
576 @ (Currently In Use)
577 seenCurrent = 1;
578 }else{
579 @ <form action="%R/setup_skin_admin" method="post">
580 @ <input type="hidden" name="sn" value="%h(z)" />
581 @ <input type="submit" name="load" value="Install" />
582 if( pAltSkin==&aBuiltinSkin[i] ){
583 @ (Current override)
584 }
@@ -600,11 +600,11 @@
600 once = 0;
601 @ <tr><td colspan=4><h2>Skins saved as "skin:*' entries \
602 @ in the CONFIG table:</h2></td></tr>
603 }
604 @ <tr><td>%d(i).<td>%h(zN)<td>&nbsp;&nbsp;<td>
605 @ <form action="%R/setup_skin_admin" method="post">
606 if( fossil_strcmp(zV, zCurrent)==0 ){
607 @ (Currently In Use)
608 seenCurrent = 1;
609 }else{
610 @ <input type="submit" name="load" value="Install">
@@ -618,11 +618,11 @@
618 if( !seenCurrent ){
619 i++;
620 @ <tr><td colspan=4><h2>Current skin in css/header/footer/details entries \
621 @ in the CONFIG table:</h2></td></tr>
622 @ <tr><td>%d(i).<td><i>Current</i><td>&nbsp;&nbsp;<td>
623 @ <form action="%R/setup_skin_admin" method="post">
624 @ <input type="submit" name="save" value="Backup">
625 @ </form>
626 }
627 db_prepare(&q,
628 "SELECT DISTINCT substr(name, 1, 6) FROM config"
@@ -637,11 +637,11 @@
637 once = 0;
638 @ <tr><td colspan=4><h2>Draft skins stored as "draft[1-9]-*' entries \
639 @ in the CONFIG table:</h2></td></tr>
640 }
641 @ <tr><td>%d(i).<td>%h(zN)<td>&nbsp;&nbsp;<td>
642 @ <form action="%R/setup_skin_admin" method="post">
643 @ <input type="submit" name="draftdel" value="Delete">
644 @ <input type="hidden" name="name" value="%h(zN)">
645 @ </form></tr>
646 }
647 db_finalize(&q);
@@ -798,11 +798,11 @@
798 style_header("%s", zTitle);
799 for(j=0; j<count(aSkinAttr); j++){
800 style_submenu_element(aSkinAttr[j].zSubmenu,
801 "%R/setup_skinedit?w=%d&basis=%h&sk=%d",j,zBasis,iSkin);
802 }
803 @ <form action="%R/setup_skinedit" method="post"><div>
804 login_insert_csrf_secret();
805 @ <input type='hidden' name='w' value='%d(ii)'>
806 @ <input type='hidden' name='sk' value='%d(iSkin)'>
807 @ <h2>Edit %s(zTitle):</h2>
808 if( P("submit") && cgi_csrf_safe(0) && strcmp(zOrig,zContent)!=0 ){
809
+1 -1
--- src/timeline.c
+++ src/timeline.c
@@ -204,11 +204,11 @@
204204
}
205205
}
206206
if( cnt ){
207207
@ <hr />
208208
}
209
- @ <form method="post" action="%s(g.zTop)/hash-color-test">
209
+ @ <form method="post" action="%R/hash-color-test">
210210
@ <p>Enter candidate branch names below and see them displayed in their
211211
@ default background colors above.</p>
212212
for(i=0; i<10; i++){
213213
sqlite3_snprintf(sizeof(zNm),zNm,"b%d",i);
214214
zBr = P(zNm);
215215
--- src/timeline.c
+++ src/timeline.c
@@ -204,11 +204,11 @@
204 }
205 }
206 if( cnt ){
207 @ <hr />
208 }
209 @ <form method="post" action="%s(g.zTop)/hash-color-test">
210 @ <p>Enter candidate branch names below and see them displayed in their
211 @ default background colors above.</p>
212 for(i=0; i<10; i++){
213 sqlite3_snprintf(sizeof(zNm),zNm,"b%d",i);
214 zBr = P(zNm);
215
--- src/timeline.c
+++ src/timeline.c
@@ -204,11 +204,11 @@
204 }
205 }
206 if( cnt ){
207 @ <hr />
208 }
209 @ <form method="post" action="%R/hash-color-test">
210 @ <p>Enter candidate branch names below and see them displayed in their
211 @ default background colors above.</p>
212 for(i=0; i<10; i++){
213 sqlite3_snprintf(sizeof(zNm),zNm,"b%d",i);
214 zBr = P(zNm);
215
+16 -18
--- src/tkt.c
+++ src/tkt.c
@@ -543,22 +543,22 @@
543543
int showTimeline = P("tl")!=0;
544544
545545
login_check_credentials();
546546
if( !g.perm.RdTkt ){ login_needed(g.anon.RdTkt); return; }
547547
if( g.anon.WrTkt || g.anon.ApndTkt ){
548
- style_submenu_element("Edit", "%s/tktedit?name=%T", g.zTop, PD("name",""));
548
+ style_submenu_element("Edit", "%R/tktedit?name=%T", PD("name",""));
549549
}
550550
if( g.perm.Hyperlink ){
551
- style_submenu_element("History", "%s/tkthistory/%T", g.zTop, zUuid);
552
- style_submenu_element("Check-ins", "%s/tkttimeline/%T?y=ci", g.zTop, zUuid);
551
+ style_submenu_element("History", "%R/tkthistory/%T", zUuid);
552
+ style_submenu_element("Check-ins", "%R/tkttimeline/%T?y=ci", zUuid);
553553
}
554554
if( g.anon.NewTkt ){
555
- style_submenu_element("New Ticket", "%s/tktnew", g.zTop);
555
+ style_submenu_element("New Ticket", "%R/tktnew");
556556
}
557557
if( g.anon.ApndTkt && g.anon.Attach ){
558
- style_submenu_element("Attach", "%s/attachadd?tkt=%T&from=%s/tktview/%t",
559
- g.zTop, zUuid, g.zTop, zUuid);
558
+ style_submenu_element("Attach", "%R/attachadd?tkt=%T&from=%R/tktview/%t",
559
+ zUuid, zUuid);
560560
}
561561
if( P("plaintext") ){
562562
style_submenu_element("Formatted", "%R/tktview/%s", zUuid);
563563
}else{
564564
style_submenu_element("Plaintext", "%R/tktview/%s?plaintext", zUuid);
@@ -573,11 +573,11 @@
573573
}else{
574574
showTimeline = 0;
575575
}
576576
}
577577
if( !showTimeline && g.perm.Hyperlink ){
578
- style_submenu_element("Timeline", "%s/info/%T", g.zTop, zUuid);
578
+ style_submenu_element("Timeline", "%R/info/%T", zUuid);
579579
}
580580
if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW<br />\n", -1);
581581
ticket_init();
582582
initializeVariablesFromCGI();
583583
getAllTicketFields();
@@ -811,11 +811,11 @@
811811
Th_Store("date", db_text(0, "SELECT datetime('now')"));
812812
Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd,
813813
(void*)&zNewUuid, 0);
814814
if( g.thTrace ) Th_Trace("BEGIN_TKTNEW_SCRIPT<br />\n", -1);
815815
if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zNewUuid ){
816
- cgi_redirect(mprintf("%s/tktview/%s", g.zTop, zNewUuid));
816
+ cgi_redirect(mprintf("%R/tktview/%s", zNewUuid));
817817
return;
818818
}
819819
captcha_generate(0);
820820
@ </form>
821821
if( g.thTrace ) Th_Trace("END_TKTVIEW<br />\n", -1);
@@ -882,11 +882,11 @@
882882
Th_Store("date", db_text(0, "SELECT datetime('now')"));
883883
Th_CreateCommand(g.interp, "append_field", appendRemarkCmd, 0, 0);
884884
Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, (void*)&zName,0);
885885
if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT_SCRIPT<br />\n", -1);
886886
if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zName ){
887
- cgi_redirect(mprintf("%s/tktview/%s", g.zTop, zName));
887
+ cgi_redirect(mprintf("%R/tktview/%s", zName));
888888
return;
889889
}
890890
captcha_generate(0);
891891
@ </form>
892892
if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT<br />\n", -1);
@@ -1000,17 +1000,16 @@
10001000
return;
10011001
}
10021002
zUuid = PD("name","");
10031003
zType = PD("y","a");
10041004
if( zType[0]!='c' ){
1005
- style_submenu_element("Check-ins", "%s/tkttimeline?name=%T&y=ci",
1006
- g.zTop, zUuid);
1005
+ style_submenu_element("Check-ins", "%R/tkttimeline?name=%T&y=ci", zUuid);
10071006
}else{
1008
- style_submenu_element("Timeline", "%s/tkttimeline?name=%T", g.zTop, zUuid);
1007
+ style_submenu_element("Timeline", "%R/tkttimeline?name=%T", zUuid);
10091008
}
1010
- style_submenu_element("History", "%s/tkthistory/%s", g.zTop, zUuid);
1011
- style_submenu_element("Status", "%s/info/%s", g.zTop, zUuid);
1009
+ style_submenu_element("History", "%R/tkthistory/%s", zUuid);
1010
+ style_submenu_element("Status", "%R/info/%s", zUuid);
10121011
if( zType[0]=='c' ){
10131012
zTitle = mprintf("Check-ins Associated With Ticket %h", zUuid);
10141013
}else{
10151014
zTitle = mprintf("Timeline Of Ticket %h", zUuid);
10161015
}
@@ -1053,14 +1052,13 @@
10531052
login_needed(g.anon.Hyperlink && g.anon.RdTkt);
10541053
return;
10551054
}
10561055
zUuid = PD("name","");
10571056
zTitle = mprintf("History Of Ticket %h", zUuid);
1058
- style_submenu_element("Status", "%s/info/%s", g.zTop, zUuid);
1059
- style_submenu_element("Check-ins", "%s/tkttimeline?name=%s&y=ci",
1060
- g.zTop, zUuid);
1061
- style_submenu_element("Timeline", "%s/tkttimeline?name=%s", g.zTop, zUuid);
1057
+ style_submenu_element("Status", "%R/info/%s", zUuid);
1058
+ style_submenu_element("Check-ins", "%R/tkttimeline?name=%s&y=ci", zUuid);
1059
+ style_submenu_element("Timeline", "%R/tkttimeline?name=%s", zUuid);
10621060
if( P("raw")!=0 ){
10631061
style_submenu_element("Decoded", "%R/tkthistory/%s", zUuid);
10641062
}else if( g.perm.Admin ){
10651063
style_submenu_element("Raw", "%R/tkthistory/%s?raw", zUuid);
10661064
}
10671065
--- src/tkt.c
+++ src/tkt.c
@@ -543,22 +543,22 @@
543 int showTimeline = P("tl")!=0;
544
545 login_check_credentials();
546 if( !g.perm.RdTkt ){ login_needed(g.anon.RdTkt); return; }
547 if( g.anon.WrTkt || g.anon.ApndTkt ){
548 style_submenu_element("Edit", "%s/tktedit?name=%T", g.zTop, PD("name",""));
549 }
550 if( g.perm.Hyperlink ){
551 style_submenu_element("History", "%s/tkthistory/%T", g.zTop, zUuid);
552 style_submenu_element("Check-ins", "%s/tkttimeline/%T?y=ci", g.zTop, zUuid);
553 }
554 if( g.anon.NewTkt ){
555 style_submenu_element("New Ticket", "%s/tktnew", g.zTop);
556 }
557 if( g.anon.ApndTkt && g.anon.Attach ){
558 style_submenu_element("Attach", "%s/attachadd?tkt=%T&from=%s/tktview/%t",
559 g.zTop, zUuid, g.zTop, zUuid);
560 }
561 if( P("plaintext") ){
562 style_submenu_element("Formatted", "%R/tktview/%s", zUuid);
563 }else{
564 style_submenu_element("Plaintext", "%R/tktview/%s?plaintext", zUuid);
@@ -573,11 +573,11 @@
573 }else{
574 showTimeline = 0;
575 }
576 }
577 if( !showTimeline && g.perm.Hyperlink ){
578 style_submenu_element("Timeline", "%s/info/%T", g.zTop, zUuid);
579 }
580 if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW<br />\n", -1);
581 ticket_init();
582 initializeVariablesFromCGI();
583 getAllTicketFields();
@@ -811,11 +811,11 @@
811 Th_Store("date", db_text(0, "SELECT datetime('now')"));
812 Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd,
813 (void*)&zNewUuid, 0);
814 if( g.thTrace ) Th_Trace("BEGIN_TKTNEW_SCRIPT<br />\n", -1);
815 if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zNewUuid ){
816 cgi_redirect(mprintf("%s/tktview/%s", g.zTop, zNewUuid));
817 return;
818 }
819 captcha_generate(0);
820 @ </form>
821 if( g.thTrace ) Th_Trace("END_TKTVIEW<br />\n", -1);
@@ -882,11 +882,11 @@
882 Th_Store("date", db_text(0, "SELECT datetime('now')"));
883 Th_CreateCommand(g.interp, "append_field", appendRemarkCmd, 0, 0);
884 Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, (void*)&zName,0);
885 if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT_SCRIPT<br />\n", -1);
886 if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zName ){
887 cgi_redirect(mprintf("%s/tktview/%s", g.zTop, zName));
888 return;
889 }
890 captcha_generate(0);
891 @ </form>
892 if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT<br />\n", -1);
@@ -1000,17 +1000,16 @@
1000 return;
1001 }
1002 zUuid = PD("name","");
1003 zType = PD("y","a");
1004 if( zType[0]!='c' ){
1005 style_submenu_element("Check-ins", "%s/tkttimeline?name=%T&y=ci",
1006 g.zTop, zUuid);
1007 }else{
1008 style_submenu_element("Timeline", "%s/tkttimeline?name=%T", g.zTop, zUuid);
1009 }
1010 style_submenu_element("History", "%s/tkthistory/%s", g.zTop, zUuid);
1011 style_submenu_element("Status", "%s/info/%s", g.zTop, zUuid);
1012 if( zType[0]=='c' ){
1013 zTitle = mprintf("Check-ins Associated With Ticket %h", zUuid);
1014 }else{
1015 zTitle = mprintf("Timeline Of Ticket %h", zUuid);
1016 }
@@ -1053,14 +1052,13 @@
1053 login_needed(g.anon.Hyperlink && g.anon.RdTkt);
1054 return;
1055 }
1056 zUuid = PD("name","");
1057 zTitle = mprintf("History Of Ticket %h", zUuid);
1058 style_submenu_element("Status", "%s/info/%s", g.zTop, zUuid);
1059 style_submenu_element("Check-ins", "%s/tkttimeline?name=%s&y=ci",
1060 g.zTop, zUuid);
1061 style_submenu_element("Timeline", "%s/tkttimeline?name=%s", g.zTop, zUuid);
1062 if( P("raw")!=0 ){
1063 style_submenu_element("Decoded", "%R/tkthistory/%s", zUuid);
1064 }else if( g.perm.Admin ){
1065 style_submenu_element("Raw", "%R/tkthistory/%s?raw", zUuid);
1066 }
1067
--- src/tkt.c
+++ src/tkt.c
@@ -543,22 +543,22 @@
543 int showTimeline = P("tl")!=0;
544
545 login_check_credentials();
546 if( !g.perm.RdTkt ){ login_needed(g.anon.RdTkt); return; }
547 if( g.anon.WrTkt || g.anon.ApndTkt ){
548 style_submenu_element("Edit", "%R/tktedit?name=%T", PD("name",""));
549 }
550 if( g.perm.Hyperlink ){
551 style_submenu_element("History", "%R/tkthistory/%T", zUuid);
552 style_submenu_element("Check-ins", "%R/tkttimeline/%T?y=ci", zUuid);
553 }
554 if( g.anon.NewTkt ){
555 style_submenu_element("New Ticket", "%R/tktnew");
556 }
557 if( g.anon.ApndTkt && g.anon.Attach ){
558 style_submenu_element("Attach", "%R/attachadd?tkt=%T&from=%R/tktview/%t",
559 zUuid, zUuid);
560 }
561 if( P("plaintext") ){
562 style_submenu_element("Formatted", "%R/tktview/%s", zUuid);
563 }else{
564 style_submenu_element("Plaintext", "%R/tktview/%s?plaintext", zUuid);
@@ -573,11 +573,11 @@
573 }else{
574 showTimeline = 0;
575 }
576 }
577 if( !showTimeline && g.perm.Hyperlink ){
578 style_submenu_element("Timeline", "%R/info/%T", zUuid);
579 }
580 if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW<br />\n", -1);
581 ticket_init();
582 initializeVariablesFromCGI();
583 getAllTicketFields();
@@ -811,11 +811,11 @@
811 Th_Store("date", db_text(0, "SELECT datetime('now')"));
812 Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd,
813 (void*)&zNewUuid, 0);
814 if( g.thTrace ) Th_Trace("BEGIN_TKTNEW_SCRIPT<br />\n", -1);
815 if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zNewUuid ){
816 cgi_redirect(mprintf("%R/tktview/%s", zNewUuid));
817 return;
818 }
819 captcha_generate(0);
820 @ </form>
821 if( g.thTrace ) Th_Trace("END_TKTVIEW<br />\n", -1);
@@ -882,11 +882,11 @@
882 Th_Store("date", db_text(0, "SELECT datetime('now')"));
883 Th_CreateCommand(g.interp, "append_field", appendRemarkCmd, 0, 0);
884 Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, (void*)&zName,0);
885 if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT_SCRIPT<br />\n", -1);
886 if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zName ){
887 cgi_redirect(mprintf("%R/tktview/%s", zName));
888 return;
889 }
890 captcha_generate(0);
891 @ </form>
892 if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT<br />\n", -1);
@@ -1000,17 +1000,16 @@
1000 return;
1001 }
1002 zUuid = PD("name","");
1003 zType = PD("y","a");
1004 if( zType[0]!='c' ){
1005 style_submenu_element("Check-ins", "%R/tkttimeline?name=%T&y=ci", zUuid);
 
1006 }else{
1007 style_submenu_element("Timeline", "%R/tkttimeline?name=%T", zUuid);
1008 }
1009 style_submenu_element("History", "%R/tkthistory/%s", zUuid);
1010 style_submenu_element("Status", "%R/info/%s", zUuid);
1011 if( zType[0]=='c' ){
1012 zTitle = mprintf("Check-ins Associated With Ticket %h", zUuid);
1013 }else{
1014 zTitle = mprintf("Timeline Of Ticket %h", zUuid);
1015 }
@@ -1053,14 +1052,13 @@
1052 login_needed(g.anon.Hyperlink && g.anon.RdTkt);
1053 return;
1054 }
1055 zUuid = PD("name","");
1056 zTitle = mprintf("History Of Ticket %h", zUuid);
1057 style_submenu_element("Status", "%R/info/%s", zUuid);
1058 style_submenu_element("Check-ins", "%R/tkttimeline?name=%s&y=ci", zUuid);
1059 style_submenu_element("Timeline", "%R/tkttimeline?name=%s", zUuid);
 
1060 if( P("raw")!=0 ){
1061 style_submenu_element("Decoded", "%R/tkthistory/%s", zUuid);
1062 }else if( g.perm.Admin ){
1063 style_submenu_element("Raw", "%R/tkthistory/%s?raw", zUuid);
1064 }
1065
+2 -2
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -148,11 +148,11 @@
148148
db_set(zDbField, z, 0);
149149
if( xRebuild ) xRebuild();
150150
cgi_redirect("tktsetup");
151151
}
152152
}
153
- @ <form action="%s(g.zTop)/%s(g.zPath)" method="post"><div>
153
+ @ <form action="%R/%s(g.zPath)" method="post"><div>
154154
login_insert_csrf_secret();
155155
@ <p>%s(zDesc)</p>
156156
@ <textarea name="x" rows="%d(height)" cols="80">%h(z)</textarea>
157157
@ <blockquote><p>
158158
@ <input type="submit" name="submit" value="Apply Changes" />
@@ -903,11 +903,11 @@
903903
if( P("setup") ){
904904
cgi_redirect("tktsetup");
905905
}
906906
style_header("Ticket Display On Timelines");
907907
db_begin_transaction();
908
- @ <form action="%s(g.zTop)/tktsetup_timeline" method="post"><div>
908
+ @ <form action="%R/tktsetup_timeline" method="post"><div>
909909
login_insert_csrf_secret();
910910
911911
@ <hr />
912912
entry_attribute("Ticket Title", 40, "ticket-title-expr", "t",
913913
"title", 0);
914914
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -148,11 +148,11 @@
148 db_set(zDbField, z, 0);
149 if( xRebuild ) xRebuild();
150 cgi_redirect("tktsetup");
151 }
152 }
153 @ <form action="%s(g.zTop)/%s(g.zPath)" method="post"><div>
154 login_insert_csrf_secret();
155 @ <p>%s(zDesc)</p>
156 @ <textarea name="x" rows="%d(height)" cols="80">%h(z)</textarea>
157 @ <blockquote><p>
158 @ <input type="submit" name="submit" value="Apply Changes" />
@@ -903,11 +903,11 @@
903 if( P("setup") ){
904 cgi_redirect("tktsetup");
905 }
906 style_header("Ticket Display On Timelines");
907 db_begin_transaction();
908 @ <form action="%s(g.zTop)/tktsetup_timeline" method="post"><div>
909 login_insert_csrf_secret();
910
911 @ <hr />
912 entry_attribute("Ticket Title", 40, "ticket-title-expr", "t",
913 "title", 0);
914
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -148,11 +148,11 @@
148 db_set(zDbField, z, 0);
149 if( xRebuild ) xRebuild();
150 cgi_redirect("tktsetup");
151 }
152 }
153 @ <form action="%R/%s(g.zPath)" method="post"><div>
154 login_insert_csrf_secret();
155 @ <p>%s(zDesc)</p>
156 @ <textarea name="x" rows="%d(height)" cols="80">%h(z)</textarea>
157 @ <blockquote><p>
158 @ <input type="submit" name="submit" value="Apply Changes" />
@@ -903,11 +903,11 @@
903 if( P("setup") ){
904 cgi_redirect("tktsetup");
905 }
906 style_header("Ticket Display On Timelines");
907 db_begin_transaction();
908 @ <form action="%R/tktsetup_timeline" method="post"><div>
909 login_insert_csrf_secret();
910
911 @ <hr />
912 entry_attribute("Ticket Title", 40, "ticket-title-expr", "t",
913 "title", 0);
914
+1 -1
--- src/url.c
+++ src/url.c
@@ -540,11 +540,11 @@
540540
){
541541
const char *zSep = "?";
542542
int i;
543543
544544
blob_reset(&p->url);
545
- blob_appendf(&p->url, "%s/%s", g.zTop, p->zBase);
545
+ blob_appendf(&p->url, "%R/%s", p->zBase);
546546
for(i=0; i<p->nParam; i++){
547547
const char *z = p->azValue[i];
548548
if( zName1 && fossil_strcmp(zName1,p->azName[i])==0 ){
549549
zName1 = 0;
550550
z = zValue1;
551551
--- src/url.c
+++ src/url.c
@@ -540,11 +540,11 @@
540 ){
541 const char *zSep = "?";
542 int i;
543
544 blob_reset(&p->url);
545 blob_appendf(&p->url, "%s/%s", g.zTop, p->zBase);
546 for(i=0; i<p->nParam; i++){
547 const char *z = p->azValue[i];
548 if( zName1 && fossil_strcmp(zName1,p->azName[i])==0 ){
549 zName1 = 0;
550 z = zValue1;
551
--- src/url.c
+++ src/url.c
@@ -540,11 +540,11 @@
540 ){
541 const char *zSep = "?";
542 int i;
543
544 blob_reset(&p->url);
545 blob_appendf(&p->url, "%R/%s", p->zBase);
546 for(i=0; i<p->nParam; i++){
547 const char *z = p->azValue[i];
548 if( zName1 && fossil_strcmp(zName1,p->azName[i])==0 ){
549 zName1 = 0;
550 z = zValue1;
551
+13 -13
--- src/user.c
+++ src/user.c
@@ -657,28 +657,28 @@
657657
create_accesslog_table();
658658
659659
660660
if( P("delall") && P("delallbtn") ){
661661
db_multi_exec("DELETE FROM accesslog");
662
- cgi_redirectf("%s/access_log?y=%d&n=%d&o=%o", g.zTop, y, n, skip);
662
+ cgi_redirectf("%R/access_log?y=%d&n=%d&o=%o", y, n, skip);
663663
return;
664664
}
665665
if( P("delanon") && P("delanonbtn") ){
666666
db_multi_exec("DELETE FROM accesslog WHERE uname='anonymous'");
667
- cgi_redirectf("%s/access_log?y=%d&n=%d&o=%o", g.zTop, y, n, skip);
667
+ cgi_redirectf("%R/access_log?y=%d&n=%d&o=%o", y, n, skip);
668668
return;
669669
}
670670
if( P("delfail") && P("delfailbtn") ){
671671
db_multi_exec("DELETE FROM accesslog WHERE NOT success");
672
- cgi_redirectf("%s/access_log?y=%d&n=%d&o=%o", g.zTop, y, n, skip);
672
+ cgi_redirectf("%R/access_log?y=%d&n=%d&o=%o", y, n, skip);
673673
return;
674674
}
675675
if( P("delold") && P("deloldbtn") ){
676676
db_multi_exec("DELETE FROM accesslog WHERE rowid in"
677677
"(SELECT rowid FROM accesslog ORDER BY rowid DESC"
678678
" LIMIT -1 OFFSET 200)");
679
- cgi_redirectf("%s/access_log?y=%d&n=%d", g.zTop, y, n);
679
+ cgi_redirectf("%R/access_log?y=%d&n=%d", y, n);
680680
return;
681681
}
682682
style_header("Access Log");
683683
blob_zero(&sql);
684684
blob_append_sql(&sql,
@@ -694,12 +694,12 @@
694694
}else if( y==2 ){
695695
blob_append(&sql, " WHERE NOT success", -1);
696696
}
697697
blob_append_sql(&sql," ORDER BY rowid DESC LIMIT %d OFFSET %d", n+1, skip);
698698
if( skip ){
699
- style_submenu_element("Newer", "%s/access_log?o=%d&n=%d&y=%d",
700
- g.zTop, skip>=n ? skip-n : 0, n, y);
699
+ style_submenu_element("Newer", "%R/access_log?o=%d&n=%d&y=%d",
700
+ skip>=n ? skip-n : 0, n, y);
701701
}
702702
rc = db_prepare_ignore_error(&q, "%s", blob_sql_text(&sql));
703703
fLogEnabled = db_get_boolean("access-log", 0);
704704
@ <div align="center">Access logging is %s(fLogEnabled?"on":"off").
705705
@ (Change this on the <a href="setup_settings">settings</a> page.)</div>
@@ -712,12 +712,12 @@
712712
const char *zIP = db_column_text(&q, 1);
713713
const char *zDate = db_column_text(&q, 2);
714714
int bSuccess = db_column_int(&q, 3);
715715
cnt++;
716716
if( cnt>n ){
717
- style_submenu_element("Older", "%s/access_log?o=%d&n=%d&y=%d",
718
- g.zTop, skip+n, n, y);
717
+ style_submenu_element("Older", "%R/access_log?o=%d&n=%d&y=%d",
718
+ skip+n, n, y);
719719
break;
720720
}
721721
if( bSuccess ){
722722
@ <tr>
723723
}else{
@@ -724,33 +724,33 @@
724724
@ <tr bgcolor="#ffacc0">
725725
}
726726
@ <td>%s(zDate)</td><td>%h(zName)</td><td>%h(zIP)</td></tr>
727727
}
728728
if( skip>0 || cnt>n ){
729
- style_submenu_element("All", "%s/access_log?n=10000000", g.zTop);
729
+ style_submenu_element("All", "%R/access_log?n=10000000");
730730
}
731731
@ </tbody></table>
732732
db_finalize(&q);
733733
@ <hr />
734
- @ <form method="post" action="%s(g.zTop)/access_log">
734
+ @ <form method="post" action="%R/access_log">
735735
@ <label><input type="checkbox" name="delold">
736736
@ Delete all but the most recent 200 entries</input></label>
737737
@ <input type="submit" name="deloldbtn" value="Delete"></input>
738738
@ </form>
739
- @ <form method="post" action="%s(g.zTop)/access_log">
739
+ @ <form method="post" action="%R/access_log">
740740
@ <label><input type="checkbox" name="delanon">
741741
@ Delete all entries for user "anonymous"</input></label>
742742
@ <input type="submit" name="delanonbtn" value="Delete"></input>
743743
@ </form>
744
- @ <form method="post" action="%s(g.zTop)/access_log">
744
+ @ <form method="post" action="%R/access_log">
745745
@ <label><input type="checkbox" name="delfail">
746746
@ Delete all failed login attempts</input></label>
747747
@ <input type="submit" name="delfailbtn" value="Delete"></input>
748748
@ </form>
749
- @ <form method="post" action="%s(g.zTop)/access_log">
749
+ @ <form method="post" action="%R/access_log">
750750
@ <label><input type="checkbox" name="delall">
751751
@ Delete all entries</input></label>
752752
@ <input type="submit" name="delallbtn" value="Delete"></input>
753753
@ </form>
754754
style_table_sorter();
755755
style_footer();
756756
}
757757
--- src/user.c
+++ src/user.c
@@ -657,28 +657,28 @@
657 create_accesslog_table();
658
659
660 if( P("delall") && P("delallbtn") ){
661 db_multi_exec("DELETE FROM accesslog");
662 cgi_redirectf("%s/access_log?y=%d&n=%d&o=%o", g.zTop, y, n, skip);
663 return;
664 }
665 if( P("delanon") && P("delanonbtn") ){
666 db_multi_exec("DELETE FROM accesslog WHERE uname='anonymous'");
667 cgi_redirectf("%s/access_log?y=%d&n=%d&o=%o", g.zTop, y, n, skip);
668 return;
669 }
670 if( P("delfail") && P("delfailbtn") ){
671 db_multi_exec("DELETE FROM accesslog WHERE NOT success");
672 cgi_redirectf("%s/access_log?y=%d&n=%d&o=%o", g.zTop, y, n, skip);
673 return;
674 }
675 if( P("delold") && P("deloldbtn") ){
676 db_multi_exec("DELETE FROM accesslog WHERE rowid in"
677 "(SELECT rowid FROM accesslog ORDER BY rowid DESC"
678 " LIMIT -1 OFFSET 200)");
679 cgi_redirectf("%s/access_log?y=%d&n=%d", g.zTop, y, n);
680 return;
681 }
682 style_header("Access Log");
683 blob_zero(&sql);
684 blob_append_sql(&sql,
@@ -694,12 +694,12 @@
694 }else if( y==2 ){
695 blob_append(&sql, " WHERE NOT success", -1);
696 }
697 blob_append_sql(&sql," ORDER BY rowid DESC LIMIT %d OFFSET %d", n+1, skip);
698 if( skip ){
699 style_submenu_element("Newer", "%s/access_log?o=%d&n=%d&y=%d",
700 g.zTop, skip>=n ? skip-n : 0, n, y);
701 }
702 rc = db_prepare_ignore_error(&q, "%s", blob_sql_text(&sql));
703 fLogEnabled = db_get_boolean("access-log", 0);
704 @ <div align="center">Access logging is %s(fLogEnabled?"on":"off").
705 @ (Change this on the <a href="setup_settings">settings</a> page.)</div>
@@ -712,12 +712,12 @@
712 const char *zIP = db_column_text(&q, 1);
713 const char *zDate = db_column_text(&q, 2);
714 int bSuccess = db_column_int(&q, 3);
715 cnt++;
716 if( cnt>n ){
717 style_submenu_element("Older", "%s/access_log?o=%d&n=%d&y=%d",
718 g.zTop, skip+n, n, y);
719 break;
720 }
721 if( bSuccess ){
722 @ <tr>
723 }else{
@@ -724,33 +724,33 @@
724 @ <tr bgcolor="#ffacc0">
725 }
726 @ <td>%s(zDate)</td><td>%h(zName)</td><td>%h(zIP)</td></tr>
727 }
728 if( skip>0 || cnt>n ){
729 style_submenu_element("All", "%s/access_log?n=10000000", g.zTop);
730 }
731 @ </tbody></table>
732 db_finalize(&q);
733 @ <hr />
734 @ <form method="post" action="%s(g.zTop)/access_log">
735 @ <label><input type="checkbox" name="delold">
736 @ Delete all but the most recent 200 entries</input></label>
737 @ <input type="submit" name="deloldbtn" value="Delete"></input>
738 @ </form>
739 @ <form method="post" action="%s(g.zTop)/access_log">
740 @ <label><input type="checkbox" name="delanon">
741 @ Delete all entries for user "anonymous"</input></label>
742 @ <input type="submit" name="delanonbtn" value="Delete"></input>
743 @ </form>
744 @ <form method="post" action="%s(g.zTop)/access_log">
745 @ <label><input type="checkbox" name="delfail">
746 @ Delete all failed login attempts</input></label>
747 @ <input type="submit" name="delfailbtn" value="Delete"></input>
748 @ </form>
749 @ <form method="post" action="%s(g.zTop)/access_log">
750 @ <label><input type="checkbox" name="delall">
751 @ Delete all entries</input></label>
752 @ <input type="submit" name="delallbtn" value="Delete"></input>
753 @ </form>
754 style_table_sorter();
755 style_footer();
756 }
757
--- src/user.c
+++ src/user.c
@@ -657,28 +657,28 @@
657 create_accesslog_table();
658
659
660 if( P("delall") && P("delallbtn") ){
661 db_multi_exec("DELETE FROM accesslog");
662 cgi_redirectf("%R/access_log?y=%d&n=%d&o=%o", y, n, skip);
663 return;
664 }
665 if( P("delanon") && P("delanonbtn") ){
666 db_multi_exec("DELETE FROM accesslog WHERE uname='anonymous'");
667 cgi_redirectf("%R/access_log?y=%d&n=%d&o=%o", y, n, skip);
668 return;
669 }
670 if( P("delfail") && P("delfailbtn") ){
671 db_multi_exec("DELETE FROM accesslog WHERE NOT success");
672 cgi_redirectf("%R/access_log?y=%d&n=%d&o=%o", y, n, skip);
673 return;
674 }
675 if( P("delold") && P("deloldbtn") ){
676 db_multi_exec("DELETE FROM accesslog WHERE rowid in"
677 "(SELECT rowid FROM accesslog ORDER BY rowid DESC"
678 " LIMIT -1 OFFSET 200)");
679 cgi_redirectf("%R/access_log?y=%d&n=%d", y, n);
680 return;
681 }
682 style_header("Access Log");
683 blob_zero(&sql);
684 blob_append_sql(&sql,
@@ -694,12 +694,12 @@
694 }else if( y==2 ){
695 blob_append(&sql, " WHERE NOT success", -1);
696 }
697 blob_append_sql(&sql," ORDER BY rowid DESC LIMIT %d OFFSET %d", n+1, skip);
698 if( skip ){
699 style_submenu_element("Newer", "%R/access_log?o=%d&n=%d&y=%d",
700 skip>=n ? skip-n : 0, n, y);
701 }
702 rc = db_prepare_ignore_error(&q, "%s", blob_sql_text(&sql));
703 fLogEnabled = db_get_boolean("access-log", 0);
704 @ <div align="center">Access logging is %s(fLogEnabled?"on":"off").
705 @ (Change this on the <a href="setup_settings">settings</a> page.)</div>
@@ -712,12 +712,12 @@
712 const char *zIP = db_column_text(&q, 1);
713 const char *zDate = db_column_text(&q, 2);
714 int bSuccess = db_column_int(&q, 3);
715 cnt++;
716 if( cnt>n ){
717 style_submenu_element("Older", "%R/access_log?o=%d&n=%d&y=%d",
718 skip+n, n, y);
719 break;
720 }
721 if( bSuccess ){
722 @ <tr>
723 }else{
@@ -724,33 +724,33 @@
724 @ <tr bgcolor="#ffacc0">
725 }
726 @ <td>%s(zDate)</td><td>%h(zName)</td><td>%h(zIP)</td></tr>
727 }
728 if( skip>0 || cnt>n ){
729 style_submenu_element("All", "%R/access_log?n=10000000");
730 }
731 @ </tbody></table>
732 db_finalize(&q);
733 @ <hr />
734 @ <form method="post" action="%R/access_log">
735 @ <label><input type="checkbox" name="delold">
736 @ Delete all but the most recent 200 entries</input></label>
737 @ <input type="submit" name="deloldbtn" value="Delete"></input>
738 @ </form>
739 @ <form method="post" action="%R/access_log">
740 @ <label><input type="checkbox" name="delanon">
741 @ Delete all entries for user "anonymous"</input></label>
742 @ <input type="submit" name="delanonbtn" value="Delete"></input>
743 @ </form>
744 @ <form method="post" action="%R/access_log">
745 @ <label><input type="checkbox" name="delfail">
746 @ Delete all failed login attempts</input></label>
747 @ <input type="submit" name="delfailbtn" value="Delete"></input>
748 @ </form>
749 @ <form method="post" action="%R/access_log">
750 @ <label><input type="checkbox" name="delall">
751 @ Delete all entries</input></label>
752 @ <input type="submit" name="delallbtn" value="Delete"></input>
753 @ </form>
754 style_table_sorter();
755 style_footer();
756 }
757
+4 -4
--- src/wiki.c
+++ src/wiki.c
@@ -121,14 +121,14 @@
121121
while( zIndexPage[0]=='/' ) zIndexPage++;
122122
while( zPathInfo[0]=='/' ) zPathInfo++;
123123
if( fossil_strcmp(zIndexPage, zPathInfo)==0 ) zIndexPage = 0;
124124
}
125125
if( zIndexPage ){
126
- cgi_redirectf("%s/%s", g.zTop, zIndexPage);
126
+ cgi_redirectf("%R/%s", zIndexPage);
127127
}
128128
if( !g.perm.RdWiki ){
129
- cgi_redirectf("%s/login?g=%s/home", g.zTop, g.zTop);
129
+ cgi_redirectf("%R/login?g=%R/home");
130130
}
131131
if( zPageName ){
132132
login_check_credentials();
133133
g.zExtra = zPageName;
134134
cgi_set_parameter_nocopy("name", g.zExtra, 1);
@@ -1688,13 +1688,13 @@
16881688
16891689
login_check_credentials();
16901690
if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
16911691
style_header("Available Wiki Pages");
16921692
if( showAll ){
1693
- style_submenu_element("Active", "%s/wcontent", g.zTop);
1693
+ style_submenu_element("Active", "%R/wcontent");
16941694
}else{
1695
- style_submenu_element("All", "%s/wcontent?all=1", g.zTop);
1695
+ style_submenu_element("All", "%R/wcontent?all=1");
16961696
}
16971697
wiki_standard_submenu(W_ALL_BUT(W_LIST));
16981698
db_prepare(&q, listAllWikiPages/*works-like:""*/);
16991699
@ <div class="brlist">
17001700
@ <table class='sortable' data-column-types='tKN' data-init-sort='1'>
17011701
--- src/wiki.c
+++ src/wiki.c
@@ -121,14 +121,14 @@
121 while( zIndexPage[0]=='/' ) zIndexPage++;
122 while( zPathInfo[0]=='/' ) zPathInfo++;
123 if( fossil_strcmp(zIndexPage, zPathInfo)==0 ) zIndexPage = 0;
124 }
125 if( zIndexPage ){
126 cgi_redirectf("%s/%s", g.zTop, zIndexPage);
127 }
128 if( !g.perm.RdWiki ){
129 cgi_redirectf("%s/login?g=%s/home", g.zTop, g.zTop);
130 }
131 if( zPageName ){
132 login_check_credentials();
133 g.zExtra = zPageName;
134 cgi_set_parameter_nocopy("name", g.zExtra, 1);
@@ -1688,13 +1688,13 @@
1688
1689 login_check_credentials();
1690 if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
1691 style_header("Available Wiki Pages");
1692 if( showAll ){
1693 style_submenu_element("Active", "%s/wcontent", g.zTop);
1694 }else{
1695 style_submenu_element("All", "%s/wcontent?all=1", g.zTop);
1696 }
1697 wiki_standard_submenu(W_ALL_BUT(W_LIST));
1698 db_prepare(&q, listAllWikiPages/*works-like:""*/);
1699 @ <div class="brlist">
1700 @ <table class='sortable' data-column-types='tKN' data-init-sort='1'>
1701
--- src/wiki.c
+++ src/wiki.c
@@ -121,14 +121,14 @@
121 while( zIndexPage[0]=='/' ) zIndexPage++;
122 while( zPathInfo[0]=='/' ) zPathInfo++;
123 if( fossil_strcmp(zIndexPage, zPathInfo)==0 ) zIndexPage = 0;
124 }
125 if( zIndexPage ){
126 cgi_redirectf("%R/%s", zIndexPage);
127 }
128 if( !g.perm.RdWiki ){
129 cgi_redirectf("%R/login?g=%R/home");
130 }
131 if( zPageName ){
132 login_check_credentials();
133 g.zExtra = zPageName;
134 cgi_set_parameter_nocopy("name", g.zExtra, 1);
@@ -1688,13 +1688,13 @@
1688
1689 login_check_credentials();
1690 if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
1691 style_header("Available Wiki Pages");
1692 if( showAll ){
1693 style_submenu_element("Active", "%R/wcontent");
1694 }else{
1695 style_submenu_element("All", "%R/wcontent?all=1");
1696 }
1697 wiki_standard_submenu(W_ALL_BUT(W_LIST));
1698 db_prepare(&q, listAllWikiPages/*works-like:""*/);
1699 @ <div class="brlist">
1700 @ <table class='sortable' data-column-types='tKN' data-init-sort='1'>
1701
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -867,11 +867,11 @@
867867
for(i=0; i<p->nAttr; i++){
868868
blob_appendf(pOut, " %s", aAttribute[p->aAttr[i].iACode].zName);
869869
if( p->aAttr[i].zValue ){
870870
const char *zVal = p->aAttr[i].zValue;
871871
if( p->aAttr[i].iACode==ATTR_SRC && zVal[0]=='/' ){
872
- blob_appendf(pOut, "=\"%s%s\"", g.zTop, zVal);
872
+ blob_appendf(pOut, "=\"%R%s\"", zVal);
873873
}else{
874874
blob_appendf(pOut, "=\"%s\"", zVal);
875875
}
876876
}
877877
}
878878
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -867,11 +867,11 @@
867 for(i=0; i<p->nAttr; i++){
868 blob_appendf(pOut, " %s", aAttribute[p->aAttr[i].iACode].zName);
869 if( p->aAttr[i].zValue ){
870 const char *zVal = p->aAttr[i].zValue;
871 if( p->aAttr[i].iACode==ATTR_SRC && zVal[0]=='/' ){
872 blob_appendf(pOut, "=\"%s%s\"", g.zTop, zVal);
873 }else{
874 blob_appendf(pOut, "=\"%s\"", zVal);
875 }
876 }
877 }
878
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -867,11 +867,11 @@
867 for(i=0; i<p->nAttr; i++){
868 blob_appendf(pOut, " %s", aAttribute[p->aAttr[i].iACode].zName);
869 if( p->aAttr[i].zValue ){
870 const char *zVal = p->aAttr[i].zValue;
871 if( p->aAttr[i].iACode==ATTR_SRC && zVal[0]=='/' ){
872 blob_appendf(pOut, "=\"%R%s\"", zVal);
873 }else{
874 blob_appendf(pOut, "=\"%s\"", zVal);
875 }
876 }
877 }
878
+2 -2
--- src/xfersetup.c
+++ src/xfersetup.c
@@ -71,11 +71,11 @@
7171
@
7272
@ <big><b>%h(zWarning)</b></big>
7373
free(zWarning);
7474
}
7575
@
76
- @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div>
76
+ @ <form method="post" action="%R/%s(g.zPath)"><div>
7777
login_insert_csrf_secret();
7878
@ <input type="submit" name="sync" value="%h(zButton)" />
7979
@ </div></form>
8080
@
8181
if( P("sync") ){
@@ -133,11 +133,11 @@
133133
db_set(zDbField, z, 0);
134134
if( xRebuild ) xRebuild();
135135
cgi_redirect("xfersetup");
136136
}
137137
}
138
- @ <form action="%s(g.zTop)/%s(g.zPath)" method="post"><div>
138
+ @ <form action="%R/%s(g.zPath)" method="post"><div>
139139
login_insert_csrf_secret();
140140
@ <p>%s(zDesc)</p>
141141
@ <textarea name="x" rows="%d(height)" cols="80">%h(z)</textarea>
142142
@ <p>
143143
@ <input type="submit" name="submit" value="Apply Changes" />
144144
--- src/xfersetup.c
+++ src/xfersetup.c
@@ -71,11 +71,11 @@
71 @
72 @ <big><b>%h(zWarning)</b></big>
73 free(zWarning);
74 }
75 @
76 @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div>
77 login_insert_csrf_secret();
78 @ <input type="submit" name="sync" value="%h(zButton)" />
79 @ </div></form>
80 @
81 if( P("sync") ){
@@ -133,11 +133,11 @@
133 db_set(zDbField, z, 0);
134 if( xRebuild ) xRebuild();
135 cgi_redirect("xfersetup");
136 }
137 }
138 @ <form action="%s(g.zTop)/%s(g.zPath)" method="post"><div>
139 login_insert_csrf_secret();
140 @ <p>%s(zDesc)</p>
141 @ <textarea name="x" rows="%d(height)" cols="80">%h(z)</textarea>
142 @ <p>
143 @ <input type="submit" name="submit" value="Apply Changes" />
144
--- src/xfersetup.c
+++ src/xfersetup.c
@@ -71,11 +71,11 @@
71 @
72 @ <big><b>%h(zWarning)</b></big>
73 free(zWarning);
74 }
75 @
76 @ <form method="post" action="%R/%s(g.zPath)"><div>
77 login_insert_csrf_secret();
78 @ <input type="submit" name="sync" value="%h(zButton)" />
79 @ </div></form>
80 @
81 if( P("sync") ){
@@ -133,11 +133,11 @@
133 db_set(zDbField, z, 0);
134 if( xRebuild ) xRebuild();
135 cgi_redirect("xfersetup");
136 }
137 }
138 @ <form action="%R/%s(g.zPath)" method="post"><div>
139 login_insert_csrf_secret();
140 @ <p>%s(zDesc)</p>
141 @ <textarea name="x" rows="%d(height)" cols="80">%h(z)</textarea>
142 @ <p>
143 @ <input type="submit" name="submit" value="Apply Changes" />
144

Keyboard Shortcuts

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