Fossil SCM

Calling the new style_set_current_feature() function to override the new TH1 variable $current_feature for Fossil UI pages where the page name isn't what we want used as the "body" CSS class. For the most part, this matches the value currently being passed to style_finish_page(), but a few have changed with the benefit of hindsight. Not all calls to style_finish_page() have a corresponding call to the new function since the default value for $current_page now suffices.

wyoung 2020-12-22 11:58 body-feature-class
Commit 8ac0830bfce807cadcc3900557cc5a974a20bd716b27434042b56d735aaf0757
+11
--- src/alerts.c
+++ src/alerts.c
@@ -171,10 +171,11 @@
171171
**
172172
** If the subscriber table does exist, return 0 without doing anything.
173173
*/
174174
static int alert_webpages_disabled(void){
175175
if( alert_tables_exist() ) return 0;
176
+ style_set_current_feature("alerts");
176177
style_header("Email Alerts Are Disabled");
177178
@ <p>Email alerts are disabled on this server</p>
178179
style_finish_page("alerts");
179180
return 1;
180181
}
@@ -216,10 +217,11 @@
216217
}
217218
db_begin_transaction();
218219
219220
alert_submenu_common();
220221
style_submenu_element("Send Announcement","%R/announce");
222
+ style_set_current_feature("alerts");
221223
style_header("Email Notification Setup");
222224
@ <h1>Status</h1>
223225
@ <table class="label-value">
224226
if( alert_enabled() ){
225227
stats_for_email();
@@ -1364,10 +1366,11 @@
13641366
}
13651367
if( !g.perm.Admin && !db_get_boolean("anon-subscribe",1) ){
13661368
register_page();
13671369
return;
13681370
}
1371
+ style_set_current_feature("alerts");
13691372
alert_submenu_common();
13701373
needCaptcha = !login_is_individual();
13711374
if( P("submit")
13721375
&& cgi_csrf_safe(1)
13731376
&& subscribe_error_check(&eErr,&zErr,needCaptcha)
@@ -1572,10 +1575,11 @@
15721575
if( db_step(&q)==SQLITE_ROW ){
15731576
zEmail = db_column_text(&q, 0);
15741577
zLogin = db_column_text(&q, 1);
15751578
uid = db_int(0, "SELECT uid FROM user WHERE login=%Q", zLogin);
15761579
}
1580
+ style_set_current_feature("alerts");
15771581
if( zEmail==0 ){
15781582
style_header("Unsubscribe Fail");
15791583
@ <p>Unable to locate a subscriber with the requested key</p>
15801584
}else{
15811585
@@ -1737,10 +1741,11 @@
17371741
alert_unsubscribe(sid);
17381742
db_commit_transaction();
17391743
return;
17401744
}
17411745
}
1746
+ style_set_current_feature("alerts");
17421747
style_header("Update Subscription");
17431748
db_prepare(&q,
17441749
"SELECT"
17451750
" semail," /* 0 */
17461751
" sverified," /* 1 */
@@ -1977,10 +1982,12 @@
19771982
if( login_is_individual() ){
19781983
cgi_redirectf("%R/alerts");
19791984
return;
19801985
}
19811986
1987
+ style_set_current_feature("alerts");
1988
+
19821989
zEAddr = PD("e","");
19831990
dx = atoi(PD("dx","0"));
19841991
bSubmit = P("submit")!=0 && P("e")!=0 && cgi_csrf_safe(1);
19851992
if( bSubmit ){
19861993
if( !captcha_is_correct(1) ){
@@ -2098,10 +2105,11 @@
20982105
login_needed(0);
20992106
return;
21002107
}
21012108
alert_submenu_common();
21022109
style_submenu_element("Users","setup_ulist");
2110
+ style_set_current_feature("alerts");
21032111
style_header("Subscriber List");
21042112
nTotal = db_int(0, "SELECT count(*) FROM subscriber");
21052113
nPending = db_int(0, "SELECT count(*) FROM subscriber WHERE NOT sverified");
21062114
if( nPending>0 && P("purge") && cgi_csrf_safe(0) ){
21072115
int nNewPending;
@@ -2799,10 +2807,11 @@
27992807
unsigned int uSeed = 0;
28002808
const char *zDecoded;
28012809
char *zCaptcha = 0;
28022810
28032811
login_check_credentials();
2812
+ style_set_current_feature("alerts");
28042813
if( zAdminEmail==0 || zAdminEmail[0]==0 ){
28052814
style_header("Outbound Email Disabled");
28062815
@ <p>Outbound email is disabled on this repository
28072816
style_finish_page("alerts");
28082817
return;
@@ -2842,10 +2851,11 @@
28422851
if( captcha_needed() ){
28432852
uSeed = captcha_seed();
28442853
zDecoded = captcha_decode(uSeed);
28452854
zCaptcha = captcha_render(zDecoded);
28462855
}
2856
+ style_set_current_feature("alerts");
28472857
style_header("Message To Administrator");
28482858
form_begin(0, "%R/contact_admin");
28492859
@ <p>Enter a message to the repository administrator below:</p>
28502860
@ <table class="subscribe">
28512861
if( zCaptcha ){
@@ -2971,10 +2981,11 @@
29712981
login_check_credentials();
29722982
if( !g.perm.Announce ){
29732983
login_needed(0);
29742984
return;
29752985
}
2986
+ style_set_current_feature("alerts");
29762987
if( fossil_strcmp(P("name"),"test1")==0 ){
29772988
/* Visit the /announce/test1 page to see the CGI variables */
29782989
@ <p style='border: 1px solid black; padding: 1ex;'>
29792990
cgi_print_all(0, 0);
29802991
@ </p>
29812992
--- src/alerts.c
+++ src/alerts.c
@@ -171,10 +171,11 @@
171 **
172 ** If the subscriber table does exist, return 0 without doing anything.
173 */
174 static int alert_webpages_disabled(void){
175 if( alert_tables_exist() ) return 0;
 
176 style_header("Email Alerts Are Disabled");
177 @ <p>Email alerts are disabled on this server</p>
178 style_finish_page("alerts");
179 return 1;
180 }
@@ -216,10 +217,11 @@
216 }
217 db_begin_transaction();
218
219 alert_submenu_common();
220 style_submenu_element("Send Announcement","%R/announce");
 
221 style_header("Email Notification Setup");
222 @ <h1>Status</h1>
223 @ <table class="label-value">
224 if( alert_enabled() ){
225 stats_for_email();
@@ -1364,10 +1366,11 @@
1364 }
1365 if( !g.perm.Admin && !db_get_boolean("anon-subscribe",1) ){
1366 register_page();
1367 return;
1368 }
 
1369 alert_submenu_common();
1370 needCaptcha = !login_is_individual();
1371 if( P("submit")
1372 && cgi_csrf_safe(1)
1373 && subscribe_error_check(&eErr,&zErr,needCaptcha)
@@ -1572,10 +1575,11 @@
1572 if( db_step(&q)==SQLITE_ROW ){
1573 zEmail = db_column_text(&q, 0);
1574 zLogin = db_column_text(&q, 1);
1575 uid = db_int(0, "SELECT uid FROM user WHERE login=%Q", zLogin);
1576 }
 
1577 if( zEmail==0 ){
1578 style_header("Unsubscribe Fail");
1579 @ <p>Unable to locate a subscriber with the requested key</p>
1580 }else{
1581
@@ -1737,10 +1741,11 @@
1737 alert_unsubscribe(sid);
1738 db_commit_transaction();
1739 return;
1740 }
1741 }
 
1742 style_header("Update Subscription");
1743 db_prepare(&q,
1744 "SELECT"
1745 " semail," /* 0 */
1746 " sverified," /* 1 */
@@ -1977,10 +1982,12 @@
1977 if( login_is_individual() ){
1978 cgi_redirectf("%R/alerts");
1979 return;
1980 }
1981
 
 
1982 zEAddr = PD("e","");
1983 dx = atoi(PD("dx","0"));
1984 bSubmit = P("submit")!=0 && P("e")!=0 && cgi_csrf_safe(1);
1985 if( bSubmit ){
1986 if( !captcha_is_correct(1) ){
@@ -2098,10 +2105,11 @@
2098 login_needed(0);
2099 return;
2100 }
2101 alert_submenu_common();
2102 style_submenu_element("Users","setup_ulist");
 
2103 style_header("Subscriber List");
2104 nTotal = db_int(0, "SELECT count(*) FROM subscriber");
2105 nPending = db_int(0, "SELECT count(*) FROM subscriber WHERE NOT sverified");
2106 if( nPending>0 && P("purge") && cgi_csrf_safe(0) ){
2107 int nNewPending;
@@ -2799,10 +2807,11 @@
2799 unsigned int uSeed = 0;
2800 const char *zDecoded;
2801 char *zCaptcha = 0;
2802
2803 login_check_credentials();
 
2804 if( zAdminEmail==0 || zAdminEmail[0]==0 ){
2805 style_header("Outbound Email Disabled");
2806 @ <p>Outbound email is disabled on this repository
2807 style_finish_page("alerts");
2808 return;
@@ -2842,10 +2851,11 @@
2842 if( captcha_needed() ){
2843 uSeed = captcha_seed();
2844 zDecoded = captcha_decode(uSeed);
2845 zCaptcha = captcha_render(zDecoded);
2846 }
 
2847 style_header("Message To Administrator");
2848 form_begin(0, "%R/contact_admin");
2849 @ <p>Enter a message to the repository administrator below:</p>
2850 @ <table class="subscribe">
2851 if( zCaptcha ){
@@ -2971,10 +2981,11 @@
2971 login_check_credentials();
2972 if( !g.perm.Announce ){
2973 login_needed(0);
2974 return;
2975 }
 
2976 if( fossil_strcmp(P("name"),"test1")==0 ){
2977 /* Visit the /announce/test1 page to see the CGI variables */
2978 @ <p style='border: 1px solid black; padding: 1ex;'>
2979 cgi_print_all(0, 0);
2980 @ </p>
2981
--- src/alerts.c
+++ src/alerts.c
@@ -171,10 +171,11 @@
171 **
172 ** If the subscriber table does exist, return 0 without doing anything.
173 */
174 static int alert_webpages_disabled(void){
175 if( alert_tables_exist() ) return 0;
176 style_set_current_feature("alerts");
177 style_header("Email Alerts Are Disabled");
178 @ <p>Email alerts are disabled on this server</p>
179 style_finish_page("alerts");
180 return 1;
181 }
@@ -216,10 +217,11 @@
217 }
218 db_begin_transaction();
219
220 alert_submenu_common();
221 style_submenu_element("Send Announcement","%R/announce");
222 style_set_current_feature("alerts");
223 style_header("Email Notification Setup");
224 @ <h1>Status</h1>
225 @ <table class="label-value">
226 if( alert_enabled() ){
227 stats_for_email();
@@ -1364,10 +1366,11 @@
1366 }
1367 if( !g.perm.Admin && !db_get_boolean("anon-subscribe",1) ){
1368 register_page();
1369 return;
1370 }
1371 style_set_current_feature("alerts");
1372 alert_submenu_common();
1373 needCaptcha = !login_is_individual();
1374 if( P("submit")
1375 && cgi_csrf_safe(1)
1376 && subscribe_error_check(&eErr,&zErr,needCaptcha)
@@ -1572,10 +1575,11 @@
1575 if( db_step(&q)==SQLITE_ROW ){
1576 zEmail = db_column_text(&q, 0);
1577 zLogin = db_column_text(&q, 1);
1578 uid = db_int(0, "SELECT uid FROM user WHERE login=%Q", zLogin);
1579 }
1580 style_set_current_feature("alerts");
1581 if( zEmail==0 ){
1582 style_header("Unsubscribe Fail");
1583 @ <p>Unable to locate a subscriber with the requested key</p>
1584 }else{
1585
@@ -1737,10 +1741,11 @@
1741 alert_unsubscribe(sid);
1742 db_commit_transaction();
1743 return;
1744 }
1745 }
1746 style_set_current_feature("alerts");
1747 style_header("Update Subscription");
1748 db_prepare(&q,
1749 "SELECT"
1750 " semail," /* 0 */
1751 " sverified," /* 1 */
@@ -1977,10 +1982,12 @@
1982 if( login_is_individual() ){
1983 cgi_redirectf("%R/alerts");
1984 return;
1985 }
1986
1987 style_set_current_feature("alerts");
1988
1989 zEAddr = PD("e","");
1990 dx = atoi(PD("dx","0"));
1991 bSubmit = P("submit")!=0 && P("e")!=0 && cgi_csrf_safe(1);
1992 if( bSubmit ){
1993 if( !captcha_is_correct(1) ){
@@ -2098,10 +2105,11 @@
2105 login_needed(0);
2106 return;
2107 }
2108 alert_submenu_common();
2109 style_submenu_element("Users","setup_ulist");
2110 style_set_current_feature("alerts");
2111 style_header("Subscriber List");
2112 nTotal = db_int(0, "SELECT count(*) FROM subscriber");
2113 nPending = db_int(0, "SELECT count(*) FROM subscriber WHERE NOT sverified");
2114 if( nPending>0 && P("purge") && cgi_csrf_safe(0) ){
2115 int nNewPending;
@@ -2799,10 +2807,11 @@
2807 unsigned int uSeed = 0;
2808 const char *zDecoded;
2809 char *zCaptcha = 0;
2810
2811 login_check_credentials();
2812 style_set_current_feature("alerts");
2813 if( zAdminEmail==0 || zAdminEmail[0]==0 ){
2814 style_header("Outbound Email Disabled");
2815 @ <p>Outbound email is disabled on this repository
2816 style_finish_page("alerts");
2817 return;
@@ -2842,10 +2851,11 @@
2851 if( captcha_needed() ){
2852 uSeed = captcha_seed();
2853 zDecoded = captcha_decode(uSeed);
2854 zCaptcha = captcha_render(zDecoded);
2855 }
2856 style_set_current_feature("alerts");
2857 style_header("Message To Administrator");
2858 form_begin(0, "%R/contact_admin");
2859 @ <p>Enter a message to the repository administrator below:</p>
2860 @ <table class="subscribe">
2861 if( zCaptcha ){
@@ -2971,10 +2981,11 @@
2981 login_check_credentials();
2982 if( !g.perm.Announce ){
2983 login_needed(0);
2984 return;
2985 }
2986 style_set_current_feature("alerts");
2987 if( fossil_strcmp(P("name"),"test1")==0 ){
2988 /* Visit the /announce/test1 page to see the CGI variables */
2989 @ <p style='border: 1px solid black; padding: 1ex;'>
2990 cgi_print_all(0, 0);
2991 @ </p>
2992
--- src/attach.c
+++ src/attach.c
@@ -45,10 +45,11 @@
4545
Blob sql;
4646
Stmt q;
4747
4848
if( zPage && zTkt ) zTkt = 0;
4949
login_check_credentials();
50
+ style_set_current_feature("attach");
5051
blob_zero(&sql);
5152
blob_append_sql(&sql,
5253
"SELECT datetime(mtime,toLocal()), src, target, filename,"
5354
" comment, user,"
5455
" (SELECT uuid FROM blob WHERE rid=attachid), attachid,"
@@ -176,10 +177,11 @@
176177
int attachid = atoi(PD("attachid","0"));
177178
char *zUUID;
178179
179180
if( zFile==0 ) fossil_redirect_home();
180181
login_check_credentials();
182
+ style_set_current_feature("attach");
181183
if( zPage ){
182184
if( g.perm.RdWiki==0 ){ login_needed(g.anon.RdWiki); return; }
183185
zTarget = zPage;
184186
}else if( zTkt ){
185187
if( g.perm.RdTkt==0 ){ login_needed(g.anon.RdTkt); return; }
@@ -386,10 +388,11 @@
386388
(zPage!=0 && wiki_need_moderation(0));
387389
const char *zComment = PD("comment", "");
388390
attach_commit(zName, zTarget, aContent, szContent, needModerator, zComment);
389391
cgi_redirect(zFrom);
390392
}
393
+ style_set_current_feature("attach");
391394
style_header("Add Attachment");
392395
if( !goodCaptcha ){
393396
@ <p class="generalError">Error: Incorrect security code.</p>
394397
}
395398
@ <h2>Add Attachment To %s(zTargetType)</h2>
@@ -539,10 +542,11 @@
539542
}
540543
if( strcmp(zModAction,"approve")==0 ){
541544
moderation_approve('a', rid);
542545
}
543546
}
547
+ style_set_current_feature("attach");
544548
style_header("Attachment Details");
545549
style_submenu_element("Raw", "%R/artifact/%s", zUuid);
546550
if(fShowContent){
547551
style_submenu_element("Line Numbers", "%R/ainfo/%s%s", zUuid,
548552
((zLn&&*zLn) ? "" : "?ln=0"));
549553
--- src/attach.c
+++ src/attach.c
@@ -45,10 +45,11 @@
45 Blob sql;
46 Stmt q;
47
48 if( zPage && zTkt ) zTkt = 0;
49 login_check_credentials();
 
50 blob_zero(&sql);
51 blob_append_sql(&sql,
52 "SELECT datetime(mtime,toLocal()), src, target, filename,"
53 " comment, user,"
54 " (SELECT uuid FROM blob WHERE rid=attachid), attachid,"
@@ -176,10 +177,11 @@
176 int attachid = atoi(PD("attachid","0"));
177 char *zUUID;
178
179 if( zFile==0 ) fossil_redirect_home();
180 login_check_credentials();
 
181 if( zPage ){
182 if( g.perm.RdWiki==0 ){ login_needed(g.anon.RdWiki); return; }
183 zTarget = zPage;
184 }else if( zTkt ){
185 if( g.perm.RdTkt==0 ){ login_needed(g.anon.RdTkt); return; }
@@ -386,10 +388,11 @@
386 (zPage!=0 && wiki_need_moderation(0));
387 const char *zComment = PD("comment", "");
388 attach_commit(zName, zTarget, aContent, szContent, needModerator, zComment);
389 cgi_redirect(zFrom);
390 }
 
391 style_header("Add Attachment");
392 if( !goodCaptcha ){
393 @ <p class="generalError">Error: Incorrect security code.</p>
394 }
395 @ <h2>Add Attachment To %s(zTargetType)</h2>
@@ -539,10 +542,11 @@
539 }
540 if( strcmp(zModAction,"approve")==0 ){
541 moderation_approve('a', rid);
542 }
543 }
 
544 style_header("Attachment Details");
545 style_submenu_element("Raw", "%R/artifact/%s", zUuid);
546 if(fShowContent){
547 style_submenu_element("Line Numbers", "%R/ainfo/%s%s", zUuid,
548 ((zLn&&*zLn) ? "" : "?ln=0"));
549
--- src/attach.c
+++ src/attach.c
@@ -45,10 +45,11 @@
45 Blob sql;
46 Stmt q;
47
48 if( zPage && zTkt ) zTkt = 0;
49 login_check_credentials();
50 style_set_current_feature("attach");
51 blob_zero(&sql);
52 blob_append_sql(&sql,
53 "SELECT datetime(mtime,toLocal()), src, target, filename,"
54 " comment, user,"
55 " (SELECT uuid FROM blob WHERE rid=attachid), attachid,"
@@ -176,10 +177,11 @@
177 int attachid = atoi(PD("attachid","0"));
178 char *zUUID;
179
180 if( zFile==0 ) fossil_redirect_home();
181 login_check_credentials();
182 style_set_current_feature("attach");
183 if( zPage ){
184 if( g.perm.RdWiki==0 ){ login_needed(g.anon.RdWiki); return; }
185 zTarget = zPage;
186 }else if( zTkt ){
187 if( g.perm.RdTkt==0 ){ login_needed(g.anon.RdTkt); return; }
@@ -386,10 +388,11 @@
388 (zPage!=0 && wiki_need_moderation(0));
389 const char *zComment = PD("comment", "");
390 attach_commit(zName, zTarget, aContent, szContent, needModerator, zComment);
391 cgi_redirect(zFrom);
392 }
393 style_set_current_feature("attach");
394 style_header("Add Attachment");
395 if( !goodCaptcha ){
396 @ <p class="generalError">Error: Incorrect security code.</p>
397 }
398 @ <h2>Add Attachment To %s(zTargetType)</h2>
@@ -539,10 +542,11 @@
542 }
543 if( strcmp(zModAction,"approve")==0 ){
544 moderation_approve('a', rid);
545 }
546 }
547 style_set_current_feature("attach");
548 style_header("Attachment Details");
549 style_submenu_element("Raw", "%R/artifact/%s", zUuid);
550 if(fShowContent){
551 style_submenu_element("Line Numbers", "%R/ainfo/%s%s", zUuid,
552 ((zLn&&*zLn) ? "" : "?ln=0"));
553
--- src/backlink.c
+++ src/backlink.c
@@ -76,10 +76,11 @@
7676
login_check_credentials();
7777
if( !g.perm.Read || !g.perm.RdTkt || !g.perm.RdWiki ){
7878
login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki);
7979
return;
8080
}
81
+ style_set_current_feature("test");
8182
style_header("Backlink Timeline (Internal Testing Use)");
8283
db_multi_exec(
8384
"CREATE TEMP TABLE IF NOT EXISTS ok(rid INTEGER PRIMARY KEY);"
8485
"DELETE FROM ok;"
8586
"INSERT OR IGNORE INTO ok"
@@ -107,10 +108,11 @@
107108
login_check_credentials();
108109
if( !g.perm.Admin ){
109110
login_needed(g.anon.Admin);
110111
return;
111112
}
113
+ style_set_current_feature("test");
112114
style_header("Backlink Table (Internal Testing Use)");
113115
n = db_int(0, "SELECT count(*) FROM backlink");
114116
@ <p>%d(n) backlink table entries:</p>
115117
db_prepare(&q,
116118
"SELECT target, srctype, srcid, datetime(mtime),"
117119
--- src/backlink.c
+++ src/backlink.c
@@ -76,10 +76,11 @@
76 login_check_credentials();
77 if( !g.perm.Read || !g.perm.RdTkt || !g.perm.RdWiki ){
78 login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki);
79 return;
80 }
 
81 style_header("Backlink Timeline (Internal Testing Use)");
82 db_multi_exec(
83 "CREATE TEMP TABLE IF NOT EXISTS ok(rid INTEGER PRIMARY KEY);"
84 "DELETE FROM ok;"
85 "INSERT OR IGNORE INTO ok"
@@ -107,10 +108,11 @@
107 login_check_credentials();
108 if( !g.perm.Admin ){
109 login_needed(g.anon.Admin);
110 return;
111 }
 
112 style_header("Backlink Table (Internal Testing Use)");
113 n = db_int(0, "SELECT count(*) FROM backlink");
114 @ <p>%d(n) backlink table entries:</p>
115 db_prepare(&q,
116 "SELECT target, srctype, srcid, datetime(mtime),"
117
--- src/backlink.c
+++ src/backlink.c
@@ -76,10 +76,11 @@
76 login_check_credentials();
77 if( !g.perm.Read || !g.perm.RdTkt || !g.perm.RdWiki ){
78 login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki);
79 return;
80 }
81 style_set_current_feature("test");
82 style_header("Backlink Timeline (Internal Testing Use)");
83 db_multi_exec(
84 "CREATE TEMP TABLE IF NOT EXISTS ok(rid INTEGER PRIMARY KEY);"
85 "DELETE FROM ok;"
86 "INSERT OR IGNORE INTO ok"
@@ -107,10 +108,11 @@
108 login_check_credentials();
109 if( !g.perm.Admin ){
110 login_needed(g.anon.Admin);
111 return;
112 }
113 style_set_current_feature("test");
114 style_header("Backlink Table (Internal Testing Use)");
115 n = db_int(0, "SELECT count(*) FROM backlink");
116 @ <p>%d(n) backlink table entries:</p>
117 db_prepare(&q,
118 "SELECT target, srctype, srcid, datetime(mtime),"
119
--- src/branch.c
+++ src/branch.c
@@ -458,10 +458,11 @@
458458
Stmt q;
459459
double rNow;
460460
int show_colors = PB("colors");
461461
login_check_credentials();
462462
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
463
+ style_set_current_feature("branch");
463464
style_header("Branches");
464465
style_adunit_config(ADUNIT_RIGHT_OK);
465466
style_submenu_checkbox("colors", "Use Branch Colors", 0, 0);
466467
login_anonymous_available();
467468
@@ -556,10 +557,11 @@
556557
showAll = 1;
557558
}
558559
if( showAll ) brFlags = BRL_BOTH;
559560
if( showClosed ) brFlags = BRL_CLOSED_ONLY;
560561
562
+ style_set_current_feature("branch");
561563
style_header("%s", showClosed ? "Closed Branches" :
562564
showAll ? "All Branches" : "Open Branches");
563565
style_submenu_element("Timeline", "brtimeline");
564566
if( showClosed ){
565567
style_submenu_element("All", "brlist?all");
@@ -671,10 +673,11 @@
671673
int fOnlyHidden = PB("onlyhidden")!=0; /* The "onlyhidden" query parameter */
672674
673675
login_check_credentials();
674676
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
675677
678
+ style_set_current_feature("branch");
676679
style_header("Branches");
677680
style_submenu_element("List", "brlist");
678681
login_anonymous_available();
679682
timeline_ss_submenu();
680683
cookie_render();
681684
--- src/branch.c
+++ src/branch.c
@@ -458,10 +458,11 @@
458 Stmt q;
459 double rNow;
460 int show_colors = PB("colors");
461 login_check_credentials();
462 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
 
463 style_header("Branches");
464 style_adunit_config(ADUNIT_RIGHT_OK);
465 style_submenu_checkbox("colors", "Use Branch Colors", 0, 0);
466 login_anonymous_available();
467
@@ -556,10 +557,11 @@
556 showAll = 1;
557 }
558 if( showAll ) brFlags = BRL_BOTH;
559 if( showClosed ) brFlags = BRL_CLOSED_ONLY;
560
 
561 style_header("%s", showClosed ? "Closed Branches" :
562 showAll ? "All Branches" : "Open Branches");
563 style_submenu_element("Timeline", "brtimeline");
564 if( showClosed ){
565 style_submenu_element("All", "brlist?all");
@@ -671,10 +673,11 @@
671 int fOnlyHidden = PB("onlyhidden")!=0; /* The "onlyhidden" query parameter */
672
673 login_check_credentials();
674 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
675
 
676 style_header("Branches");
677 style_submenu_element("List", "brlist");
678 login_anonymous_available();
679 timeline_ss_submenu();
680 cookie_render();
681
--- src/branch.c
+++ src/branch.c
@@ -458,10 +458,11 @@
458 Stmt q;
459 double rNow;
460 int show_colors = PB("colors");
461 login_check_credentials();
462 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
463 style_set_current_feature("branch");
464 style_header("Branches");
465 style_adunit_config(ADUNIT_RIGHT_OK);
466 style_submenu_checkbox("colors", "Use Branch Colors", 0, 0);
467 login_anonymous_available();
468
@@ -556,10 +557,11 @@
557 showAll = 1;
558 }
559 if( showAll ) brFlags = BRL_BOTH;
560 if( showClosed ) brFlags = BRL_CLOSED_ONLY;
561
562 style_set_current_feature("branch");
563 style_header("%s", showClosed ? "Closed Branches" :
564 showAll ? "All Branches" : "Open Branches");
565 style_submenu_element("Timeline", "brtimeline");
566 if( showClosed ){
567 style_submenu_element("All", "brlist?all");
@@ -671,10 +673,11 @@
673 int fOnlyHidden = PB("onlyhidden")!=0; /* The "onlyhidden" query parameter */
674
675 login_check_credentials();
676 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
677
678 style_set_current_feature("branch");
679 style_header("Branches");
680 style_submenu_element("List", "brlist");
681 login_anonymous_available();
682 timeline_ss_submenu();
683 cookie_render();
684
--- src/builtin.c
+++ src/builtin.c
@@ -94,10 +94,11 @@
9494
**
9595
** Show all built-in text files.
9696
*/
9797
void test_builtin_list_page(void){
9898
int i;
99
+ style_set_current_feature("test");
99100
style_header("Built-in Text Files");
100101
@ <ol>
101102
for(i=0; i<count(aBuiltinFiles); i++){
102103
const char *z = aBuiltinFiles[i].zName;
103104
char *zUrl = href("%R/builtin?name=%T&id=%.8s&mimetype=text/plain",
104105
--- src/builtin.c
+++ src/builtin.c
@@ -94,10 +94,11 @@
94 **
95 ** Show all built-in text files.
96 */
97 void test_builtin_list_page(void){
98 int i;
 
99 style_header("Built-in Text Files");
100 @ <ol>
101 for(i=0; i<count(aBuiltinFiles); i++){
102 const char *z = aBuiltinFiles[i].zName;
103 char *zUrl = href("%R/builtin?name=%T&id=%.8s&mimetype=text/plain",
104
--- src/builtin.c
+++ src/builtin.c
@@ -94,10 +94,11 @@
94 **
95 ** Show all built-in text files.
96 */
97 void test_builtin_list_page(void){
98 int i;
99 style_set_current_feature("test");
100 style_header("Built-in Text Files");
101 @ <ol>
102 for(i=0; i<count(aBuiltinFiles); i++){
103 const char *z = aBuiltinFiles[i].zName;
104 char *zUrl = href("%R/builtin?name=%T&id=%.8s&mimetype=text/plain",
105
--- src/cache.c
+++ src/cache.c
@@ -353,10 +353,11 @@
353353
sqlite3_stmt *pStmt;
354354
char zBuf[100];
355355
356356
login_check_credentials();
357357
if( !g.perm.Setup ){ login_needed(0); return; }
358
+ style_set_current_feature("cache");
358359
style_header("Web Cache Status");
359360
db = cacheOpen(0);
360361
if( db==0 ){
361362
@ The web-page cache is disabled for this repository
362363
}else{
@@ -405,13 +406,14 @@
405406
login_check_credentials();
406407
if( !g.perm.Setup ){ login_needed(0); return; }
407408
zKey = PD("key","");
408409
blob_zero(&content);
409410
if( cache_read(&content, zKey)==0 ){
411
+ style_set_current_feature("cache");
410412
style_header("Cache Download Error");
411413
@ The cache does not contain any entry with this key: "%h(zKey)"
412414
style_finish_page("cache");
413415
return;
414416
}
415417
cgi_set_content(&content);
416418
cgi_set_content_type("application/x-compressed");
417419
}
418420
--- src/cache.c
+++ src/cache.c
@@ -353,10 +353,11 @@
353 sqlite3_stmt *pStmt;
354 char zBuf[100];
355
356 login_check_credentials();
357 if( !g.perm.Setup ){ login_needed(0); return; }
 
358 style_header("Web Cache Status");
359 db = cacheOpen(0);
360 if( db==0 ){
361 @ The web-page cache is disabled for this repository
362 }else{
@@ -405,13 +406,14 @@
405 login_check_credentials();
406 if( !g.perm.Setup ){ login_needed(0); return; }
407 zKey = PD("key","");
408 blob_zero(&content);
409 if( cache_read(&content, zKey)==0 ){
 
410 style_header("Cache Download Error");
411 @ The cache does not contain any entry with this key: "%h(zKey)"
412 style_finish_page("cache");
413 return;
414 }
415 cgi_set_content(&content);
416 cgi_set_content_type("application/x-compressed");
417 }
418
--- src/cache.c
+++ src/cache.c
@@ -353,10 +353,11 @@
353 sqlite3_stmt *pStmt;
354 char zBuf[100];
355
356 login_check_credentials();
357 if( !g.perm.Setup ){ login_needed(0); return; }
358 style_set_current_feature("cache");
359 style_header("Web Cache Status");
360 db = cacheOpen(0);
361 if( db==0 ){
362 @ The web-page cache is disabled for this repository
363 }else{
@@ -405,13 +406,14 @@
406 login_check_credentials();
407 if( !g.perm.Setup ){ login_needed(0); return; }
408 zKey = PD("key","");
409 blob_zero(&content);
410 if( cache_read(&content, zKey)==0 ){
411 style_set_current_feature("cache");
412 style_header("Cache Download Error");
413 @ The cache does not contain any entry with this key: "%h(zKey)"
414 style_finish_page("cache");
415 return;
416 }
417 cgi_set_content(&content);
418 cgi_set_content_type("application/x-compressed");
419 }
420
--- src/captcha.c
+++ src/captcha.c
@@ -586,10 +586,11 @@
586586
if( zPw==0 || zPw[0]==0 ){
587587
u64 x;
588588
sqlite3_randomness(sizeof(x), &x);
589589
zPw = mprintf("%016llx", x);
590590
}
591
+ style_set_current_feature("test");
591592
style_header("Captcha Test");
592593
@ <pre>
593594
@ %s(captcha_render(zPw))
594595
@ </pre>
595596
style_finish_page("test");
@@ -621,10 +622,11 @@
621622
cgi_set_cookie(zCookieName, "1", login_cookie_path(), 8*3600);
622623
return 0;
623624
}
624625
625626
/* This appears to be a spider. Offer the captcha */
627
+ style_set_current_feature("captcha");
626628
style_header("Verification");
627629
@ <form method='POST' action='%s(g.zPath)'>
628630
cgi_query_parameters_to_hidden();
629631
@ <p>Please demonstrate that you are human, not a spider or robot</p>
630632
captcha_generate(1);
631633
--- src/captcha.c
+++ src/captcha.c
@@ -586,10 +586,11 @@
586 if( zPw==0 || zPw[0]==0 ){
587 u64 x;
588 sqlite3_randomness(sizeof(x), &x);
589 zPw = mprintf("%016llx", x);
590 }
 
591 style_header("Captcha Test");
592 @ <pre>
593 @ %s(captcha_render(zPw))
594 @ </pre>
595 style_finish_page("test");
@@ -621,10 +622,11 @@
621 cgi_set_cookie(zCookieName, "1", login_cookie_path(), 8*3600);
622 return 0;
623 }
624
625 /* This appears to be a spider. Offer the captcha */
 
626 style_header("Verification");
627 @ <form method='POST' action='%s(g.zPath)'>
628 cgi_query_parameters_to_hidden();
629 @ <p>Please demonstrate that you are human, not a spider or robot</p>
630 captcha_generate(1);
631
--- src/captcha.c
+++ src/captcha.c
@@ -586,10 +586,11 @@
586 if( zPw==0 || zPw[0]==0 ){
587 u64 x;
588 sqlite3_randomness(sizeof(x), &x);
589 zPw = mprintf("%016llx", x);
590 }
591 style_set_current_feature("test");
592 style_header("Captcha Test");
593 @ <pre>
594 @ %s(captcha_render(zPw))
595 @ </pre>
596 style_finish_page("test");
@@ -621,10 +622,11 @@
622 cgi_set_cookie(zCookieName, "1", login_cookie_path(), 8*3600);
623 return 0;
624 }
625
626 /* This appears to be a spider. Offer the captcha */
627 style_set_current_feature("captcha");
628 style_header("Verification");
629 @ <form method='POST' action='%s(g.zPath)'>
630 cgi_query_parameters_to_hidden();
631 @ <p>Please demonstrate that you are human, not a spider or robot</p>
632 captcha_generate(1);
633
--- src/descendants.c
+++ src/descendants.c
@@ -561,10 +561,11 @@
561561
}
562562
if( showClosed || showAll ){
563563
style_submenu_element("Open", "%s", url_render(&url, 0, 0, 0, 0));
564564
}
565565
url_reset(&url);
566
+ style_set_current_feature("leaves");
566567
style_header("Leaves");
567568
login_anonymous_available();
568569
timeline_ss_submenu();
569570
cookie_render();
570571
#if 0
571572
--- src/descendants.c
+++ src/descendants.c
@@ -561,10 +561,11 @@
561 }
562 if( showClosed || showAll ){
563 style_submenu_element("Open", "%s", url_render(&url, 0, 0, 0, 0));
564 }
565 url_reset(&url);
 
566 style_header("Leaves");
567 login_anonymous_available();
568 timeline_ss_submenu();
569 cookie_render();
570 #if 0
571
--- src/descendants.c
+++ src/descendants.c
@@ -561,10 +561,11 @@
561 }
562 if( showClosed || showAll ){
563 style_submenu_element("Open", "%s", url_render(&url, 0, 0, 0, 0));
564 }
565 url_reset(&url);
566 style_set_current_feature("leaves");
567 style_header("Leaves");
568 login_anonymous_available();
569 timeline_ss_submenu();
570 cookie_render();
571 #if 0
572
+1
--- src/diff.c
+++ src/diff.c
@@ -2448,10 +2448,11 @@
24482448
/* compute the annotation */
24492449
annotate_file(&ann, zFilename, zRevision, zLimit, zOrigin, annFlags);
24502450
zCI = ann.aVers[0].zMUuid;
24512451
24522452
/* generate the web page */
2453
+ style_set_current_feature("annotate");
24532454
style_header("Annotation For %h", zFilename);
24542455
if( bBlame ){
24552456
url_initialize(&url, "blame");
24562457
}else{
24572458
url_initialize(&url, "annotate");
24582459
--- src/diff.c
+++ src/diff.c
@@ -2448,10 +2448,11 @@
2448 /* compute the annotation */
2449 annotate_file(&ann, zFilename, zRevision, zLimit, zOrigin, annFlags);
2450 zCI = ann.aVers[0].zMUuid;
2451
2452 /* generate the web page */
 
2453 style_header("Annotation For %h", zFilename);
2454 if( bBlame ){
2455 url_initialize(&url, "blame");
2456 }else{
2457 url_initialize(&url, "annotate");
2458
--- src/diff.c
+++ src/diff.c
@@ -2448,10 +2448,11 @@
2448 /* compute the annotation */
2449 annotate_file(&ann, zFilename, zRevision, zLimit, zOrigin, annFlags);
2450 zCI = ann.aVers[0].zMUuid;
2451
2452 /* generate the web page */
2453 style_set_current_feature("annotate");
2454 style_header("Annotation For %h", zFilename);
2455 if( bBlame ){
2456 url_initialize(&url, "blame");
2457 }else{
2458 url_initialize(&url, "annotate");
2459
--- src/dispatch.c
+++ src/dispatch.c
@@ -747,10 +747,11 @@
747747
if( zCmd==0 ) zCmd = P("name");
748748
if( zCmd && *zCmd ){
749749
int rc;
750750
const CmdOrPage *pCmd = 0;
751751
752
+ style_set_current_feature("tkt");
752753
style_header("Help: %s", zCmd);
753754
754755
style_submenu_element("Command-List", "%R/help");
755756
rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd);
756757
if( *zCmd=='/' ){
@@ -862,10 +863,11 @@
862863
*/
863864
void test_all_help_page(void){
864865
int i;
865866
Blob buf;
866867
blob_init(&buf,0,0);
868
+ style_set_current_feature("test");
867869
style_header("All Help Text");
868870
@ <dl>
869871
for(i=0; i<MX_COMMAND; i++){
870872
const char *zDesc;
871873
unsigned int e = aCommand[i].eCmdFlags;
872874
--- src/dispatch.c
+++ src/dispatch.c
@@ -747,10 +747,11 @@
747 if( zCmd==0 ) zCmd = P("name");
748 if( zCmd && *zCmd ){
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=='/' ){
@@ -862,10 +863,11 @@
862 */
863 void test_all_help_page(void){
864 int i;
865 Blob buf;
866 blob_init(&buf,0,0);
 
867 style_header("All Help Text");
868 @ <dl>
869 for(i=0; i<MX_COMMAND; i++){
870 const char *zDesc;
871 unsigned int e = aCommand[i].eCmdFlags;
872
--- src/dispatch.c
+++ src/dispatch.c
@@ -747,10 +747,11 @@
747 if( zCmd==0 ) zCmd = P("name");
748 if( zCmd && *zCmd ){
749 int rc;
750 const CmdOrPage *pCmd = 0;
751
752 style_set_current_feature("tkt");
753 style_header("Help: %s", zCmd);
754
755 style_submenu_element("Command-List", "%R/help");
756 rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd);
757 if( *zCmd=='/' ){
@@ -862,10 +863,11 @@
863 */
864 void test_all_help_page(void){
865 int i;
866 Blob buf;
867 blob_init(&buf,0,0);
868 style_set_current_feature("test");
869 style_header("All Help Text");
870 @ <dl>
871 for(i=0; i<MX_COMMAND; i++){
872 const char *zDesc;
873 unsigned int e = aCommand[i].eCmdFlags;
874
+1
--- src/doc.c
+++ src/doc.c
@@ -906,10 +906,11 @@
906906
#endif
907907
};
908908
909909
login_check_credentials();
910910
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
911
+ style_set_current_feature("doc");
911912
blob_init(&title, 0, 0);
912913
zDfltTitle = isUV ? "" : "Documentation";
913914
db_begin_transaction();
914915
while( rid==0 && (++nMiss)<=count(azSuffix) ){
915916
zName = P("name");
916917
--- src/doc.c
+++ src/doc.c
@@ -906,10 +906,11 @@
906 #endif
907 };
908
909 login_check_credentials();
910 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
 
911 blob_init(&title, 0, 0);
912 zDfltTitle = isUV ? "" : "Documentation";
913 db_begin_transaction();
914 while( rid==0 && (++nMiss)<=count(azSuffix) ){
915 zName = P("name");
916
--- src/doc.c
+++ src/doc.c
@@ -906,10 +906,11 @@
906 #endif
907 };
908
909 login_check_credentials();
910 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
911 style_set_current_feature("doc");
912 blob_init(&title, 0, 0);
913 zDfltTitle = isUV ? "" : "Documentation";
914 db_begin_transaction();
915 while( rid==0 && (++nMiss)<=count(azSuffix) ){
916 zName = P("name");
917
--- src/event.c
+++ src/event.c
@@ -110,10 +110,11 @@
110110
}
111111
break;
112112
}
113113
}
114114
db_finalize(&q1);
115
+ style_set_current_feature("event");
115116
if( rid==0 || (specRid!=0 && specRid!=rid) ){
116117
style_header("No Such Tech-Note");
117118
@ Cannot locate a technical note called <b>%h(zId)</b>.
118119
style_finish_page("event");
119120
return;
@@ -415,10 +416,11 @@
415416
*/
416417
if( !g.perm.Write || (rid && !g.perm.WrWiki) || (!rid && !g.perm.NewWiki) ){
417418
login_needed(g.anon.Write && (rid ? g.anon.WrWiki : g.anon.NewWiki));
418419
return;
419420
}
421
+ style_set_current_feature("event");
420422
421423
/* Figure out the color */
422424
if( rid ){
423425
zClr = db_text("", "SELECT bgcolor FROM event WHERE objid=%d", rid);
424426
if( zClr && zClr[0] ){
425427
--- src/event.c
+++ src/event.c
@@ -110,10 +110,11 @@
110 }
111 break;
112 }
113 }
114 db_finalize(&q1);
 
115 if( rid==0 || (specRid!=0 && specRid!=rid) ){
116 style_header("No Such Tech-Note");
117 @ Cannot locate a technical note called <b>%h(zId)</b>.
118 style_finish_page("event");
119 return;
@@ -415,10 +416,11 @@
415 */
416 if( !g.perm.Write || (rid && !g.perm.WrWiki) || (!rid && !g.perm.NewWiki) ){
417 login_needed(g.anon.Write && (rid ? g.anon.WrWiki : g.anon.NewWiki));
418 return;
419 }
 
420
421 /* Figure out the color */
422 if( rid ){
423 zClr = db_text("", "SELECT bgcolor FROM event WHERE objid=%d", rid);
424 if( zClr && zClr[0] ){
425
--- src/event.c
+++ src/event.c
@@ -110,10 +110,11 @@
110 }
111 break;
112 }
113 }
114 db_finalize(&q1);
115 style_set_current_feature("event");
116 if( rid==0 || (specRid!=0 && specRid!=rid) ){
117 style_header("No Such Tech-Note");
118 @ Cannot locate a technical note called <b>%h(zId)</b>.
119 style_finish_page("event");
120 return;
@@ -415,10 +416,11 @@
416 */
417 if( !g.perm.Write || (rid && !g.perm.WrWiki) || (!rid && !g.perm.NewWiki) ){
418 login_needed(g.anon.Write && (rid ? g.anon.WrWiki : g.anon.NewWiki));
419 return;
420 }
421 style_set_current_feature("event");
422
423 /* Figure out the color */
424 if( rid ){
425 zClr = db_text("", "SELECT bgcolor FROM event WHERE objid=%d", rid);
426 if( zClr && zClr[0] ){
427
--- src/extcgi.c
+++ src/extcgi.c
@@ -395,10 +395,11 @@
395395
if( !g.perm.Admin ){
396396
login_needed(0);
397397
return;
398398
}
399399
ext_files();
400
+ style_set_current_feature("extcgi");
400401
style_header("CGI Extension Filelist");
401402
@ <table border="0" cellspacing="0" cellpadding="3">
402403
@ <tbody>
403404
db_prepare(&q, "SELECT pathname, isexe FROM sfile"
404405
" ORDER BY pathname");
405406
--- src/extcgi.c
+++ src/extcgi.c
@@ -395,10 +395,11 @@
395 if( !g.perm.Admin ){
396 login_needed(0);
397 return;
398 }
399 ext_files();
 
400 style_header("CGI Extension Filelist");
401 @ <table border="0" cellspacing="0" cellpadding="3">
402 @ <tbody>
403 db_prepare(&q, "SELECT pathname, isexe FROM sfile"
404 " ORDER BY pathname");
405
--- src/extcgi.c
+++ src/extcgi.c
@@ -395,10 +395,11 @@
395 if( !g.perm.Admin ){
396 login_needed(0);
397 return;
398 }
399 ext_files();
400 style_set_current_feature("extcgi");
401 style_header("CGI Extension Filelist");
402 @ <table border="0" cellspacing="0" cellpadding="3">
403 @ <tbody>
404 db_prepare(&q, "SELECT pathname, isexe FROM sfile"
405 " ORDER BY pathname");
406
--- src/finfo.c
+++ src/finfo.c
@@ -779,10 +779,11 @@
779779
const char *zCI = P("ci");
780780
Stmt q;
781781
782782
login_check_credentials();
783783
if( !g.perm.Admin ){ login_needed(g.anon.Admin); return; }
784
+ style_set_current_feature("finfo");
784785
style_header("MLINK Table");
785786
if( zFName==0 && zCI==0 ){
786787
@ <span class='generalError'>
787788
@ Requires either a name= or ci= query parameter
788789
@ </span>
789790
--- src/finfo.c
+++ src/finfo.c
@@ -779,10 +779,11 @@
779 const char *zCI = P("ci");
780 Stmt q;
781
782 login_check_credentials();
783 if( !g.perm.Admin ){ login_needed(g.anon.Admin); return; }
 
784 style_header("MLINK Table");
785 if( zFName==0 && zCI==0 ){
786 @ <span class='generalError'>
787 @ Requires either a name= or ci= query parameter
788 @ </span>
789
--- src/finfo.c
+++ src/finfo.c
@@ -779,10 +779,11 @@
779 const char *zCI = P("ci");
780 Stmt q;
781
782 login_check_credentials();
783 if( !g.perm.Admin ){ login_needed(g.anon.Admin); return; }
784 style_set_current_feature("finfo");
785 style_header("MLINK Table");
786 if( zFName==0 && zCI==0 ){
787 @ <span class='generalError'>
788 @ Requires either a name= or ci= query parameter
789 @ </span>
790
--- src/forum.c
+++ src/forum.c
@@ -862,10 +862,11 @@
862862
" FROM forumpost, event"
863863
" WHERE event.objid=forumpost.fpid"
864864
" AND forumpost.fpid=%d;",
865865
fpid
866866
);
867
+ style_set_current_feature("forum");
867868
style_header("%s%s", zThreadTitle, *zThreadTitle ? "" : "Forum");
868869
fossil_free(zThreadTitle);
869870
if( mode!=FD_CHRONO ){
870871
style_submenu_element("Chronological", "%R/%s/%s?t=c%s%s", g.zPath, zName,
871872
bUnf ? "&unf" : "", bHist ? "&hist" : "");
@@ -1054,10 +1055,11 @@
10541055
}else{
10551056
forumnew_page();
10561057
}
10571058
return;
10581059
}
1060
+ style_set_current_feature("forum");
10591061
style_header("%h As Anonymous?", isEdit ? "Reply" : "Post");
10601062
@ <p>You are not logged in.
10611063
@ <p><table border="0" cellpadding="10">
10621064
@ <tr><td>
10631065
@ <form action="%s(zGoto)" method="POST">
@@ -1115,10 +1117,11 @@
11151117
}
11161118
if( P("preview") && !whitespace_only(zContent) ){
11171119
@ <h1>Preview:</h1>
11181120
forum_render(zTitle, zMimetype, zContent, "forumEdit", 1);
11191121
}
1122
+ style_set_current_feature("forum");
11201123
style_header("New Forum Thread");
11211124
@ <form action="%R/forume1" method="POST">
11221125
@ <h1>New Thread:</h1>
11231126
forum_from_line();
11241127
forum_post_widget(zTitle, zMimetype, zContent);
@@ -1214,10 +1217,11 @@
12141217
cgi_redirectf("%R/forum");
12151218
}
12161219
return;
12171220
}
12181221
}
1222
+ style_set_current_feature("forum");
12191223
isDelete = P("nullout")!=0;
12201224
if( P("submit")
12211225
&& isCsrfSafe
12221226
&& (zContent = PDT("content",""))!=0
12231227
&& (!whitespace_only(zContent) || isDelete)
@@ -1346,10 +1350,11 @@
13461350
srchFlags = search_restrict(SRCH_FORUM);
13471351
if( !g.perm.RdForum ){
13481352
login_needed(g.anon.RdForum);
13491353
return;
13501354
}
1355
+ style_set_current_feature("forum");
13511356
style_header("Forum");
13521357
if( g.perm.WrForum ){
13531358
style_submenu_element("New Thread","%R/forumnew");
13541359
}else{
13551360
/* Can't combine this with previous case using the ternary operator
13561361
--- src/forum.c
+++ src/forum.c
@@ -862,10 +862,11 @@
862 " FROM forumpost, event"
863 " WHERE event.objid=forumpost.fpid"
864 " AND forumpost.fpid=%d;",
865 fpid
866 );
 
867 style_header("%s%s", zThreadTitle, *zThreadTitle ? "" : "Forum");
868 fossil_free(zThreadTitle);
869 if( mode!=FD_CHRONO ){
870 style_submenu_element("Chronological", "%R/%s/%s?t=c%s%s", g.zPath, zName,
871 bUnf ? "&unf" : "", bHist ? "&hist" : "");
@@ -1054,10 +1055,11 @@
1054 }else{
1055 forumnew_page();
1056 }
1057 return;
1058 }
 
1059 style_header("%h As Anonymous?", isEdit ? "Reply" : "Post");
1060 @ <p>You are not logged in.
1061 @ <p><table border="0" cellpadding="10">
1062 @ <tr><td>
1063 @ <form action="%s(zGoto)" method="POST">
@@ -1115,10 +1117,11 @@
1115 }
1116 if( P("preview") && !whitespace_only(zContent) ){
1117 @ <h1>Preview:</h1>
1118 forum_render(zTitle, zMimetype, zContent, "forumEdit", 1);
1119 }
 
1120 style_header("New Forum Thread");
1121 @ <form action="%R/forume1" method="POST">
1122 @ <h1>New Thread:</h1>
1123 forum_from_line();
1124 forum_post_widget(zTitle, zMimetype, zContent);
@@ -1214,10 +1217,11 @@
1214 cgi_redirectf("%R/forum");
1215 }
1216 return;
1217 }
1218 }
 
1219 isDelete = P("nullout")!=0;
1220 if( P("submit")
1221 && isCsrfSafe
1222 && (zContent = PDT("content",""))!=0
1223 && (!whitespace_only(zContent) || isDelete)
@@ -1346,10 +1350,11 @@
1346 srchFlags = search_restrict(SRCH_FORUM);
1347 if( !g.perm.RdForum ){
1348 login_needed(g.anon.RdForum);
1349 return;
1350 }
 
1351 style_header("Forum");
1352 if( g.perm.WrForum ){
1353 style_submenu_element("New Thread","%R/forumnew");
1354 }else{
1355 /* Can't combine this with previous case using the ternary operator
1356
--- src/forum.c
+++ src/forum.c
@@ -862,10 +862,11 @@
862 " FROM forumpost, event"
863 " WHERE event.objid=forumpost.fpid"
864 " AND forumpost.fpid=%d;",
865 fpid
866 );
867 style_set_current_feature("forum");
868 style_header("%s%s", zThreadTitle, *zThreadTitle ? "" : "Forum");
869 fossil_free(zThreadTitle);
870 if( mode!=FD_CHRONO ){
871 style_submenu_element("Chronological", "%R/%s/%s?t=c%s%s", g.zPath, zName,
872 bUnf ? "&unf" : "", bHist ? "&hist" : "");
@@ -1054,10 +1055,11 @@
1055 }else{
1056 forumnew_page();
1057 }
1058 return;
1059 }
1060 style_set_current_feature("forum");
1061 style_header("%h As Anonymous?", isEdit ? "Reply" : "Post");
1062 @ <p>You are not logged in.
1063 @ <p><table border="0" cellpadding="10">
1064 @ <tr><td>
1065 @ <form action="%s(zGoto)" method="POST">
@@ -1115,10 +1117,11 @@
1117 }
1118 if( P("preview") && !whitespace_only(zContent) ){
1119 @ <h1>Preview:</h1>
1120 forum_render(zTitle, zMimetype, zContent, "forumEdit", 1);
1121 }
1122 style_set_current_feature("forum");
1123 style_header("New Forum Thread");
1124 @ <form action="%R/forume1" method="POST">
1125 @ <h1>New Thread:</h1>
1126 forum_from_line();
1127 forum_post_widget(zTitle, zMimetype, zContent);
@@ -1214,10 +1217,11 @@
1217 cgi_redirectf("%R/forum");
1218 }
1219 return;
1220 }
1221 }
1222 style_set_current_feature("forum");
1223 isDelete = P("nullout")!=0;
1224 if( P("submit")
1225 && isCsrfSafe
1226 && (zContent = PDT("content",""))!=0
1227 && (!whitespace_only(zContent) || isDelete)
@@ -1346,10 +1350,11 @@
1350 srchFlags = search_restrict(SRCH_FORUM);
1351 if( !g.perm.RdForum ){
1352 login_needed(g.anon.RdForum);
1353 return;
1354 }
1355 style_set_current_feature("forum");
1356 style_header("Forum");
1357 if( g.perm.WrForum ){
1358 style_submenu_element("New Thread","%R/forumnew");
1359 }else{
1360 /* Can't combine this with previous case using the ternary operator
1361
+6
--- src/info.c
+++ src/info.c
@@ -629,10 +629,11 @@
629629
const char *zPageHide = "ci"; /* Page that hides diffs */
630630
const char *zBrName; /* Branch name */
631631
632632
login_check_credentials();
633633
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
634
+ style_set_current_feature("vinfo");
634635
zName = P("name");
635636
rid = name_to_rid_www("name");
636637
if( rid==0 ){
637638
style_header("Check-in Information Error");
638639
@ No such object: %h(g.argv[2])
@@ -962,10 +963,11 @@
962963
int tagid;
963964
int ridNext;
964965
965966
login_check_credentials();
966967
if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
968
+ style_set_current_feature("winfo");
967969
rid = name_to_rid_www("name");
968970
if( rid==0 || (pWiki = manifest_get(rid, CFTYPE_WIKI, 0))==0 ){
969971
style_header("Wiki Page Information Error");
970972
@ No such object: %h(P("name"))
971973
style_finish_page("winfo");
@@ -1210,10 +1212,11 @@
12101212
if(zGlob && !*zGlob){
12111213
zGlob = NULL;
12121214
}
12131215
diffFlags = construct_diff_flags(diffType);
12141216
zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
1217
+ style_set_current_feature("vdiff");
12151218
if( zBranch==0 ){
12161219
style_submenu_element("Path", "%R/timeline?me=%T&you=%T", zFrom, zTo);
12171220
}
12181221
if( diffType!=0 ){
12191222
style_submenu_element("Hide Diff", "%R/vdiff?%s&diff=0%s%T%s",
@@ -1730,10 +1733,11 @@
17301733
17311734
zV1 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v1);
17321735
zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2);
17331736
diffFlags = construct_diff_flags(diffType) | DIFF_HTML;
17341737
1738
+ style_set_current_feature("fdiff");
17351739
style_header("Diff");
17361740
style_submenu_checkbox("w", "Ignore Whitespace", 0, 0);
17371741
if( diffType==2 ){
17381742
style_submenu_element("Unified Diff", "%R/fdiff?v1=%T&v2=%T&diff=1",
17391743
P("v1"), P("v2"));
@@ -2234,10 +2238,11 @@
22342238
int isBranchCI = 0; /* ci= refers to a branch name */
22352239
char *zHeader = 0;
22362240
22372241
login_check_credentials();
22382242
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
2243
+ style_set_current_feature("artifact");
22392244
22402245
/* Capture and normalize the name= and ci= query parameters */
22412246
if( zName==0 ){
22422247
zName = P("filename");
22432248
if( zName==0 ){
@@ -2590,10 +2595,11 @@
25902595
}
25912596
zTktTitle = db_table_has_column("repository", "ticket", "title" )
25922597
? db_text("(No title)",
25932598
"SELECT title FROM ticket WHERE tkt_uuid=%Q", zTktName)
25942599
: 0;
2600
+ style_set_current_feature("tinfo");
25952601
style_header("Ticket Change Details");
25962602
style_submenu_element("Raw", "%R/artifact/%s", zUuid);
25972603
style_submenu_element("History", "%R/tkthistory/%s", zTktName);
25982604
style_submenu_element("Page", "%R/tktview/%t", zTktName);
25992605
style_submenu_element("Timeline", "%R/tkttimeline/%t", zTktName);
26002606
--- src/info.c
+++ src/info.c
@@ -629,10 +629,11 @@
629 const char *zPageHide = "ci"; /* Page that hides diffs */
630 const char *zBrName; /* Branch name */
631
632 login_check_credentials();
633 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
 
634 zName = P("name");
635 rid = name_to_rid_www("name");
636 if( rid==0 ){
637 style_header("Check-in Information Error");
638 @ No such object: %h(g.argv[2])
@@ -962,10 +963,11 @@
962 int tagid;
963 int ridNext;
964
965 login_check_credentials();
966 if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
 
967 rid = name_to_rid_www("name");
968 if( rid==0 || (pWiki = manifest_get(rid, CFTYPE_WIKI, 0))==0 ){
969 style_header("Wiki Page Information Error");
970 @ No such object: %h(P("name"))
971 style_finish_page("winfo");
@@ -1210,10 +1212,11 @@
1210 if(zGlob && !*zGlob){
1211 zGlob = NULL;
1212 }
1213 diffFlags = construct_diff_flags(diffType);
1214 zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
 
1215 if( zBranch==0 ){
1216 style_submenu_element("Path", "%R/timeline?me=%T&you=%T", zFrom, zTo);
1217 }
1218 if( diffType!=0 ){
1219 style_submenu_element("Hide Diff", "%R/vdiff?%s&diff=0%s%T%s",
@@ -1730,10 +1733,11 @@
1730
1731 zV1 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v1);
1732 zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2);
1733 diffFlags = construct_diff_flags(diffType) | DIFF_HTML;
1734
 
1735 style_header("Diff");
1736 style_submenu_checkbox("w", "Ignore Whitespace", 0, 0);
1737 if( diffType==2 ){
1738 style_submenu_element("Unified Diff", "%R/fdiff?v1=%T&v2=%T&diff=1",
1739 P("v1"), P("v2"));
@@ -2234,10 +2238,11 @@
2234 int isBranchCI = 0; /* ci= refers to a branch name */
2235 char *zHeader = 0;
2236
2237 login_check_credentials();
2238 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
 
2239
2240 /* Capture and normalize the name= and ci= query parameters */
2241 if( zName==0 ){
2242 zName = P("filename");
2243 if( zName==0 ){
@@ -2590,10 +2595,11 @@
2590 }
2591 zTktTitle = db_table_has_column("repository", "ticket", "title" )
2592 ? db_text("(No title)",
2593 "SELECT title FROM ticket WHERE tkt_uuid=%Q", zTktName)
2594 : 0;
 
2595 style_header("Ticket Change Details");
2596 style_submenu_element("Raw", "%R/artifact/%s", zUuid);
2597 style_submenu_element("History", "%R/tkthistory/%s", zTktName);
2598 style_submenu_element("Page", "%R/tktview/%t", zTktName);
2599 style_submenu_element("Timeline", "%R/tkttimeline/%t", zTktName);
2600
--- src/info.c
+++ src/info.c
@@ -629,10 +629,11 @@
629 const char *zPageHide = "ci"; /* Page that hides diffs */
630 const char *zBrName; /* Branch name */
631
632 login_check_credentials();
633 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
634 style_set_current_feature("vinfo");
635 zName = P("name");
636 rid = name_to_rid_www("name");
637 if( rid==0 ){
638 style_header("Check-in Information Error");
639 @ No such object: %h(g.argv[2])
@@ -962,10 +963,11 @@
963 int tagid;
964 int ridNext;
965
966 login_check_credentials();
967 if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
968 style_set_current_feature("winfo");
969 rid = name_to_rid_www("name");
970 if( rid==0 || (pWiki = manifest_get(rid, CFTYPE_WIKI, 0))==0 ){
971 style_header("Wiki Page Information Error");
972 @ No such object: %h(P("name"))
973 style_finish_page("winfo");
@@ -1210,10 +1212,11 @@
1212 if(zGlob && !*zGlob){
1213 zGlob = NULL;
1214 }
1215 diffFlags = construct_diff_flags(diffType);
1216 zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
1217 style_set_current_feature("vdiff");
1218 if( zBranch==0 ){
1219 style_submenu_element("Path", "%R/timeline?me=%T&you=%T", zFrom, zTo);
1220 }
1221 if( diffType!=0 ){
1222 style_submenu_element("Hide Diff", "%R/vdiff?%s&diff=0%s%T%s",
@@ -1730,10 +1733,11 @@
1733
1734 zV1 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v1);
1735 zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2);
1736 diffFlags = construct_diff_flags(diffType) | DIFF_HTML;
1737
1738 style_set_current_feature("fdiff");
1739 style_header("Diff");
1740 style_submenu_checkbox("w", "Ignore Whitespace", 0, 0);
1741 if( diffType==2 ){
1742 style_submenu_element("Unified Diff", "%R/fdiff?v1=%T&v2=%T&diff=1",
1743 P("v1"), P("v2"));
@@ -2234,10 +2238,11 @@
2238 int isBranchCI = 0; /* ci= refers to a branch name */
2239 char *zHeader = 0;
2240
2241 login_check_credentials();
2242 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
2243 style_set_current_feature("artifact");
2244
2245 /* Capture and normalize the name= and ci= query parameters */
2246 if( zName==0 ){
2247 zName = P("filename");
2248 if( zName==0 ){
@@ -2590,10 +2595,11 @@
2595 }
2596 zTktTitle = db_table_has_column("repository", "ticket", "title" )
2597 ? db_text("(No title)",
2598 "SELECT title FROM ticket WHERE tkt_uuid=%Q", zTktName)
2599 : 0;
2600 style_set_current_feature("tinfo");
2601 style_header("Ticket Change Details");
2602 style_submenu_element("Raw", "%R/artifact/%s", zUuid);
2603 style_submenu_element("History", "%R/tkthistory/%s", zTktName);
2604 style_submenu_element("Page", "%R/tktview/%t", zTktName);
2605 style_submenu_element("Timeline", "%R/tkttimeline/%t", zTktName);
2606
--- src/interwiki.c
+++ src/interwiki.c
@@ -343,10 +343,11 @@
343343
zTag, zBase, zHash, zWiki);
344344
db_protect_pop();
345345
}
346346
}
347347
348
+ style_set_current_feature("interwiki");
348349
style_header("Interwiki Map Configuration");
349350
@ <p>Interwiki links are hyperlink targets of the form
350351
@ <blockquote><i>Tag</i><b>:</b><i>PageName</i></blockquote>
351352
@ <p>Such links resolve to links to <i>PageName</i> on a separate server
352353
@ identified by <i>Tag</i>. The Interwiki Map or "intermap" is a mapping
353354
--- src/interwiki.c
+++ src/interwiki.c
@@ -343,10 +343,11 @@
343 zTag, zBase, zHash, zWiki);
344 db_protect_pop();
345 }
346 }
347
 
348 style_header("Interwiki Map Configuration");
349 @ <p>Interwiki links are hyperlink targets of the form
350 @ <blockquote><i>Tag</i><b>:</b><i>PageName</i></blockquote>
351 @ <p>Such links resolve to links to <i>PageName</i> on a separate server
352 @ identified by <i>Tag</i>. The Interwiki Map or "intermap" is a mapping
353
--- src/interwiki.c
+++ src/interwiki.c
@@ -343,10 +343,11 @@
343 zTag, zBase, zHash, zWiki);
344 db_protect_pop();
345 }
346 }
347
348 style_set_current_feature("interwiki");
349 style_header("Interwiki Map Configuration");
350 @ <p>Interwiki links are hyperlink targets of the form
351 @ <blockquote><i>Tag</i><b>:</b><i>PageName</i></blockquote>
352 @ <p>Such links resolve to links to <i>PageName</i> on a separate server
353 @ identified by <i>Tag</i>. The Interwiki Map or "intermap" is a mapping
354
--- src/loadctrl.c
+++ src/loadctrl.c
@@ -52,10 +52,11 @@
5252
*/
5353
void load_control(void){
5454
double mxLoad = atof(db_get("max-loadavg", 0));
5555
if( mxLoad<=0.0 || mxLoad>=load_average() ) return;
5656
57
+ style_set_current_feature("test");
5758
style_header("Server Overload");
5859
@ <h2>The server load is currently too high.
5960
@ Please try again later.</h2>
6061
@ <p>Current load average: %f(load_average()).<br />
6162
@ Load average limit: %f(mxLoad)</p>
6263
--- src/loadctrl.c
+++ src/loadctrl.c
@@ -52,10 +52,11 @@
52 */
53 void load_control(void){
54 double mxLoad = atof(db_get("max-loadavg", 0));
55 if( mxLoad<=0.0 || mxLoad>=load_average() ) return;
56
 
57 style_header("Server Overload");
58 @ <h2>The server load is currently too high.
59 @ Please try again later.</h2>
60 @ <p>Current load average: %f(load_average()).<br />
61 @ Load average limit: %f(mxLoad)</p>
62
--- src/loadctrl.c
+++ src/loadctrl.c
@@ -52,10 +52,11 @@
52 */
53 void load_control(void){
54 double mxLoad = atof(db_get("max-loadavg", 0));
55 if( mxLoad<=0.0 || mxLoad>=load_average() ) return;
56
57 style_set_current_feature("test");
58 style_header("Server Overload");
59 @ <h2>The server load is currently too high.
60 @ Please try again later.</h2>
61 @ <p>Current load average: %f(load_average()).<br />
62 @ Load average limit: %f(mxLoad)</p>
63
--- src/login.c
+++ src/login.c
@@ -656,10 +656,11 @@
656656
*/
657657
login_set_user_cookie(zUsername, uid, NULL, rememberMe?0:1);
658658
redirect_to_g();
659659
}
660660
}
661
+ style_set_current_feature("login");
661662
style_header("Login/Logout");
662663
style_adunit_config(ADUNIT_OFF);
663664
@ %s(zErrMsg)
664665
if( zGoto && !noAnon ){
665666
char *zAbbrev = fossil_strdup(zGoto);
666667
--- src/login.c
+++ src/login.c
@@ -656,10 +656,11 @@
656 */
657 login_set_user_cookie(zUsername, uid, NULL, rememberMe?0:1);
658 redirect_to_g();
659 }
660 }
 
661 style_header("Login/Logout");
662 style_adunit_config(ADUNIT_OFF);
663 @ %s(zErrMsg)
664 if( zGoto && !noAnon ){
665 char *zAbbrev = fossil_strdup(zGoto);
666
--- src/login.c
+++ src/login.c
@@ -656,10 +656,11 @@
656 */
657 login_set_user_cookie(zUsername, uid, NULL, rememberMe?0:1);
658 redirect_to_g();
659 }
660 }
661 style_set_current_feature("login");
662 style_header("Login/Logout");
663 style_adunit_config(ADUNIT_OFF);
664 @ %s(zErrMsg)
665 if( zGoto && !noAnon ){
666 char *zAbbrev = fossil_strdup(zGoto);
667
+1
--- src/main.c
+++ src/main.c
@@ -3049,10 +3049,11 @@
30493049
login_check_credentials();
30503050
if( !g.perm.Admin ){
30513051
login_needed(0);
30523052
return;
30533053
}
3054
+ style_set_current_feature("test");
30543055
style_header("Warning Test Page");
30553056
style_submenu_element("Error Log","%R/errorlog");
30563057
if( iCase<1 || iCase>4 ){
30573058
@ <p>Generate a message to the <a href="%R/errorlog">error log</a>
30583059
@ by clicking on one of the following cases:
30593060
--- src/main.c
+++ src/main.c
@@ -3049,10 +3049,11 @@
3049 login_check_credentials();
3050 if( !g.perm.Admin ){
3051 login_needed(0);
3052 return;
3053 }
 
3054 style_header("Warning Test Page");
3055 style_submenu_element("Error Log","%R/errorlog");
3056 if( iCase<1 || iCase>4 ){
3057 @ <p>Generate a message to the <a href="%R/errorlog">error log</a>
3058 @ by clicking on one of the following cases:
3059
--- src/main.c
+++ src/main.c
@@ -3049,10 +3049,11 @@
3049 login_check_credentials();
3050 if( !g.perm.Admin ){
3051 login_needed(0);
3052 return;
3053 }
3054 style_set_current_feature("test");
3055 style_header("Warning Test Page");
3056 style_submenu_element("Error Log","%R/errorlog");
3057 if( iCase<1 || iCase>4 ){
3058 @ <p>Generate a message to the <a href="%R/errorlog">error log</a>
3059 @ by clicking on one of the following cases:
3060
+1
--- src/path.c
+++ src/path.c
@@ -617,10 +617,11 @@
617617
int nRename;
618618
int nCheckin;
619619
620620
login_check_credentials();
621621
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
622
+ style_set_current_feature("test");
622623
if( P("all")!=0 ){
623624
style_header("List Of All Filename Changes");
624625
db_multi_exec("%s", zRenameQuery/*safe-for-%s*/);
625626
style_submenu_element("Distinct", "%R/test-rename-list");
626627
}else{
627628
--- src/path.c
+++ src/path.c
@@ -617,10 +617,11 @@
617 int nRename;
618 int nCheckin;
619
620 login_check_credentials();
621 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
 
622 if( P("all")!=0 ){
623 style_header("List Of All Filename Changes");
624 db_multi_exec("%s", zRenameQuery/*safe-for-%s*/);
625 style_submenu_element("Distinct", "%R/test-rename-list");
626 }else{
627
--- src/path.c
+++ src/path.c
@@ -617,10 +617,11 @@
617 int nRename;
618 int nCheckin;
619
620 login_check_credentials();
621 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
622 style_set_current_feature("test");
623 if( P("all")!=0 ){
624 style_header("List Of All Filename Changes");
625 db_multi_exec("%s", zRenameQuery/*safe-for-%s*/);
626 style_submenu_element("Distinct", "%R/test-rename-list");
627 }else{
628
--- src/piechart.c
+++ src/piechart.c
@@ -277,10 +277,11 @@
277277
int width;
278278
int height;
279279
int i, j;
280280
281281
login_check_credentials();
282
+ style_set_current_feature("test");
282283
style_header("Pie Chart Test");
283284
db_multi_exec("CREATE TEMP TABLE piechart(amt REAL, label TEXT);");
284285
db_prepare(&ins, "INSERT INTO piechart(amt,label) VALUES(:amt,:label)");
285286
zData = PD("data","");
286287
width = atoi(PD("width","800"));
287288
--- src/piechart.c
+++ src/piechart.c
@@ -277,10 +277,11 @@
277 int width;
278 int height;
279 int i, j;
280
281 login_check_credentials();
 
282 style_header("Pie Chart Test");
283 db_multi_exec("CREATE TEMP TABLE piechart(amt REAL, label TEXT);");
284 db_prepare(&ins, "INSERT INTO piechart(amt,label) VALUES(:amt,:label)");
285 zData = PD("data","");
286 width = atoi(PD("width","800"));
287
--- src/piechart.c
+++ src/piechart.c
@@ -277,10 +277,11 @@
277 int width;
278 int height;
279 int i, j;
280
281 login_check_credentials();
282 style_set_current_feature("test");
283 style_header("Pie Chart Test");
284 db_multi_exec("CREATE TEMP TABLE piechart(amt REAL, label TEXT);");
285 db_prepare(&ins, "INSERT INTO piechart(amt,label) VALUES(:amt,:label)");
286 zData = PD("data","");
287 width = atoi(PD("width","800"));
288
--- src/printf.c
+++ src/printf.c
@@ -1116,10 +1116,11 @@
11161116
#endif
11171117
if( g.cgiOutput==1 && g.db ){
11181118
g.cgiOutput = 2;
11191119
cgi_reset_content();
11201120
cgi_set_content_type("text/html");
1121
+ style_set_current_feature("error");
11211122
style_header("Bad Request");
11221123
etag_cancel();
11231124
@ <p class="generalError">%h(z)</p>
11241125
cgi_set_status(400, "Bad Request");
11251126
style_finish_page("error");
11261127
--- src/printf.c
+++ src/printf.c
@@ -1116,10 +1116,11 @@
1116 #endif
1117 if( g.cgiOutput==1 && g.db ){
1118 g.cgiOutput = 2;
1119 cgi_reset_content();
1120 cgi_set_content_type("text/html");
 
1121 style_header("Bad Request");
1122 etag_cancel();
1123 @ <p class="generalError">%h(z)</p>
1124 cgi_set_status(400, "Bad Request");
1125 style_finish_page("error");
1126
--- src/printf.c
+++ src/printf.c
@@ -1116,10 +1116,11 @@
1116 #endif
1117 if( g.cgiOutput==1 && g.db ){
1118 g.cgiOutput = 2;
1119 cgi_reset_content();
1120 cgi_set_content_type("text/html");
1121 style_set_current_feature("error");
1122 style_header("Bad Request");
1123 etag_cancel();
1124 @ <p class="generalError">%h(z)</p>
1125 cgi_set_status(400, "Bad Request");
1126 style_finish_page("error");
1127
--- src/repolist.c
+++ src/repolist.c
@@ -245,10 +245,11 @@
245245
/* This case runs if remote_repository_info() found a repository
246246
** that has the "repolist_skin" property set to non-zero and left
247247
** that repository open in g.db. Use the skin of that repository
248248
** for display. */
249249
login_check_credentials();
250
+ style_set_current_feature("repolist");
250251
style_header("Repository List");
251252
@ %s(blob_str(&html))
252253
style_table_sorter();
253254
style_finish_page("repolist");
254255
}else{
255256
--- src/repolist.c
+++ src/repolist.c
@@ -245,10 +245,11 @@
245 /* This case runs if remote_repository_info() found a repository
246 ** that has the "repolist_skin" property set to non-zero and left
247 ** that repository open in g.db. Use the skin of that repository
248 ** for display. */
249 login_check_credentials();
 
250 style_header("Repository List");
251 @ %s(blob_str(&html))
252 style_table_sorter();
253 style_finish_page("repolist");
254 }else{
255
--- src/repolist.c
+++ src/repolist.c
@@ -245,10 +245,11 @@
245 /* This case runs if remote_repository_info() found a repository
246 ** that has the "repolist_skin" property set to non-zero and left
247 ** that repository open in g.db. Use the skin of that repository
248 ** for display. */
249 login_check_credentials();
250 style_set_current_feature("repolist");
251 style_header("Repository List");
252 @ %s(blob_str(&html))
253 style_table_sorter();
254 style_finish_page("repolist");
255 }else{
256
--- src/report.c
+++ src/report.c
@@ -325,10 +325,11 @@
325325
return;
326326
}
327327
rn = atoi(PD("rn","0"));
328328
db_prepare(&q, "SELECT title, sqlcode, owner, cols "
329329
"FROM reportfmt WHERE rn=%d",rn);
330
+ style_set_current_feature("report");
330331
style_header("SQL For Report Format Number %d", rn);
331332
if( db_step(&q)!=SQLITE_ROW ){
332333
@ <p>Unknown report number: %d(rn)</p>
333334
style_finish_page("report");
334335
db_finalize(&q);
@@ -381,10 +382,11 @@
381382
login_check_credentials();
382383
if( !g.perm.TktFmt ){
383384
login_needed(g.anon.TktFmt);
384385
return;
385386
}
387
+ style_set_current_feature("report");
386388
/*view_add_functions(0);*/
387389
rn = atoi(PD("rn","0"));
388390
zTitle = P("t");
389391
zOwner = PD("w",g.zLogin);
390392
z = P("s");
@@ -1029,10 +1031,11 @@
10291031
count = 0;
10301032
if( !tabs ){
10311033
struct GenerateHTML sState = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
10321034
10331035
db_multi_exec("PRAGMA empty_result_callbacks=ON");
1036
+ style_set_current_feature("report");
10341037
style_submenu_element("Raw", "rptview?tablist=1&%h", PD("QUERY_STRING",""));
10351038
if( g.perm.Admin
10361039
|| (g.perm.TktFmt && g.zLogin && fossil_strcmp(g.zLogin,zOwner)==0) ){
10371040
style_submenu_element("Edit", "rptedit?rn=%d", rn);
10381041
}
10391042
--- src/report.c
+++ src/report.c
@@ -325,10 +325,11 @@
325 return;
326 }
327 rn = atoi(PD("rn","0"));
328 db_prepare(&q, "SELECT title, sqlcode, owner, cols "
329 "FROM reportfmt WHERE rn=%d",rn);
 
330 style_header("SQL For Report Format Number %d", rn);
331 if( db_step(&q)!=SQLITE_ROW ){
332 @ <p>Unknown report number: %d(rn)</p>
333 style_finish_page("report");
334 db_finalize(&q);
@@ -381,10 +382,11 @@
381 login_check_credentials();
382 if( !g.perm.TktFmt ){
383 login_needed(g.anon.TktFmt);
384 return;
385 }
 
386 /*view_add_functions(0);*/
387 rn = atoi(PD("rn","0"));
388 zTitle = P("t");
389 zOwner = PD("w",g.zLogin);
390 z = P("s");
@@ -1029,10 +1031,11 @@
1029 count = 0;
1030 if( !tabs ){
1031 struct GenerateHTML sState = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
1032
1033 db_multi_exec("PRAGMA empty_result_callbacks=ON");
 
1034 style_submenu_element("Raw", "rptview?tablist=1&%h", PD("QUERY_STRING",""));
1035 if( g.perm.Admin
1036 || (g.perm.TktFmt && g.zLogin && fossil_strcmp(g.zLogin,zOwner)==0) ){
1037 style_submenu_element("Edit", "rptedit?rn=%d", rn);
1038 }
1039
--- src/report.c
+++ src/report.c
@@ -325,10 +325,11 @@
325 return;
326 }
327 rn = atoi(PD("rn","0"));
328 db_prepare(&q, "SELECT title, sqlcode, owner, cols "
329 "FROM reportfmt WHERE rn=%d",rn);
330 style_set_current_feature("report");
331 style_header("SQL For Report Format Number %d", rn);
332 if( db_step(&q)!=SQLITE_ROW ){
333 @ <p>Unknown report number: %d(rn)</p>
334 style_finish_page("report");
335 db_finalize(&q);
@@ -381,10 +382,11 @@
382 login_check_credentials();
383 if( !g.perm.TktFmt ){
384 login_needed(g.anon.TktFmt);
385 return;
386 }
387 style_set_current_feature("report");
388 /*view_add_functions(0);*/
389 rn = atoi(PD("rn","0"));
390 zTitle = P("t");
391 zOwner = PD("w",g.zLogin);
392 z = P("s");
@@ -1029,10 +1031,11 @@
1031 count = 0;
1032 if( !tabs ){
1033 struct GenerateHTML sState = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
1034
1035 db_multi_exec("PRAGMA empty_result_callbacks=ON");
1036 style_set_current_feature("report");
1037 style_submenu_element("Raw", "rptview?tablist=1&%h", PD("QUERY_STRING",""));
1038 if( g.perm.Admin
1039 || (g.perm.TktFmt && g.zLogin && fossil_strcmp(g.zLogin,zOwner)==0) ){
1040 style_submenu_element("Edit", "rptedit?rn=%d", rn);
1041 }
1042
--- src/search.c
+++ src/search.c
@@ -1979,10 +1979,11 @@
19791979
const char *zIdxed = P("ixed");
19801980
int id;
19811981
int cnt1 = 0, cnt2 = 0, cnt3 = 0;
19821982
login_check_credentials();
19831983
if( !g.perm.Admin ){ login_needed(0); return; }
1984
+ style_set_current_feature("test");
19841985
if( !search_index_exists() ){
19851986
@ <p>Indexed search is disabled
19861987
style_finish_page("report");
19871988
return;
19881989
}
19891990
--- src/search.c
+++ src/search.c
@@ -1979,10 +1979,11 @@
1979 const char *zIdxed = P("ixed");
1980 int id;
1981 int cnt1 = 0, cnt2 = 0, cnt3 = 0;
1982 login_check_credentials();
1983 if( !g.perm.Admin ){ login_needed(0); return; }
 
1984 if( !search_index_exists() ){
1985 @ <p>Indexed search is disabled
1986 style_finish_page("report");
1987 return;
1988 }
1989
--- src/search.c
+++ src/search.c
@@ -1979,10 +1979,11 @@
1979 const char *zIdxed = P("ixed");
1980 int id;
1981 int cnt1 = 0, cnt2 = 0, cnt3 = 0;
1982 login_check_credentials();
1983 if( !g.perm.Admin ){ login_needed(0); return; }
1984 style_set_current_feature("test");
1985 if( !search_index_exists() ){
1986 @ <p>Indexed search is disabled
1987 style_finish_page("report");
1988 return;
1989 }
1990
+15
--- src/setup.c
+++ src/setup.c
@@ -73,10 +73,11 @@
7373
if( !g.perm.Admin ){
7474
login_needed(0);
7575
}
7676
setup_user = g.perm.Setup;
7777
78
+ style_set_current_feature("setup");
7879
style_header("Server Administration");
7980
8081
/* Make sure the header contains <base href="...">. Issue a warning
8182
** if it does not. */
8283
if( !cgi_header_contains("<base href=") ){
@@ -339,10 +340,11 @@
339340
if( !g.perm.Setup ){
340341
login_needed(0);
341342
return;
342343
}
343344
345
+ style_set_current_feature("setup");
344346
style_header("Access Control Settings");
345347
db_begin_transaction();
346348
@ <form action="%R/setup_access" method="post"><div>
347349
login_insert_csrf_secret();
348350
@ <input type="submit" name="submit" value="Apply Changes" /></p>
@@ -608,10 +610,11 @@
608610
if( P("join")!=0 ){
609611
login_group_join(zRepo, 1, zLogin, zPw, zNewName, &zErrMsg);
610612
}else if( P("leave") ){
611613
login_group_leave(&zErrMsg);
612614
}
615
+ style_set_current_feature("setup");
613616
style_header("Login Group Configuration");
614617
if( zErrMsg ){
615618
@ <p class="generalError">%s(zErrMsg)</p>
616619
}
617620
zGroup = login_group_name();
@@ -729,10 +732,11 @@
729732
if( !g.perm.Admin ){
730733
login_needed(0);
731734
return;
732735
}
733736
737
+ style_set_current_feature("setup");
734738
style_header("Timeline Display Preferences");
735739
db_begin_transaction();
736740
@ <form action="%R/setup_timeline" method="post"><div>
737741
login_insert_csrf_secret();
738742
@ <p><input type="submit" name="submit" value="Apply Changes" /></p>
@@ -864,10 +868,11 @@
864868
if( !g.perm.Setup ){
865869
login_needed(0);
866870
return;
867871
}
868872
873
+ style_set_current_feature("setup");
869874
style_header("Settings");
870875
if(!g.repositoryOpen){
871876
/* Provide read-only access to versioned settings,
872877
but only if no repo file was explicitly provided. */
873878
db_open_local(0);
@@ -951,10 +956,11 @@
951956
if( !g.perm.Setup ){
952957
login_needed(0);
953958
return;
954959
}
955960
961
+ style_set_current_feature("setup");
956962
style_header("WWW Configuration");
957963
db_begin_transaction();
958964
@ <form action="%R/setup_config" method="post"><div>
959965
login_insert_csrf_secret();
960966
@ <input type="submit" name="submit" value="Apply Changes" /></p>
@@ -1047,10 +1053,11 @@
10471053
if( !g.perm.Setup ){
10481054
login_needed(0);
10491055
return;
10501056
}
10511057
1058
+ style_set_current_feature("setup");
10521059
style_header("Wiki Configuration");
10531060
db_begin_transaction();
10541061
@ <form action="%R/setup_wiki" method="post"><div>
10551062
login_insert_csrf_secret();
10561063
@ <input type="submit" name="submit" value="Apply Changes" /></p>
@@ -1123,10 +1130,11 @@
11231130
if( !g.perm.Admin ){
11241131
login_needed(0);
11251132
return;
11261133
}
11271134
1135
+ style_set_current_feature("setup");
11281136
style_header("Moderator For Wiki And Tickets");
11291137
db_begin_transaction();
11301138
@ <form action="%R/setup_modreq" method="post"><div>
11311139
login_insert_csrf_secret();
11321140
@ <hr />
@@ -1180,10 +1188,11 @@
11801188
cgi_replace_parameter("adunit","");
11811189
cgi_replace_parameter("adright","");
11821190
setup_incr_cfgcnt();
11831191
}
11841192
1193
+ style_set_current_feature("setup");
11851194
style_header("Edit Ad Unit");
11861195
@ <form action="%R/setup_adunit" method="post"><div>
11871196
login_insert_csrf_secret();
11881197
@ <b>Banner Ad-Unit:</b><br />
11891198
textarea_attribute("", 6, 80, "adunit", "adunit", "", 0);
@@ -1361,10 +1370,11 @@
13611370
);
13621371
db_protect_pop();
13631372
db_end_transaction(0);
13641373
cgi_redirect("setup_logo");
13651374
}
1375
+ style_set_current_feature("setup");
13661376
style_header("Edit Project Logo And Background");
13671377
@ <p>The current project logo has a MIME-Type of <b>%h(zLogoMime)</b>
13681378
@ and looks like this:</p>
13691379
@ <blockquote><p><img src="%R/logo/%z(zLogoMtime)" \
13701380
@ alt="logo" border="1" />
@@ -1481,10 +1491,11 @@
14811491
login_needed(0);
14821492
return;
14831493
}
14841494
add_content_sql_commands(g.db);
14851495
zQ = cgi_csrf_safe(1) ? P("q") : 0;
1496
+ style_set_current_feature("setup");
14861497
style_header("Raw SQL Commands");
14871498
@ <p><b>Caution:</b> There are no restrictions on the SQL that can be
14881499
@ run by this page. You can do serious and irrepairable damage to the
14891500
@ repository. Proceed with extreme caution.</p>
14901501
@
@@ -1618,10 +1629,11 @@
16181629
login_check_credentials();
16191630
if( !g.perm.Setup ){
16201631
login_needed(0);
16211632
return;
16221633
}
1634
+ style_set_current_feature("setup");
16231635
style_header("Raw TH1 Commands");
16241636
@ <p><b>Caution:</b> There are no restrictions on the TH1 that can be
16251637
@ run by this page. If Tcl integration was enabled at compile-time and
16261638
@ the "tcl" setting is enabled, Tcl commands may be run as well.</p>
16271639
@
@@ -1664,10 +1676,11 @@
16641676
login_check_credentials();
16651677
if( !g.perm.Admin ){
16661678
login_needed(0);
16671679
return;
16681680
}
1681
+ style_set_current_feature("setup");
16691682
style_header("Admin Log");
16701683
create_admin_log_table();
16711684
limit = atoi(PD("n","200"));
16721685
ofst = atoi(PD("x","0"));
16731686
fLogEnabled = db_get_boolean("admin-log", 0);
@@ -1724,10 +1737,11 @@
17241737
login_check_credentials();
17251738
if( !g.perm.Admin ){
17261739
login_needed(0);
17271740
return;
17281741
}
1742
+ style_set_current_feature("setup");
17291743
style_header("Search Configuration");
17301744
@ <form action="%R/srchsetup" method="post"><div>
17311745
login_insert_csrf_secret();
17321746
@ <div style="text-align:center;font-weight:bold;">
17331747
@ Server-specific settings that affect the
@@ -1849,10 +1863,11 @@
18491863
login_check_credentials();
18501864
if( !g.perm.Admin ){
18511865
login_needed(0);
18521866
return;
18531867
}
1868
+ style_set_current_feature("setup");
18541869
style_header("URL Alias Configuration");
18551870
if( P("submit")!=0 ){
18561871
Blob token;
18571872
Blob sql;
18581873
const char *zNewName;
18591874
--- src/setup.c
+++ src/setup.c
@@ -73,10 +73,11 @@
73 if( !g.perm.Admin ){
74 login_needed(0);
75 }
76 setup_user = g.perm.Setup;
77
 
78 style_header("Server Administration");
79
80 /* Make sure the header contains <base href="...">. Issue a warning
81 ** if it does not. */
82 if( !cgi_header_contains("<base href=") ){
@@ -339,10 +340,11 @@
339 if( !g.perm.Setup ){
340 login_needed(0);
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>
@@ -608,10 +610,11 @@
608 if( P("join")!=0 ){
609 login_group_join(zRepo, 1, zLogin, zPw, zNewName, &zErrMsg);
610 }else if( P("leave") ){
611 login_group_leave(&zErrMsg);
612 }
 
613 style_header("Login Group Configuration");
614 if( zErrMsg ){
615 @ <p class="generalError">%s(zErrMsg)</p>
616 }
617 zGroup = login_group_name();
@@ -729,10 +732,11 @@
729 if( !g.perm.Admin ){
730 login_needed(0);
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>
@@ -864,10 +868,11 @@
864 if( !g.perm.Setup ){
865 login_needed(0);
866 return;
867 }
868
 
869 style_header("Settings");
870 if(!g.repositoryOpen){
871 /* Provide read-only access to versioned settings,
872 but only if no repo file was explicitly provided. */
873 db_open_local(0);
@@ -951,10 +956,11 @@
951 if( !g.perm.Setup ){
952 login_needed(0);
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>
@@ -1047,10 +1053,11 @@
1047 if( !g.perm.Setup ){
1048 login_needed(0);
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>
@@ -1123,10 +1130,11 @@
1123 if( !g.perm.Admin ){
1124 login_needed(0);
1125 return;
1126 }
1127
 
1128 style_header("Moderator For Wiki And Tickets");
1129 db_begin_transaction();
1130 @ <form action="%R/setup_modreq" method="post"><div>
1131 login_insert_csrf_secret();
1132 @ <hr />
@@ -1180,10 +1188,11 @@
1180 cgi_replace_parameter("adunit","");
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);
@@ -1361,10 +1370,11 @@
1361 );
1362 db_protect_pop();
1363 db_end_transaction(0);
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" />
@@ -1481,10 +1491,11 @@
1481 login_needed(0);
1482 return;
1483 }
1484 add_content_sql_commands(g.db);
1485 zQ = cgi_csrf_safe(1) ? P("q") : 0;
 
1486 style_header("Raw SQL Commands");
1487 @ <p><b>Caution:</b> There are no restrictions on the SQL that can be
1488 @ run by this page. You can do serious and irrepairable damage to the
1489 @ repository. Proceed with extreme caution.</p>
1490 @
@@ -1618,10 +1629,11 @@
1618 login_check_credentials();
1619 if( !g.perm.Setup ){
1620 login_needed(0);
1621 return;
1622 }
 
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 @
@@ -1664,10 +1676,11 @@
1664 login_check_credentials();
1665 if( !g.perm.Admin ){
1666 login_needed(0);
1667 return;
1668 }
 
1669 style_header("Admin Log");
1670 create_admin_log_table();
1671 limit = atoi(PD("n","200"));
1672 ofst = atoi(PD("x","0"));
1673 fLogEnabled = db_get_boolean("admin-log", 0);
@@ -1724,10 +1737,11 @@
1724 login_check_credentials();
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
@@ -1849,10 +1863,11 @@
1849 login_check_credentials();
1850 if( !g.perm.Admin ){
1851 login_needed(0);
1852 return;
1853 }
 
1854 style_header("URL Alias Configuration");
1855 if( P("submit")!=0 ){
1856 Blob token;
1857 Blob sql;
1858 const char *zNewName;
1859
--- src/setup.c
+++ src/setup.c
@@ -73,10 +73,11 @@
73 if( !g.perm.Admin ){
74 login_needed(0);
75 }
76 setup_user = g.perm.Setup;
77
78 style_set_current_feature("setup");
79 style_header("Server Administration");
80
81 /* Make sure the header contains <base href="...">. Issue a warning
82 ** if it does not. */
83 if( !cgi_header_contains("<base href=") ){
@@ -339,10 +340,11 @@
340 if( !g.perm.Setup ){
341 login_needed(0);
342 return;
343 }
344
345 style_set_current_feature("setup");
346 style_header("Access Control Settings");
347 db_begin_transaction();
348 @ <form action="%R/setup_access" method="post"><div>
349 login_insert_csrf_secret();
350 @ <input type="submit" name="submit" value="Apply Changes" /></p>
@@ -608,10 +610,11 @@
610 if( P("join")!=0 ){
611 login_group_join(zRepo, 1, zLogin, zPw, zNewName, &zErrMsg);
612 }else if( P("leave") ){
613 login_group_leave(&zErrMsg);
614 }
615 style_set_current_feature("setup");
616 style_header("Login Group Configuration");
617 if( zErrMsg ){
618 @ <p class="generalError">%s(zErrMsg)</p>
619 }
620 zGroup = login_group_name();
@@ -729,10 +732,11 @@
732 if( !g.perm.Admin ){
733 login_needed(0);
734 return;
735 }
736
737 style_set_current_feature("setup");
738 style_header("Timeline Display Preferences");
739 db_begin_transaction();
740 @ <form action="%R/setup_timeline" method="post"><div>
741 login_insert_csrf_secret();
742 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
@@ -864,10 +868,11 @@
868 if( !g.perm.Setup ){
869 login_needed(0);
870 return;
871 }
872
873 style_set_current_feature("setup");
874 style_header("Settings");
875 if(!g.repositoryOpen){
876 /* Provide read-only access to versioned settings,
877 but only if no repo file was explicitly provided. */
878 db_open_local(0);
@@ -951,10 +956,11 @@
956 if( !g.perm.Setup ){
957 login_needed(0);
958 return;
959 }
960
961 style_set_current_feature("setup");
962 style_header("WWW Configuration");
963 db_begin_transaction();
964 @ <form action="%R/setup_config" method="post"><div>
965 login_insert_csrf_secret();
966 @ <input type="submit" name="submit" value="Apply Changes" /></p>
@@ -1047,10 +1053,11 @@
1053 if( !g.perm.Setup ){
1054 login_needed(0);
1055 return;
1056 }
1057
1058 style_set_current_feature("setup");
1059 style_header("Wiki Configuration");
1060 db_begin_transaction();
1061 @ <form action="%R/setup_wiki" method="post"><div>
1062 login_insert_csrf_secret();
1063 @ <input type="submit" name="submit" value="Apply Changes" /></p>
@@ -1123,10 +1130,11 @@
1130 if( !g.perm.Admin ){
1131 login_needed(0);
1132 return;
1133 }
1134
1135 style_set_current_feature("setup");
1136 style_header("Moderator For Wiki And Tickets");
1137 db_begin_transaction();
1138 @ <form action="%R/setup_modreq" method="post"><div>
1139 login_insert_csrf_secret();
1140 @ <hr />
@@ -1180,10 +1188,11 @@
1188 cgi_replace_parameter("adunit","");
1189 cgi_replace_parameter("adright","");
1190 setup_incr_cfgcnt();
1191 }
1192
1193 style_set_current_feature("setup");
1194 style_header("Edit Ad Unit");
1195 @ <form action="%R/setup_adunit" method="post"><div>
1196 login_insert_csrf_secret();
1197 @ <b>Banner Ad-Unit:</b><br />
1198 textarea_attribute("", 6, 80, "adunit", "adunit", "", 0);
@@ -1361,10 +1370,11 @@
1370 );
1371 db_protect_pop();
1372 db_end_transaction(0);
1373 cgi_redirect("setup_logo");
1374 }
1375 style_set_current_feature("setup");
1376 style_header("Edit Project Logo And Background");
1377 @ <p>The current project logo has a MIME-Type of <b>%h(zLogoMime)</b>
1378 @ and looks like this:</p>
1379 @ <blockquote><p><img src="%R/logo/%z(zLogoMtime)" \
1380 @ alt="logo" border="1" />
@@ -1481,10 +1491,11 @@
1491 login_needed(0);
1492 return;
1493 }
1494 add_content_sql_commands(g.db);
1495 zQ = cgi_csrf_safe(1) ? P("q") : 0;
1496 style_set_current_feature("setup");
1497 style_header("Raw SQL Commands");
1498 @ <p><b>Caution:</b> There are no restrictions on the SQL that can be
1499 @ run by this page. You can do serious and irrepairable damage to the
1500 @ repository. Proceed with extreme caution.</p>
1501 @
@@ -1618,10 +1629,11 @@
1629 login_check_credentials();
1630 if( !g.perm.Setup ){
1631 login_needed(0);
1632 return;
1633 }
1634 style_set_current_feature("setup");
1635 style_header("Raw TH1 Commands");
1636 @ <p><b>Caution:</b> There are no restrictions on the TH1 that can be
1637 @ run by this page. If Tcl integration was enabled at compile-time and
1638 @ the "tcl" setting is enabled, Tcl commands may be run as well.</p>
1639 @
@@ -1664,10 +1676,11 @@
1676 login_check_credentials();
1677 if( !g.perm.Admin ){
1678 login_needed(0);
1679 return;
1680 }
1681 style_set_current_feature("setup");
1682 style_header("Admin Log");
1683 create_admin_log_table();
1684 limit = atoi(PD("n","200"));
1685 ofst = atoi(PD("x","0"));
1686 fLogEnabled = db_get_boolean("admin-log", 0);
@@ -1724,10 +1737,11 @@
1737 login_check_credentials();
1738 if( !g.perm.Admin ){
1739 login_needed(0);
1740 return;
1741 }
1742 style_set_current_feature("setup");
1743 style_header("Search Configuration");
1744 @ <form action="%R/srchsetup" method="post"><div>
1745 login_insert_csrf_secret();
1746 @ <div style="text-align:center;font-weight:bold;">
1747 @ Server-specific settings that affect the
@@ -1849,10 +1863,11 @@
1863 login_check_credentials();
1864 if( !g.perm.Admin ){
1865 login_needed(0);
1866 return;
1867 }
1868 style_set_current_feature("setup");
1869 style_header("URL Alias Configuration");
1870 if( P("submit")!=0 ){
1871 Blob token;
1872 Blob sql;
1873 const char *zNewName;
1874
--- src/setupuser.c
+++ src/setupuser.c
@@ -52,10 +52,11 @@
5252
style_submenu_element("Log", "access_log");
5353
style_submenu_element("Help", "setup_ulist_notes");
5454
if( alert_tables_exist() ){
5555
style_submenu_element("Subscribers", "subscribers");
5656
}
57
+ style_set_current_feature("setup");
5758
style_header("User List");
5859
if( (zWith==0 || zWith[0]==0) && !bUnusedOnly ){
5960
@ <table border=1 cellpadding=2 cellspacing=0 class='userTable'>
6061
@ <thead><tr>
6162
@ <th>Category
@@ -213,10 +214,11 @@
213214
** A documentation page showing notes about user configuration. This
214215
** information used to be a side-bar on the user list page, but has been
215216
** factored out for improved presentation.
216217
*/
217218
void setup_ulist_notes(void){
219
+ style_set_current_feature("setup");
218220
style_header("User Configuration Notes");
219221
@ <h1>User Configuration Notes:</h1>
220222
@ <ol>
221223
@ <li><p>
222224
@ Every user, logged in or not, inherits the privileges of
@@ -258,10 +260,11 @@
258260
**
259261
** A documentation page showing the meaning of the various user capabilities
260262
** code letters.
261263
*/
262264
void setup_ucap_list(void){
265
+ style_set_current_feature("setup");
263266
style_header("User Capability Codes");
264267
@ <h1>All capabilities</h1>
265268
capabilities_table(CAPCLASS_ALL);
266269
@ <h1>Capabilities associated with checked-in content</h1>
267270
capabilities_table(CAPCLASS_CODE);
@@ -363,10 +366,12 @@
363366
"User \"%s\" has %d or more artifacts in the block-chain. "
364367
"Delete anyhow?",
365368
P("login")/*safe-for-%s*/, n);
366369
}
367370
}
371
+
372
+ style_set_current_feature("setup");
368373
369374
/* If we have all the necessary information, write the new or
370375
** modified user record. After writing the user record, redirect
371376
** to the page that displays a list of users.
372377
*/
373378
--- src/setupuser.c
+++ src/setupuser.c
@@ -52,10 +52,11 @@
52 style_submenu_element("Log", "access_log");
53 style_submenu_element("Help", "setup_ulist_notes");
54 if( alert_tables_exist() ){
55 style_submenu_element("Subscribers", "subscribers");
56 }
 
57 style_header("User List");
58 if( (zWith==0 || zWith[0]==0) && !bUnusedOnly ){
59 @ <table border=1 cellpadding=2 cellspacing=0 class='userTable'>
60 @ <thead><tr>
61 @ <th>Category
@@ -213,10 +214,11 @@
213 ** A documentation page showing notes about user configuration. This
214 ** information used to be a side-bar on the user list page, but has been
215 ** factored out for improved presentation.
216 */
217 void setup_ulist_notes(void){
 
218 style_header("User Configuration Notes");
219 @ <h1>User Configuration Notes:</h1>
220 @ <ol>
221 @ <li><p>
222 @ Every user, logged in or not, inherits the privileges of
@@ -258,10 +260,11 @@
258 **
259 ** A documentation page showing the meaning of the various user capabilities
260 ** code letters.
261 */
262 void setup_ucap_list(void){
 
263 style_header("User Capability Codes");
264 @ <h1>All capabilities</h1>
265 capabilities_table(CAPCLASS_ALL);
266 @ <h1>Capabilities associated with checked-in content</h1>
267 capabilities_table(CAPCLASS_CODE);
@@ -363,10 +366,12 @@
363 "User \"%s\" has %d or more artifacts in the block-chain. "
364 "Delete anyhow?",
365 P("login")/*safe-for-%s*/, n);
366 }
367 }
 
 
368
369 /* If we have all the necessary information, write the new or
370 ** modified user record. After writing the user record, redirect
371 ** to the page that displays a list of users.
372 */
373
--- src/setupuser.c
+++ src/setupuser.c
@@ -52,10 +52,11 @@
52 style_submenu_element("Log", "access_log");
53 style_submenu_element("Help", "setup_ulist_notes");
54 if( alert_tables_exist() ){
55 style_submenu_element("Subscribers", "subscribers");
56 }
57 style_set_current_feature("setup");
58 style_header("User List");
59 if( (zWith==0 || zWith[0]==0) && !bUnusedOnly ){
60 @ <table border=1 cellpadding=2 cellspacing=0 class='userTable'>
61 @ <thead><tr>
62 @ <th>Category
@@ -213,10 +214,11 @@
214 ** A documentation page showing notes about user configuration. This
215 ** information used to be a side-bar on the user list page, but has been
216 ** factored out for improved presentation.
217 */
218 void setup_ulist_notes(void){
219 style_set_current_feature("setup");
220 style_header("User Configuration Notes");
221 @ <h1>User Configuration Notes:</h1>
222 @ <ol>
223 @ <li><p>
224 @ Every user, logged in or not, inherits the privileges of
@@ -258,10 +260,11 @@
260 **
261 ** A documentation page showing the meaning of the various user capabilities
262 ** code letters.
263 */
264 void setup_ucap_list(void){
265 style_set_current_feature("setup");
266 style_header("User Capability Codes");
267 @ <h1>All capabilities</h1>
268 capabilities_table(CAPCLASS_ALL);
269 @ <h1>Capabilities associated with checked-in content</h1>
270 capabilities_table(CAPCLASS_CODE);
@@ -363,10 +366,12 @@
366 "User \"%s\" has %d or more artifacts in the block-chain. "
367 "Delete anyhow?",
368 P("login")/*safe-for-%s*/, n);
369 }
370 }
371
372 style_set_current_feature("setup");
373
374 /* If we have all the necessary information, write the new or
375 ** modified user record. After writing the user record, redirect
376 ** to the page that displays a list of users.
377 */
378
--- src/sitemap.c
+++ src/sitemap.c
@@ -236,10 +236,11 @@
236236
*/
237237
void sitemap_test_page(void){
238238
int isPopup = 0; /* This is an XMLHttpRequest() for /sitemap */
239239
240240
login_check_credentials();
241
+ style_set_current_feature("sitemap");
241242
if( P("popup")!=0 && cgi_csrf_safe(0) ){
242243
/* If this is a POST from the same origin with the popup=1 parameter,
243244
** then disable anti-robot defenses */
244245
isPopup = 1;
245246
g.perm.Hyperlink = 1;
@@ -287,10 +288,11 @@
287288
*/
288289
void sitemap_timeline_page(void){
289290
int isPopup = 0; /* This is an XMLHttpRequest() for /sitemap */
290291
291292
login_check_credentials();
293
+ style_set_current_feature("sitemap");
292294
if( P("popup")!=0 && cgi_csrf_safe(0) ){
293295
/* If this is a POST from the same origin with the popup=1 parameter,
294296
** then disable anti-robot defenses */
295297
isPopup = 1;
296298
g.perm.Hyperlink = 1;
297299
--- src/sitemap.c
+++ src/sitemap.c
@@ -236,10 +236,11 @@
236 */
237 void sitemap_test_page(void){
238 int isPopup = 0; /* This is an XMLHttpRequest() for /sitemap */
239
240 login_check_credentials();
 
241 if( P("popup")!=0 && cgi_csrf_safe(0) ){
242 /* If this is a POST from the same origin with the popup=1 parameter,
243 ** then disable anti-robot defenses */
244 isPopup = 1;
245 g.perm.Hyperlink = 1;
@@ -287,10 +288,11 @@
287 */
288 void sitemap_timeline_page(void){
289 int isPopup = 0; /* This is an XMLHttpRequest() for /sitemap */
290
291 login_check_credentials();
 
292 if( P("popup")!=0 && cgi_csrf_safe(0) ){
293 /* If this is a POST from the same origin with the popup=1 parameter,
294 ** then disable anti-robot defenses */
295 isPopup = 1;
296 g.perm.Hyperlink = 1;
297
--- src/sitemap.c
+++ src/sitemap.c
@@ -236,10 +236,11 @@
236 */
237 void sitemap_test_page(void){
238 int isPopup = 0; /* This is an XMLHttpRequest() for /sitemap */
239
240 login_check_credentials();
241 style_set_current_feature("sitemap");
242 if( P("popup")!=0 && cgi_csrf_safe(0) ){
243 /* If this is a POST from the same origin with the popup=1 parameter,
244 ** then disable anti-robot defenses */
245 isPopup = 1;
246 g.perm.Hyperlink = 1;
@@ -287,10 +288,11 @@
288 */
289 void sitemap_timeline_page(void){
290 int isPopup = 0; /* This is an XMLHttpRequest() for /sitemap */
291
292 login_check_credentials();
293 style_set_current_feature("sitemap");
294 if( P("popup")!=0 && cgi_csrf_safe(0) ){
295 /* If this is a POST from the same origin with the popup=1 parameter,
296 ** then disable anti-robot defenses */
297 isPopup = 1;
298 g.perm.Hyperlink = 1;
299
--- src/skins.c
+++ src/skins.c
@@ -387,10 +387,11 @@
387387
zOldName = P("sn");
388388
zNewName = P("newname");
389389
if( zOldName==0 ) return 0;
390390
if( zNewName==0 || zNewName[0]==0 || (ex = skinExists(zNewName))!=0 ){
391391
if( zNewName==0 ) zNewName = zOldName;
392
+ style_set_current_feature("skins");
392393
style_header("Rename A Skin");
393394
if( ex ){
394395
@ <p><span class="generalError">There is already another skin
395396
@ named "%h(zNewName)". Choose a different name.</span></p>
396397
}
@@ -429,10 +430,11 @@
429430
zNewName = P("svname");
430431
if( zNewName && zNewName[0]!=0 ){
431432
}
432433
if( zNewName==0 || zNewName[0]==0 || (ex = skinExists(zNewName))!=0 ){
433434
if( zNewName==0 ) zNewName = "";
435
+ style_set_current_feature("skins");
434436
style_header("Save Current Skin");
435437
if( ex ){
436438
@ <p><span class="generalError">There is already another skin
437439
@ named "%h(zNewName)". Choose a different name.</span></p>
438440
}
@@ -482,10 +484,12 @@
482484
db_begin_transaction();
483485
zCurrent = getSkin(0);
484486
for(i=0; i<count(aBuiltinSkin); i++){
485487
aBuiltinSkin[i].zSQL = getSkin(aBuiltinSkin[i].zLabel);
486488
}
489
+
490
+ style_set_current_feature("skins");
487491
488492
if( cgi_csrf_safe(1) ){
489493
/* Process requests to delete a user-defined skin */
490494
if( P("del1") && (zName = skinVarName(P("sn"), 1))!=0 ){
491495
style_header("Confirm Custom Skin Delete");
@@ -796,10 +800,11 @@
796800
zContent = zDflt;
797801
isRevert = 1;
798802
}
799803
800804
db_begin_transaction();
805
+ style_set_current_feature("skins");
801806
style_header("%s", zTitle);
802807
for(j=0; j<count(aSkinAttr); j++){
803808
style_submenu_element(aSkinAttr[j].zSubmenu,
804809
"%R/setup_skinedit?w=%d&basis=%h&sk=%d",j,zBasis,iSkin);
805810
}
@@ -962,10 +967,11 @@
962967
/* Publish the draft skin */
963968
if( P("pub7")!=0 && PB("pub7ck1") && PB("pub7ck2") ){
964969
skin_publish(iSkin);
965970
}
966971
972
+ style_set_current_feature("skins");
967973
style_header("Customize Skin");
968974
969975
@ <p>Customize the look of this Fossil repository by making changes
970976
@ to the CSS, Header, Footer, and Detail Settings in one of nine "draft"
971977
@ configurations. Then, after verifying that all is working correctly,
972978
--- src/skins.c
+++ src/skins.c
@@ -387,10 +387,11 @@
387 zOldName = P("sn");
388 zNewName = P("newname");
389 if( zOldName==0 ) return 0;
390 if( zNewName==0 || zNewName[0]==0 || (ex = skinExists(zNewName))!=0 ){
391 if( zNewName==0 ) zNewName = zOldName;
 
392 style_header("Rename A Skin");
393 if( ex ){
394 @ <p><span class="generalError">There is already another skin
395 @ named "%h(zNewName)". Choose a different name.</span></p>
396 }
@@ -429,10 +430,11 @@
429 zNewName = P("svname");
430 if( zNewName && zNewName[0]!=0 ){
431 }
432 if( zNewName==0 || zNewName[0]==0 || (ex = skinExists(zNewName))!=0 ){
433 if( zNewName==0 ) zNewName = "";
 
434 style_header("Save Current Skin");
435 if( ex ){
436 @ <p><span class="generalError">There is already another skin
437 @ named "%h(zNewName)". Choose a different name.</span></p>
438 }
@@ -482,10 +484,12 @@
482 db_begin_transaction();
483 zCurrent = getSkin(0);
484 for(i=0; i<count(aBuiltinSkin); i++){
485 aBuiltinSkin[i].zSQL = getSkin(aBuiltinSkin[i].zLabel);
486 }
 
 
487
488 if( cgi_csrf_safe(1) ){
489 /* Process requests to delete a user-defined skin */
490 if( P("del1") && (zName = skinVarName(P("sn"), 1))!=0 ){
491 style_header("Confirm Custom Skin Delete");
@@ -796,10 +800,11 @@
796 zContent = zDflt;
797 isRevert = 1;
798 }
799
800 db_begin_transaction();
 
801 style_header("%s", zTitle);
802 for(j=0; j<count(aSkinAttr); j++){
803 style_submenu_element(aSkinAttr[j].zSubmenu,
804 "%R/setup_skinedit?w=%d&basis=%h&sk=%d",j,zBasis,iSkin);
805 }
@@ -962,10 +967,11 @@
962 /* Publish the draft skin */
963 if( P("pub7")!=0 && PB("pub7ck1") && PB("pub7ck2") ){
964 skin_publish(iSkin);
965 }
966
 
967 style_header("Customize Skin");
968
969 @ <p>Customize the look of this Fossil repository by making changes
970 @ to the CSS, Header, Footer, and Detail Settings in one of nine "draft"
971 @ configurations. Then, after verifying that all is working correctly,
972
--- src/skins.c
+++ src/skins.c
@@ -387,10 +387,11 @@
387 zOldName = P("sn");
388 zNewName = P("newname");
389 if( zOldName==0 ) return 0;
390 if( zNewName==0 || zNewName[0]==0 || (ex = skinExists(zNewName))!=0 ){
391 if( zNewName==0 ) zNewName = zOldName;
392 style_set_current_feature("skins");
393 style_header("Rename A Skin");
394 if( ex ){
395 @ <p><span class="generalError">There is already another skin
396 @ named "%h(zNewName)". Choose a different name.</span></p>
397 }
@@ -429,10 +430,11 @@
430 zNewName = P("svname");
431 if( zNewName && zNewName[0]!=0 ){
432 }
433 if( zNewName==0 || zNewName[0]==0 || (ex = skinExists(zNewName))!=0 ){
434 if( zNewName==0 ) zNewName = "";
435 style_set_current_feature("skins");
436 style_header("Save Current Skin");
437 if( ex ){
438 @ <p><span class="generalError">There is already another skin
439 @ named "%h(zNewName)". Choose a different name.</span></p>
440 }
@@ -482,10 +484,12 @@
484 db_begin_transaction();
485 zCurrent = getSkin(0);
486 for(i=0; i<count(aBuiltinSkin); i++){
487 aBuiltinSkin[i].zSQL = getSkin(aBuiltinSkin[i].zLabel);
488 }
489
490 style_set_current_feature("skins");
491
492 if( cgi_csrf_safe(1) ){
493 /* Process requests to delete a user-defined skin */
494 if( P("del1") && (zName = skinVarName(P("sn"), 1))!=0 ){
495 style_header("Confirm Custom Skin Delete");
@@ -796,10 +800,11 @@
800 zContent = zDflt;
801 isRevert = 1;
802 }
803
804 db_begin_transaction();
805 style_set_current_feature("skins");
806 style_header("%s", zTitle);
807 for(j=0; j<count(aSkinAttr); j++){
808 style_submenu_element(aSkinAttr[j].zSubmenu,
809 "%R/setup_skinedit?w=%d&basis=%h&sk=%d",j,zBasis,iSkin);
810 }
@@ -962,10 +967,11 @@
967 /* Publish the draft skin */
968 if( P("pub7")!=0 && PB("pub7ck1") && PB("pub7ck2") ){
969 skin_publish(iSkin);
970 }
971
972 style_set_current_feature("skins");
973 style_header("Customize Skin");
974
975 @ <p>Customize the look of this Fossil repository by making changes
976 @ to the CSS, Header, Footer, and Detail Settings in one of nine "draft"
977 @ configurations. Then, after verifying that all is working correctly,
978
+2
--- src/smtp.c
+++ src/smtp.c
@@ -769,10 +769,11 @@
769769
if( !g.perm.Setup ){
770770
login_needed(0);
771771
return;
772772
}
773773
db_begin_transaction();
774
+ style_set_current_feature("smtp");
774775
style_header("Email Server Setup");
775776
if( db_table_exists("repository","emailroute") ){
776777
style_submenu_element("emailblob table", "%R/emailblob");
777778
style_submenu_element("emailoutq table", "%R/emailoutq");
778779
db_prepare(&q, "SELECT eaddr, epolicy FROM emailroute ORDER BY 1");
@@ -833,10 +834,11 @@
833834
login_check_credentials();
834835
if( !g.perm.Setup ){
835836
login_needed(0);
836837
return;
837838
}
839
+ style_set_current_feature("smtp");
838840
style_header("Email Route Editor");
839841
840842
if( P("edit") && cgi_csrf_safe(1) && zEAddr!=0 && zEPolicy!=0 ){
841843
smtp_server_schema(0);
842844
if( (zOAddr==0 || fossil_strcmp(zEAddr,zOAddr)!=0) ){
843845
--- src/smtp.c
+++ src/smtp.c
@@ -769,10 +769,11 @@
769 if( !g.perm.Setup ){
770 login_needed(0);
771 return;
772 }
773 db_begin_transaction();
 
774 style_header("Email Server Setup");
775 if( db_table_exists("repository","emailroute") ){
776 style_submenu_element("emailblob table", "%R/emailblob");
777 style_submenu_element("emailoutq table", "%R/emailoutq");
778 db_prepare(&q, "SELECT eaddr, epolicy FROM emailroute ORDER BY 1");
@@ -833,10 +834,11 @@
833 login_check_credentials();
834 if( !g.perm.Setup ){
835 login_needed(0);
836 return;
837 }
 
838 style_header("Email Route Editor");
839
840 if( P("edit") && cgi_csrf_safe(1) && zEAddr!=0 && zEPolicy!=0 ){
841 smtp_server_schema(0);
842 if( (zOAddr==0 || fossil_strcmp(zEAddr,zOAddr)!=0) ){
843
--- src/smtp.c
+++ src/smtp.c
@@ -769,10 +769,11 @@
769 if( !g.perm.Setup ){
770 login_needed(0);
771 return;
772 }
773 db_begin_transaction();
774 style_set_current_feature("smtp");
775 style_header("Email Server Setup");
776 if( db_table_exists("repository","emailroute") ){
777 style_submenu_element("emailblob table", "%R/emailblob");
778 style_submenu_element("emailoutq table", "%R/emailoutq");
779 db_prepare(&q, "SELECT eaddr, epolicy FROM emailroute ORDER BY 1");
@@ -833,10 +834,11 @@
834 login_check_credentials();
835 if( !g.perm.Setup ){
836 login_needed(0);
837 return;
838 }
839 style_set_current_feature("smtp");
840 style_header("Email Route Editor");
841
842 if( P("edit") && cgi_csrf_safe(1) && zEAddr!=0 && zEPolicy!=0 ){
843 smtp_server_schema(0);
844 if( (zOAddr==0 || fossil_strcmp(zEAddr,zOAddr)!=0) ){
845
+5
--- src/stat.c
+++ src/stat.c
@@ -459,10 +459,11 @@
459459
sqlite3_int64 iNow;
460460
char *zRemote;
461461
login_check_credentials();
462462
if( !g.perm.Admin ){ login_needed(0); return; }
463463
464
+ style_set_current_feature("stat");
464465
style_header("URLs and Checkouts");
465466
style_adunit_config(ADUNIT_RIGHT_OK);
466467
style_submenu_element("Stat", "stat");
467468
style_submenu_element("Schema", "repo_schema");
468469
iNow = db_int64(0, "SELECT strftime('%%s','now')");
@@ -531,10 +532,11 @@
531532
Blob sql;
532533
const char *zArg = P("n");
533534
login_check_credentials();
534535
if( !g.perm.Admin ){ login_needed(0); return; }
535536
537
+ style_set_current_feature("stat");
536538
style_header("Repository Schema");
537539
style_adunit_config(ADUNIT_RIGHT_OK);
538540
style_submenu_element("Stat", "stat");
539541
style_submenu_element("URLs", "urllist");
540542
if( sqlite3_compileoption_used("ENABLE_DBSTAT_VTAB") ){
@@ -586,10 +588,11 @@
586588
*/
587589
void repo_stat1_page(void){
588590
login_check_credentials();
589591
if( !g.perm.Admin ){ login_needed(0); return; }
590592
593
+ style_set_current_feature("stat");
591594
style_header("Repository STAT1 Table");
592595
style_adunit_config(ADUNIT_RIGHT_OK);
593596
style_submenu_element("Stat", "stat");
594597
style_submenu_element("Schema", "repo_schema");
595598
if( db_table_exists("repository","sqlite_stat1") ){
@@ -621,10 +624,11 @@
621624
sqlite3_int64 fsize;
622625
char zBuf[100];
623626
624627
login_check_credentials();
625628
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
629
+ style_set_current_feature("stat");
626630
style_header("Repository Table Sizes");
627631
style_adunit_config(ADUNIT_RIGHT_OK);
628632
style_submenu_element("Stat", "stat");
629633
if( g.perm.Admin ){
630634
style_submenu_element("Schema", "repo_schema");
@@ -798,10 +802,11 @@
798802
login_needed(g.anon.Write);
799803
return;
800804
}
801805
load_control();
802806
807
+ style_set_current_feature("stat");
803808
style_header("Artifact Statistics");
804809
style_submenu_element("Repository Stats", "stat");
805810
style_submenu_element("Artifact List", "bloblist");
806811
gather_artifact_stats(1);
807812
808813
--- src/stat.c
+++ src/stat.c
@@ -459,10 +459,11 @@
459 sqlite3_int64 iNow;
460 char *zRemote;
461 login_check_credentials();
462 if( !g.perm.Admin ){ login_needed(0); return; }
463
 
464 style_header("URLs and Checkouts");
465 style_adunit_config(ADUNIT_RIGHT_OK);
466 style_submenu_element("Stat", "stat");
467 style_submenu_element("Schema", "repo_schema");
468 iNow = db_int64(0, "SELECT strftime('%%s','now')");
@@ -531,10 +532,11 @@
531 Blob sql;
532 const char *zArg = P("n");
533 login_check_credentials();
534 if( !g.perm.Admin ){ login_needed(0); return; }
535
 
536 style_header("Repository Schema");
537 style_adunit_config(ADUNIT_RIGHT_OK);
538 style_submenu_element("Stat", "stat");
539 style_submenu_element("URLs", "urllist");
540 if( sqlite3_compileoption_used("ENABLE_DBSTAT_VTAB") ){
@@ -586,10 +588,11 @@
586 */
587 void repo_stat1_page(void){
588 login_check_credentials();
589 if( !g.perm.Admin ){ login_needed(0); return; }
590
 
591 style_header("Repository STAT1 Table");
592 style_adunit_config(ADUNIT_RIGHT_OK);
593 style_submenu_element("Stat", "stat");
594 style_submenu_element("Schema", "repo_schema");
595 if( db_table_exists("repository","sqlite_stat1") ){
@@ -621,10 +624,11 @@
621 sqlite3_int64 fsize;
622 char zBuf[100];
623
624 login_check_credentials();
625 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
 
626 style_header("Repository Table Sizes");
627 style_adunit_config(ADUNIT_RIGHT_OK);
628 style_submenu_element("Stat", "stat");
629 if( g.perm.Admin ){
630 style_submenu_element("Schema", "repo_schema");
@@ -798,10 +802,11 @@
798 login_needed(g.anon.Write);
799 return;
800 }
801 load_control();
802
 
803 style_header("Artifact Statistics");
804 style_submenu_element("Repository Stats", "stat");
805 style_submenu_element("Artifact List", "bloblist");
806 gather_artifact_stats(1);
807
808
--- src/stat.c
+++ src/stat.c
@@ -459,10 +459,11 @@
459 sqlite3_int64 iNow;
460 char *zRemote;
461 login_check_credentials();
462 if( !g.perm.Admin ){ login_needed(0); return; }
463
464 style_set_current_feature("stat");
465 style_header("URLs and Checkouts");
466 style_adunit_config(ADUNIT_RIGHT_OK);
467 style_submenu_element("Stat", "stat");
468 style_submenu_element("Schema", "repo_schema");
469 iNow = db_int64(0, "SELECT strftime('%%s','now')");
@@ -531,10 +532,11 @@
532 Blob sql;
533 const char *zArg = P("n");
534 login_check_credentials();
535 if( !g.perm.Admin ){ login_needed(0); return; }
536
537 style_set_current_feature("stat");
538 style_header("Repository Schema");
539 style_adunit_config(ADUNIT_RIGHT_OK);
540 style_submenu_element("Stat", "stat");
541 style_submenu_element("URLs", "urllist");
542 if( sqlite3_compileoption_used("ENABLE_DBSTAT_VTAB") ){
@@ -586,10 +588,11 @@
588 */
589 void repo_stat1_page(void){
590 login_check_credentials();
591 if( !g.perm.Admin ){ login_needed(0); return; }
592
593 style_set_current_feature("stat");
594 style_header("Repository STAT1 Table");
595 style_adunit_config(ADUNIT_RIGHT_OK);
596 style_submenu_element("Stat", "stat");
597 style_submenu_element("Schema", "repo_schema");
598 if( db_table_exists("repository","sqlite_stat1") ){
@@ -621,10 +624,11 @@
624 sqlite3_int64 fsize;
625 char zBuf[100];
626
627 login_check_credentials();
628 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
629 style_set_current_feature("stat");
630 style_header("Repository Table Sizes");
631 style_adunit_config(ADUNIT_RIGHT_OK);
632 style_submenu_element("Stat", "stat");
633 if( g.perm.Admin ){
634 style_submenu_element("Schema", "repo_schema");
@@ -798,10 +802,11 @@
802 login_needed(g.anon.Write);
803 return;
804 }
805 load_control();
806
807 style_set_current_feature("stat");
808 style_header("Artifact Statistics");
809 style_submenu_element("Repository Stats", "stat");
810 style_submenu_element("Artifact List", "bloblist");
811 gather_artifact_stats(1);
812
813
--- src/timeline.c
+++ src/timeline.c
@@ -189,10 +189,11 @@
189189
const char *zBr;
190190
char zNm[10];
191191
int i, cnt;
192192
login_check_credentials();
193193
194
+ style_set_current_feature("test");
194195
style_header("Hash Color Test");
195196
for(i=cnt=0; i<10; i++){
196197
sqlite3_snprintf(sizeof(zNm),zNm,"b%d",i);
197198
zBr = P(zNm);
198199
if( zBr && zBr[0] ){
@@ -3188,10 +3189,11 @@
31883189
login_check_credentials();
31893190
if( (!g.perm.Read && !g.perm.RdTkt && !g.perm.RdWiki && !g.perm.RdForum) ){
31903191
login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki);
31913192
return;
31923193
}
3194
+ style_set_current_feature("timeline");
31933195
style_header("Today In History");
31943196
zToday = (char*)P("today");
31953197
if( zToday ){
31963198
zToday = timeline_expand_datetime(zToday);
31973199
if( !fossil_isdate(zToday) ) zToday = 0;
31983200
--- src/timeline.c
+++ src/timeline.c
@@ -189,10 +189,11 @@
189 const char *zBr;
190 char zNm[10];
191 int i, cnt;
192 login_check_credentials();
193
 
194 style_header("Hash Color Test");
195 for(i=cnt=0; i<10; i++){
196 sqlite3_snprintf(sizeof(zNm),zNm,"b%d",i);
197 zBr = P(zNm);
198 if( zBr && zBr[0] ){
@@ -3188,10 +3189,11 @@
3188 login_check_credentials();
3189 if( (!g.perm.Read && !g.perm.RdTkt && !g.perm.RdWiki && !g.perm.RdForum) ){
3190 login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki);
3191 return;
3192 }
 
3193 style_header("Today In History");
3194 zToday = (char*)P("today");
3195 if( zToday ){
3196 zToday = timeline_expand_datetime(zToday);
3197 if( !fossil_isdate(zToday) ) zToday = 0;
3198
--- src/timeline.c
+++ src/timeline.c
@@ -189,10 +189,11 @@
189 const char *zBr;
190 char zNm[10];
191 int i, cnt;
192 login_check_credentials();
193
194 style_set_current_feature("test");
195 style_header("Hash Color Test");
196 for(i=cnt=0; i<10; i++){
197 sqlite3_snprintf(sizeof(zNm),zNm,"b%d",i);
198 zBr = P(zNm);
199 if( zBr && zBr[0] ){
@@ -3188,10 +3189,11 @@
3189 login_check_credentials();
3190 if( (!g.perm.Read && !g.perm.RdTkt && !g.perm.RdWiki && !g.perm.RdForum) ){
3191 login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki);
3192 return;
3193 }
3194 style_set_current_feature("timeline");
3195 style_header("Today In History");
3196 zToday = (char*)P("today");
3197 if( zToday ){
3198 zToday = timeline_expand_datetime(zToday);
3199 if( !fossil_isdate(zToday) ) zToday = 0;
3200
+6
--- src/tkt.c
+++ src/tkt.c
@@ -585,10 +585,11 @@
585585
if( P("plaintext") ){
586586
style_submenu_element("Formatted", "%R/tktview/%s", zUuid);
587587
}else{
588588
style_submenu_element("Plaintext", "%R/tktview/%s?plaintext", zUuid);
589589
}
590
+ style_set_current_feature("tkt");
590591
style_header("View Ticket");
591592
if( showTimeline ){
592593
int tagid = db_int(0,"SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",
593594
zUuid);
594595
if( tagid ){
@@ -815,10 +816,11 @@
815816
login_check_credentials();
816817
if( !g.perm.NewTkt ){ login_needed(g.anon.NewTkt); return; }
817818
if( P("cancel") ){
818819
cgi_redirect("home");
819820
}
821
+ style_set_current_feature("tkt");
820822
style_header("New Ticket");
821823
ticket_standard_submenu(T_ALL_BUT(T_NEW));
822824
if( g.thTrace ) Th_Trace("BEGIN_TKTNEW<br />\n", -1);
823825
ticket_init();
824826
initializeVariablesFromCGI();
@@ -870,10 +872,11 @@
870872
}
871873
zName = P("name");
872874
if( P("cancel") ){
873875
cgi_redirectf("tktview?name=%T", zName);
874876
}
877
+ style_set_current_feature("tkt");
875878
style_header("Edit Ticket");
876879
if( zName==0 || (nName = strlen(zName))<4 || nName>HNAME_LEN_SHA1
877880
|| !validate16(zName,nName) ){
878881
@ <span class="tktError">Not a valid ticket id: "%h(zName)"</span>
879882
style_finish_page("tkt");
@@ -1035,10 +1038,11 @@
10351038
if( zType[0]=='c' ){
10361039
zTitle = mprintf("Check-ins Associated With Ticket %h", zUuid);
10371040
}else{
10381041
zTitle = mprintf("Timeline Of Ticket %h", zUuid);
10391042
}
1043
+ style_set_current_feature("tkt");
10401044
style_header("%z", zTitle);
10411045
10421046
sqlite3_snprintf(6, zGlobPattern, "%s", zUuid);
10431047
canonical16(zGlobPattern, strlen(zGlobPattern));
10441048
tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid);
@@ -1084,10 +1088,11 @@
10841088
if( P("raw")!=0 ){
10851089
style_submenu_element("Decoded", "%R/tkthistory/%s", zUuid);
10861090
}else if( g.perm.Admin ){
10871091
style_submenu_element("Raw", "%R/tkthistory/%s?raw", zUuid);
10881092
}
1093
+ style_set_current_feature("tkt");
10891094
style_header("%z", zTitle);
10901095
10911096
tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid);
10921097
if( tagid==0 ){
10931098
@ No such ticket: %h(zUuid)
@@ -1611,10 +1616,11 @@
16111616
**
16121617
** Full-text search of all current tickets
16131618
*/
16141619
void tkt_srchpage(void){
16151620
login_check_credentials();
1621
+ style_set_current_feature("tkt");
16161622
style_header("Ticket Search");
16171623
ticket_standard_submenu(T_ALL_BUT(T_SRCH));
16181624
search_screen(SRCH_TKT, 0);
16191625
style_finish_page("tkt");
16201626
}
16211627
--- src/tkt.c
+++ src/tkt.c
@@ -585,10 +585,11 @@
585 if( P("plaintext") ){
586 style_submenu_element("Formatted", "%R/tktview/%s", zUuid);
587 }else{
588 style_submenu_element("Plaintext", "%R/tktview/%s?plaintext", zUuid);
589 }
 
590 style_header("View Ticket");
591 if( showTimeline ){
592 int tagid = db_int(0,"SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",
593 zUuid);
594 if( tagid ){
@@ -815,10 +816,11 @@
815 login_check_credentials();
816 if( !g.perm.NewTkt ){ login_needed(g.anon.NewTkt); return; }
817 if( P("cancel") ){
818 cgi_redirect("home");
819 }
 
820 style_header("New Ticket");
821 ticket_standard_submenu(T_ALL_BUT(T_NEW));
822 if( g.thTrace ) Th_Trace("BEGIN_TKTNEW<br />\n", -1);
823 ticket_init();
824 initializeVariablesFromCGI();
@@ -870,10 +872,11 @@
870 }
871 zName = P("name");
872 if( P("cancel") ){
873 cgi_redirectf("tktview?name=%T", zName);
874 }
 
875 style_header("Edit Ticket");
876 if( zName==0 || (nName = strlen(zName))<4 || nName>HNAME_LEN_SHA1
877 || !validate16(zName,nName) ){
878 @ <span class="tktError">Not a valid ticket id: "%h(zName)"</span>
879 style_finish_page("tkt");
@@ -1035,10 +1038,11 @@
1035 if( zType[0]=='c' ){
1036 zTitle = mprintf("Check-ins Associated With Ticket %h", zUuid);
1037 }else{
1038 zTitle = mprintf("Timeline Of Ticket %h", zUuid);
1039 }
 
1040 style_header("%z", zTitle);
1041
1042 sqlite3_snprintf(6, zGlobPattern, "%s", zUuid);
1043 canonical16(zGlobPattern, strlen(zGlobPattern));
1044 tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid);
@@ -1084,10 +1088,11 @@
1084 if( P("raw")!=0 ){
1085 style_submenu_element("Decoded", "%R/tkthistory/%s", zUuid);
1086 }else if( g.perm.Admin ){
1087 style_submenu_element("Raw", "%R/tkthistory/%s?raw", zUuid);
1088 }
 
1089 style_header("%z", zTitle);
1090
1091 tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid);
1092 if( tagid==0 ){
1093 @ No such ticket: %h(zUuid)
@@ -1611,10 +1616,11 @@
1611 **
1612 ** Full-text search of all current tickets
1613 */
1614 void tkt_srchpage(void){
1615 login_check_credentials();
 
1616 style_header("Ticket Search");
1617 ticket_standard_submenu(T_ALL_BUT(T_SRCH));
1618 search_screen(SRCH_TKT, 0);
1619 style_finish_page("tkt");
1620 }
1621
--- src/tkt.c
+++ src/tkt.c
@@ -585,10 +585,11 @@
585 if( P("plaintext") ){
586 style_submenu_element("Formatted", "%R/tktview/%s", zUuid);
587 }else{
588 style_submenu_element("Plaintext", "%R/tktview/%s?plaintext", zUuid);
589 }
590 style_set_current_feature("tkt");
591 style_header("View Ticket");
592 if( showTimeline ){
593 int tagid = db_int(0,"SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",
594 zUuid);
595 if( tagid ){
@@ -815,10 +816,11 @@
816 login_check_credentials();
817 if( !g.perm.NewTkt ){ login_needed(g.anon.NewTkt); return; }
818 if( P("cancel") ){
819 cgi_redirect("home");
820 }
821 style_set_current_feature("tkt");
822 style_header("New Ticket");
823 ticket_standard_submenu(T_ALL_BUT(T_NEW));
824 if( g.thTrace ) Th_Trace("BEGIN_TKTNEW<br />\n", -1);
825 ticket_init();
826 initializeVariablesFromCGI();
@@ -870,10 +872,11 @@
872 }
873 zName = P("name");
874 if( P("cancel") ){
875 cgi_redirectf("tktview?name=%T", zName);
876 }
877 style_set_current_feature("tkt");
878 style_header("Edit Ticket");
879 if( zName==0 || (nName = strlen(zName))<4 || nName>HNAME_LEN_SHA1
880 || !validate16(zName,nName) ){
881 @ <span class="tktError">Not a valid ticket id: "%h(zName)"</span>
882 style_finish_page("tkt");
@@ -1035,10 +1038,11 @@
1038 if( zType[0]=='c' ){
1039 zTitle = mprintf("Check-ins Associated With Ticket %h", zUuid);
1040 }else{
1041 zTitle = mprintf("Timeline Of Ticket %h", zUuid);
1042 }
1043 style_set_current_feature("tkt");
1044 style_header("%z", zTitle);
1045
1046 sqlite3_snprintf(6, zGlobPattern, "%s", zUuid);
1047 canonical16(zGlobPattern, strlen(zGlobPattern));
1048 tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid);
@@ -1084,10 +1088,11 @@
1088 if( P("raw")!=0 ){
1089 style_submenu_element("Decoded", "%R/tkthistory/%s", zUuid);
1090 }else if( g.perm.Admin ){
1091 style_submenu_element("Raw", "%R/tkthistory/%s?raw", zUuid);
1092 }
1093 style_set_current_feature("tkt");
1094 style_header("%z", zTitle);
1095
1096 tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid);
1097 if( tagid==0 ){
1098 @ No such ticket: %h(zUuid)
@@ -1611,10 +1616,11 @@
1616 **
1617 ** Full-text search of all current tickets
1618 */
1619 void tkt_srchpage(void){
1620 login_check_credentials();
1621 style_set_current_feature("tkt");
1622 style_header("Ticket Search");
1623 ticket_standard_submenu(T_ALL_BUT(T_SRCH));
1624 search_screen(SRCH_TKT, 0);
1625 style_finish_page("tkt");
1626 }
1627
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -123,18 +123,20 @@
123123
login_check_credentials();
124124
if( !g.perm.Setup ){
125125
login_needed(0);
126126
return;
127127
}
128
+ style_set_current_feature("tktsetup");
128129
if( PB("setup") ){
129130
cgi_redirect("tktsetup");
130131
}
131132
isSubmit = P("submit")!=0;
132133
z = P("x");
133134
if( z==0 ){
134135
z = db_get(zDbField, zDfltValue);
135136
}
137
+ style_set_current_feature("tktsetup");
136138
style_header("Edit %s", zTitle);
137139
if( P("clear")!=0 ){
138140
login_verify_csrf_secret();
139141
db_unset(zDbField, 0);
140142
if( xRebuild ) xRebuild();
@@ -901,10 +903,11 @@
901903
}
902904
903905
if( P("setup") ){
904906
cgi_redirect("tktsetup");
905907
}
908
+ style_set_current_feature("tktsetup");
906909
style_header("Ticket Display On Timelines");
907910
db_begin_transaction();
908911
@ <form action="%R/tktsetup_timeline" method="post"><div>
909912
login_insert_csrf_secret();
910913
911914
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -123,18 +123,20 @@
123 login_check_credentials();
124 if( !g.perm.Setup ){
125 login_needed(0);
126 return;
127 }
 
128 if( PB("setup") ){
129 cgi_redirect("tktsetup");
130 }
131 isSubmit = P("submit")!=0;
132 z = P("x");
133 if( z==0 ){
134 z = db_get(zDbField, zDfltValue);
135 }
 
136 style_header("Edit %s", zTitle);
137 if( P("clear")!=0 ){
138 login_verify_csrf_secret();
139 db_unset(zDbField, 0);
140 if( xRebuild ) xRebuild();
@@ -901,10 +903,11 @@
901 }
902
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
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -123,18 +123,20 @@
123 login_check_credentials();
124 if( !g.perm.Setup ){
125 login_needed(0);
126 return;
127 }
128 style_set_current_feature("tktsetup");
129 if( PB("setup") ){
130 cgi_redirect("tktsetup");
131 }
132 isSubmit = P("submit")!=0;
133 z = P("x");
134 if( z==0 ){
135 z = db_get(zDbField, zDfltValue);
136 }
137 style_set_current_feature("tktsetup");
138 style_header("Edit %s", zTitle);
139 if( P("clear")!=0 ){
140 login_verify_csrf_secret();
141 db_unset(zDbField, 0);
142 if( xRebuild ) xRebuild();
@@ -901,10 +903,11 @@
903 }
904
905 if( P("setup") ){
906 cgi_redirect("tktsetup");
907 }
908 style_set_current_feature("tktsetup");
909 style_header("Ticket Display On Timelines");
910 db_begin_transaction();
911 @ <form action="%R/tktsetup_timeline" method="post"><div>
912 login_insert_csrf_secret();
913
914
--- src/webmail.c
+++ src/webmail.c
@@ -407,10 +407,11 @@
407407
emailid
408408
);
409409
if( zUser ) blob_append_sql(&sql, " AND euser=%Q", zUser);
410410
db_prepare_blob(&q, &sql);
411411
blob_reset(&sql);
412
+ style_set_current_feature("webmail");
412413
style_header("Message %d",emailid);
413414
if( db_step(&q)==SQLITE_ROW ){
414415
Blob msg = db_column_text_as_blob(&q, 0);
415416
int eFormat = atoi(PD("f","0"));
416417
eState = db_column_int(&q, 1);
@@ -610,10 +611,11 @@
610611
login_check_credentials();
611612
if( !login_is_individual() ){
612613
login_needed(0);
613614
return;
614615
}
616
+ style_set_current_feature("webmail");
615617
if( !db_table_exists("repository","emailbox") ){
616618
style_header("Webmail Not Available");
617619
@ <p>This repository is not configured to provide webmail</p>
618620
style_finish_page("webmail");
619621
return;
@@ -780,10 +782,11 @@
780782
if( !g.perm.Setup ){
781783
login_needed(0);
782784
return;
783785
}
784786
add_content_sql_commands(g.db);
787
+ style_set_current_feature("webmail");
785788
style_header("emailblob table");
786789
if( id>0 ){
787790
style_submenu_element("Index", "%R/emailblob");
788791
@ <ul>
789792
db_prepare(&q, "SELECT emailid FROM emailblob WHERE ets=%d", id);
@@ -872,10 +875,11 @@
872875
if( !g.perm.Setup ){
873876
login_needed(0);
874877
return;
875878
}
876879
add_content_sql_commands(g.db);
880
+ style_set_current_feature("webmail");
877881
style_header("emailoutq table");
878882
style_submenu_element("emailblob table","%R/emailblob");
879883
db_prepare(&q,
880884
"SELECT edomain, efrom, eto, emsgid, "
881885
" datetime(ectime,'unixepoch'),"
882886
--- src/webmail.c
+++ src/webmail.c
@@ -407,10 +407,11 @@
407 emailid
408 );
409 if( zUser ) blob_append_sql(&sql, " AND euser=%Q", zUser);
410 db_prepare_blob(&q, &sql);
411 blob_reset(&sql);
 
412 style_header("Message %d",emailid);
413 if( db_step(&q)==SQLITE_ROW ){
414 Blob msg = db_column_text_as_blob(&q, 0);
415 int eFormat = atoi(PD("f","0"));
416 eState = db_column_int(&q, 1);
@@ -610,10 +611,11 @@
610 login_check_credentials();
611 if( !login_is_individual() ){
612 login_needed(0);
613 return;
614 }
 
615 if( !db_table_exists("repository","emailbox") ){
616 style_header("Webmail Not Available");
617 @ <p>This repository is not configured to provide webmail</p>
618 style_finish_page("webmail");
619 return;
@@ -780,10 +782,11 @@
780 if( !g.perm.Setup ){
781 login_needed(0);
782 return;
783 }
784 add_content_sql_commands(g.db);
 
785 style_header("emailblob table");
786 if( id>0 ){
787 style_submenu_element("Index", "%R/emailblob");
788 @ <ul>
789 db_prepare(&q, "SELECT emailid FROM emailblob WHERE ets=%d", id);
@@ -872,10 +875,11 @@
872 if( !g.perm.Setup ){
873 login_needed(0);
874 return;
875 }
876 add_content_sql_commands(g.db);
 
877 style_header("emailoutq table");
878 style_submenu_element("emailblob table","%R/emailblob");
879 db_prepare(&q,
880 "SELECT edomain, efrom, eto, emsgid, "
881 " datetime(ectime,'unixepoch'),"
882
--- src/webmail.c
+++ src/webmail.c
@@ -407,10 +407,11 @@
407 emailid
408 );
409 if( zUser ) blob_append_sql(&sql, " AND euser=%Q", zUser);
410 db_prepare_blob(&q, &sql);
411 blob_reset(&sql);
412 style_set_current_feature("webmail");
413 style_header("Message %d",emailid);
414 if( db_step(&q)==SQLITE_ROW ){
415 Blob msg = db_column_text_as_blob(&q, 0);
416 int eFormat = atoi(PD("f","0"));
417 eState = db_column_int(&q, 1);
@@ -610,10 +611,11 @@
611 login_check_credentials();
612 if( !login_is_individual() ){
613 login_needed(0);
614 return;
615 }
616 style_set_current_feature("webmail");
617 if( !db_table_exists("repository","emailbox") ){
618 style_header("Webmail Not Available");
619 @ <p>This repository is not configured to provide webmail</p>
620 style_finish_page("webmail");
621 return;
@@ -780,10 +782,11 @@
782 if( !g.perm.Setup ){
783 login_needed(0);
784 return;
785 }
786 add_content_sql_commands(g.db);
787 style_set_current_feature("webmail");
788 style_header("emailblob table");
789 if( id>0 ){
790 style_submenu_element("Index", "%R/emailblob");
791 @ <ul>
792 db_prepare(&q, "SELECT emailid FROM emailblob WHERE ets=%d", id);
@@ -872,10 +875,11 @@
875 if( !g.perm.Setup ){
876 login_needed(0);
877 return;
878 }
879 add_content_sql_commands(g.db);
880 style_set_current_feature("webmail");
881 style_header("emailoutq table");
882 style_submenu_element("emailblob table","%R/emailblob");
883 db_prepare(&q,
884 "SELECT edomain, efrom, eto, emsgid, "
885 " datetime(ectime,'unixepoch'),"
886
+15
--- src/wiki.c
+++ src/wiki.c
@@ -62,10 +62,11 @@
6262
** Check a wiki name. If it is not well-formed, then issue an error
6363
** and return true. If it is well-formed, return false.
6464
*/
6565
static int check_name(const char *z){
6666
if( !wiki_name_is_wellformed((const unsigned char *)z) ){
67
+ style_set_current_feature("wiki");
6768
style_header("Wiki Page Name Error");
6869
@ The wiki name "<span class="wikiError">%h(z)</span>" is not well-formed.
6970
@ Rules for wiki page names:
7071
well_formed_wiki_name_rules();
7172
style_finish_page("wiki");
@@ -134,10 +135,11 @@
134135
cgi_set_parameter_nocopy("name", g.zExtra, 1);
135136
g.isHome = 1;
136137
wiki_page();
137138
return;
138139
}
140
+ style_set_current_feature("wiki");
139141
style_header("Home");
140142
@ <p>This is a stub home-page for the project.
141143
@ To fill in this page, first go to
142144
@ %z(href("%R/setup_config"))setup/config</a>
143145
@ and establish a "Project Name". Then create a
@@ -229,10 +231,11 @@
229231
** Show a summary of the Markdown wiki formatting rules.
230232
*/
231233
void markdown_rules_page(void){
232234
Blob x;
233235
int fTxt = P("txt")!=0;
236
+ style_set_current_feature("wiki");
234237
style_header("Markdown Formatting Rules");
235238
if( fTxt ){
236239
style_submenu_element("Formatted", "%R/md_rules");
237240
}else{
238241
style_submenu_element("Plain-Text", "%R/md_rules?txt=1");
@@ -253,10 +256,11 @@
253256
** Show a summary of the wiki formatting rules.
254257
*/
255258
void wiki_rules_page(void){
256259
Blob x;
257260
int fTxt = P("txt")!=0;
261
+ style_set_current_feature("wiki");
258262
style_header("Wiki Formatting Rules");
259263
if( fTxt ){
260264
style_submenu_element("Formatted", "%R/wiki_rules");
261265
}else{
262266
style_submenu_element("Plain-Text", "%R/wiki_rules?txt=1");
@@ -275,10 +279,11 @@
275279
** WEBPAGE: markup_help
276280
**
277281
** Show links to the md_rules and wiki_rules pages.
278282
*/
279283
void markup_help_page(void){
284
+ style_set_current_feature("wiki");
280285
style_header("Fossil Markup Styles");
281286
@ <ul>
282287
@ <li><p>%z(href("%R/wiki_rules"))Fossil Wiki Formatting Rules</a></p></li>
283288
@ <li><p>%z(href("%R/md_rules"))Markdown Formatting Rules</a></p></li>
284289
@ </ul>
@@ -344,10 +349,11 @@
344349
** A generic landing page for wiki.
345350
*/
346351
void wiki_helppage(void){
347352
login_check_credentials();
348353
if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
354
+ style_set_current_feature("wiki");
349355
style_header("Wiki Help");
350356
wiki_standard_submenu(W_ALL_BUT(W_HELP));
351357
@ <h2>Wiki Links</h2>
352358
@ <ul>
353359
@ <li> %z(href("%R/timeline?y=w"))Recent changes</a> to wiki pages.</li>
@@ -381,10 +387,11 @@
381387
**
382388
** Full-text search of all current wiki text
383389
*/
384390
void wiki_srchpage(void){
385391
login_check_credentials();
392
+ style_set_current_feature("wiki");
386393
style_header("Wiki Search");
387394
wiki_standard_submenu(W_HELP|W_LIST|W_SANDBOX);
388395
search_screen(SRCH_WIKI, 0);
389396
style_finish_page("wiki");
390397
}
@@ -446,10 +453,11 @@
446453
static int wiki_page_header(
447454
int eType, /* Page type. Might be WIKITYPE_UNKNOWN */
448455
const char *zPageName, /* Name of the page */
449456
const char *zExtra /* Extra prefix text on the page header */
450457
){
458
+ style_set_current_feature("wiki");
451459
if( eType==WIKITYPE_UNKNOWN ) eType = wiki_page_type(zPageName);
452460
switch( eType ){
453461
case WIKITYPE_NORMAL: {
454462
style_header("%s%s", zExtra, zPageName);
455463
break;
@@ -1138,10 +1146,11 @@
11381146
if( !g.perm.RdWiki ){
11391147
login_needed(g.anon.RdWiki);
11401148
return;
11411149
}
11421150
}
1151
+ style_set_current_feature("wiki");
11431152
style_header("Wiki Editor");
11441153
style_emit_noscript_for_js_page();
11451154
11461155
/* Status bar */
11471156
CX("<div id='fossil-status-bar' "
@@ -1367,10 +1376,11 @@
13671376
zName = PD("name","");
13681377
zMimetype = wiki_filter_mimetypes(P("mimetype"));
13691378
if( zName[0] && wiki_name_is_wellformed((const unsigned char *)zName) ){
13701379
cgi_redirectf("wikiedit?name=%T&mimetype=%s", zName, zMimetype);
13711380
}
1381
+ style_set_current_feature("wiki");
13721382
style_header("Create A New Wiki Page");
13731383
wiki_standard_submenu(W_ALL_BUT(W_NEW));
13741384
@ <p>Rules for wiki page names:</p>
13751385
well_formed_wiki_name_rules();
13761386
form_begin(0, "%R/wikinew");
@@ -1513,10 +1523,11 @@
15131523
if( P("cancel")!=0 ){
15141524
cgi_redirectf("wiki?name=%T", zPageName);
15151525
return;
15161526
}
15171527
style_set_current_page("%T?name=%T", g.zPath, zPageName);
1528
+ style_set_current_feature("wiki");
15181529
style_header("Append Comment To: %s", zPageName);
15191530
if( !goodCaptcha ){
15201531
@ <p class="generalError">Error: Incorrect security code.</p>
15211532
}
15221533
if( P("preview")!=0 ){
@@ -1564,10 +1575,11 @@
15641575
Blob sql;
15651576
Stmt q;
15661577
login_check_credentials();
15671578
if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
15681579
zPageName = PD("name","");
1580
+ style_set_current_feature("wiki");
15691581
style_header("History Of %s", zPageName);
15701582
blob_init(&sql, 0, 0);
15711583
blob_append(&sql, timeline_query_for_www(), -1);
15721584
blob_append_sql(&sql,
15731585
"AND event.objid IN ("
@@ -1645,10 +1657,11 @@
16451657
}
16461658
nextRid = wiki_next(wiki_tagid(pW1->zWikiTitle),pW1->rDate);
16471659
if( nextRid ){
16481660
style_submenu_element("Next", "%R/wdiff?rid=%d", nextRid);
16491661
}
1662
+ style_set_current_feature("wiki");
16501663
style_header("Changes To %s", pW1->zWikiTitle);
16511664
blob_zero(&d);
16521665
diffFlags = construct_diff_flags(1);
16531666
text_diff(&w2, &w1, &d, 0, diffFlags | DIFF_HTML | DIFF_LINENO);
16541667
@ <pre class="udiff">
@@ -1701,10 +1714,11 @@
17011714
int showAll = P("all")!=0;
17021715
int showRid = P("showid")!=0;
17031716
17041717
login_check_credentials();
17051718
if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
1719
+ style_set_current_feature("wiki");
17061720
style_header("Available Wiki Pages");
17071721
if( showAll ){
17081722
style_submenu_element("Active", "%R/wcontent");
17091723
}else{
17101724
style_submenu_element("All", "%R/wcontent?all=1");
@@ -1771,10 +1785,11 @@
17711785
Stmt q;
17721786
const char *zTitle;
17731787
login_check_credentials();
17741788
if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
17751789
zTitle = PD("title","*");
1790
+ style_set_current_feature("wiki");
17761791
style_header("Wiki Pages Found");
17771792
@ <ul>
17781793
db_prepare(&q,
17791794
"SELECT substr(tagname, 6, 1000) FROM tag WHERE tagname like 'wiki-%%%q%%'"
17801795
" ORDER BY lower(tagname) /*sort*/" ,
17811796
--- src/wiki.c
+++ src/wiki.c
@@ -62,10 +62,11 @@
62 ** Check a wiki name. If it is not well-formed, then issue an error
63 ** and return true. If it is well-formed, return false.
64 */
65 static int check_name(const char *z){
66 if( !wiki_name_is_wellformed((const unsigned char *)z) ){
 
67 style_header("Wiki Page Name Error");
68 @ The wiki name "<span class="wikiError">%h(z)</span>" is not well-formed.
69 @ Rules for wiki page names:
70 well_formed_wiki_name_rules();
71 style_finish_page("wiki");
@@ -134,10 +135,11 @@
134 cgi_set_parameter_nocopy("name", g.zExtra, 1);
135 g.isHome = 1;
136 wiki_page();
137 return;
138 }
 
139 style_header("Home");
140 @ <p>This is a stub home-page for the project.
141 @ To fill in this page, first go to
142 @ %z(href("%R/setup_config"))setup/config</a>
143 @ and establish a "Project Name". Then create a
@@ -229,10 +231,11 @@
229 ** Show a summary of the Markdown wiki formatting rules.
230 */
231 void markdown_rules_page(void){
232 Blob x;
233 int fTxt = P("txt")!=0;
 
234 style_header("Markdown Formatting Rules");
235 if( fTxt ){
236 style_submenu_element("Formatted", "%R/md_rules");
237 }else{
238 style_submenu_element("Plain-Text", "%R/md_rules?txt=1");
@@ -253,10 +256,11 @@
253 ** Show a summary of the wiki formatting rules.
254 */
255 void wiki_rules_page(void){
256 Blob x;
257 int fTxt = P("txt")!=0;
 
258 style_header("Wiki Formatting Rules");
259 if( fTxt ){
260 style_submenu_element("Formatted", "%R/wiki_rules");
261 }else{
262 style_submenu_element("Plain-Text", "%R/wiki_rules?txt=1");
@@ -275,10 +279,11 @@
275 ** WEBPAGE: markup_help
276 **
277 ** Show links to the md_rules and wiki_rules pages.
278 */
279 void markup_help_page(void){
 
280 style_header("Fossil Markup Styles");
281 @ <ul>
282 @ <li><p>%z(href("%R/wiki_rules"))Fossil Wiki Formatting Rules</a></p></li>
283 @ <li><p>%z(href("%R/md_rules"))Markdown Formatting Rules</a></p></li>
284 @ </ul>
@@ -344,10 +349,11 @@
344 ** A generic landing page for wiki.
345 */
346 void wiki_helppage(void){
347 login_check_credentials();
348 if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
 
349 style_header("Wiki Help");
350 wiki_standard_submenu(W_ALL_BUT(W_HELP));
351 @ <h2>Wiki Links</h2>
352 @ <ul>
353 @ <li> %z(href("%R/timeline?y=w"))Recent changes</a> to wiki pages.</li>
@@ -381,10 +387,11 @@
381 **
382 ** Full-text search of all current wiki text
383 */
384 void wiki_srchpage(void){
385 login_check_credentials();
 
386 style_header("Wiki Search");
387 wiki_standard_submenu(W_HELP|W_LIST|W_SANDBOX);
388 search_screen(SRCH_WIKI, 0);
389 style_finish_page("wiki");
390 }
@@ -446,10 +453,11 @@
446 static int wiki_page_header(
447 int eType, /* Page type. Might be WIKITYPE_UNKNOWN */
448 const char *zPageName, /* Name of the page */
449 const char *zExtra /* Extra prefix text on the page header */
450 ){
 
451 if( eType==WIKITYPE_UNKNOWN ) eType = wiki_page_type(zPageName);
452 switch( eType ){
453 case WIKITYPE_NORMAL: {
454 style_header("%s%s", zExtra, zPageName);
455 break;
@@ -1138,10 +1146,11 @@
1138 if( !g.perm.RdWiki ){
1139 login_needed(g.anon.RdWiki);
1140 return;
1141 }
1142 }
 
1143 style_header("Wiki Editor");
1144 style_emit_noscript_for_js_page();
1145
1146 /* Status bar */
1147 CX("<div id='fossil-status-bar' "
@@ -1367,10 +1376,11 @@
1367 zName = PD("name","");
1368 zMimetype = wiki_filter_mimetypes(P("mimetype"));
1369 if( zName[0] && wiki_name_is_wellformed((const unsigned char *)zName) ){
1370 cgi_redirectf("wikiedit?name=%T&mimetype=%s", zName, zMimetype);
1371 }
 
1372 style_header("Create A New Wiki Page");
1373 wiki_standard_submenu(W_ALL_BUT(W_NEW));
1374 @ <p>Rules for wiki page names:</p>
1375 well_formed_wiki_name_rules();
1376 form_begin(0, "%R/wikinew");
@@ -1513,10 +1523,11 @@
1513 if( P("cancel")!=0 ){
1514 cgi_redirectf("wiki?name=%T", zPageName);
1515 return;
1516 }
1517 style_set_current_page("%T?name=%T", g.zPath, zPageName);
 
1518 style_header("Append Comment To: %s", zPageName);
1519 if( !goodCaptcha ){
1520 @ <p class="generalError">Error: Incorrect security code.</p>
1521 }
1522 if( P("preview")!=0 ){
@@ -1564,10 +1575,11 @@
1564 Blob sql;
1565 Stmt q;
1566 login_check_credentials();
1567 if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
1568 zPageName = PD("name","");
 
1569 style_header("History Of %s", zPageName);
1570 blob_init(&sql, 0, 0);
1571 blob_append(&sql, timeline_query_for_www(), -1);
1572 blob_append_sql(&sql,
1573 "AND event.objid IN ("
@@ -1645,10 +1657,11 @@
1645 }
1646 nextRid = wiki_next(wiki_tagid(pW1->zWikiTitle),pW1->rDate);
1647 if( nextRid ){
1648 style_submenu_element("Next", "%R/wdiff?rid=%d", nextRid);
1649 }
 
1650 style_header("Changes To %s", pW1->zWikiTitle);
1651 blob_zero(&d);
1652 diffFlags = construct_diff_flags(1);
1653 text_diff(&w2, &w1, &d, 0, diffFlags | DIFF_HTML | DIFF_LINENO);
1654 @ <pre class="udiff">
@@ -1701,10 +1714,11 @@
1701 int showAll = P("all")!=0;
1702 int showRid = P("showid")!=0;
1703
1704 login_check_credentials();
1705 if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
 
1706 style_header("Available Wiki Pages");
1707 if( showAll ){
1708 style_submenu_element("Active", "%R/wcontent");
1709 }else{
1710 style_submenu_element("All", "%R/wcontent?all=1");
@@ -1771,10 +1785,11 @@
1771 Stmt q;
1772 const char *zTitle;
1773 login_check_credentials();
1774 if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
1775 zTitle = PD("title","*");
 
1776 style_header("Wiki Pages Found");
1777 @ <ul>
1778 db_prepare(&q,
1779 "SELECT substr(tagname, 6, 1000) FROM tag WHERE tagname like 'wiki-%%%q%%'"
1780 " ORDER BY lower(tagname) /*sort*/" ,
1781
--- src/wiki.c
+++ src/wiki.c
@@ -62,10 +62,11 @@
62 ** Check a wiki name. If it is not well-formed, then issue an error
63 ** and return true. If it is well-formed, return false.
64 */
65 static int check_name(const char *z){
66 if( !wiki_name_is_wellformed((const unsigned char *)z) ){
67 style_set_current_feature("wiki");
68 style_header("Wiki Page Name Error");
69 @ The wiki name "<span class="wikiError">%h(z)</span>" is not well-formed.
70 @ Rules for wiki page names:
71 well_formed_wiki_name_rules();
72 style_finish_page("wiki");
@@ -134,10 +135,11 @@
135 cgi_set_parameter_nocopy("name", g.zExtra, 1);
136 g.isHome = 1;
137 wiki_page();
138 return;
139 }
140 style_set_current_feature("wiki");
141 style_header("Home");
142 @ <p>This is a stub home-page for the project.
143 @ To fill in this page, first go to
144 @ %z(href("%R/setup_config"))setup/config</a>
145 @ and establish a "Project Name". Then create a
@@ -229,10 +231,11 @@
231 ** Show a summary of the Markdown wiki formatting rules.
232 */
233 void markdown_rules_page(void){
234 Blob x;
235 int fTxt = P("txt")!=0;
236 style_set_current_feature("wiki");
237 style_header("Markdown Formatting Rules");
238 if( fTxt ){
239 style_submenu_element("Formatted", "%R/md_rules");
240 }else{
241 style_submenu_element("Plain-Text", "%R/md_rules?txt=1");
@@ -253,10 +256,11 @@
256 ** Show a summary of the wiki formatting rules.
257 */
258 void wiki_rules_page(void){
259 Blob x;
260 int fTxt = P("txt")!=0;
261 style_set_current_feature("wiki");
262 style_header("Wiki Formatting Rules");
263 if( fTxt ){
264 style_submenu_element("Formatted", "%R/wiki_rules");
265 }else{
266 style_submenu_element("Plain-Text", "%R/wiki_rules?txt=1");
@@ -275,10 +279,11 @@
279 ** WEBPAGE: markup_help
280 **
281 ** Show links to the md_rules and wiki_rules pages.
282 */
283 void markup_help_page(void){
284 style_set_current_feature("wiki");
285 style_header("Fossil Markup Styles");
286 @ <ul>
287 @ <li><p>%z(href("%R/wiki_rules"))Fossil Wiki Formatting Rules</a></p></li>
288 @ <li><p>%z(href("%R/md_rules"))Markdown Formatting Rules</a></p></li>
289 @ </ul>
@@ -344,10 +349,11 @@
349 ** A generic landing page for wiki.
350 */
351 void wiki_helppage(void){
352 login_check_credentials();
353 if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
354 style_set_current_feature("wiki");
355 style_header("Wiki Help");
356 wiki_standard_submenu(W_ALL_BUT(W_HELP));
357 @ <h2>Wiki Links</h2>
358 @ <ul>
359 @ <li> %z(href("%R/timeline?y=w"))Recent changes</a> to wiki pages.</li>
@@ -381,10 +387,11 @@
387 **
388 ** Full-text search of all current wiki text
389 */
390 void wiki_srchpage(void){
391 login_check_credentials();
392 style_set_current_feature("wiki");
393 style_header("Wiki Search");
394 wiki_standard_submenu(W_HELP|W_LIST|W_SANDBOX);
395 search_screen(SRCH_WIKI, 0);
396 style_finish_page("wiki");
397 }
@@ -446,10 +453,11 @@
453 static int wiki_page_header(
454 int eType, /* Page type. Might be WIKITYPE_UNKNOWN */
455 const char *zPageName, /* Name of the page */
456 const char *zExtra /* Extra prefix text on the page header */
457 ){
458 style_set_current_feature("wiki");
459 if( eType==WIKITYPE_UNKNOWN ) eType = wiki_page_type(zPageName);
460 switch( eType ){
461 case WIKITYPE_NORMAL: {
462 style_header("%s%s", zExtra, zPageName);
463 break;
@@ -1138,10 +1146,11 @@
1146 if( !g.perm.RdWiki ){
1147 login_needed(g.anon.RdWiki);
1148 return;
1149 }
1150 }
1151 style_set_current_feature("wiki");
1152 style_header("Wiki Editor");
1153 style_emit_noscript_for_js_page();
1154
1155 /* Status bar */
1156 CX("<div id='fossil-status-bar' "
@@ -1367,10 +1376,11 @@
1376 zName = PD("name","");
1377 zMimetype = wiki_filter_mimetypes(P("mimetype"));
1378 if( zName[0] && wiki_name_is_wellformed((const unsigned char *)zName) ){
1379 cgi_redirectf("wikiedit?name=%T&mimetype=%s", zName, zMimetype);
1380 }
1381 style_set_current_feature("wiki");
1382 style_header("Create A New Wiki Page");
1383 wiki_standard_submenu(W_ALL_BUT(W_NEW));
1384 @ <p>Rules for wiki page names:</p>
1385 well_formed_wiki_name_rules();
1386 form_begin(0, "%R/wikinew");
@@ -1513,10 +1523,11 @@
1523 if( P("cancel")!=0 ){
1524 cgi_redirectf("wiki?name=%T", zPageName);
1525 return;
1526 }
1527 style_set_current_page("%T?name=%T", g.zPath, zPageName);
1528 style_set_current_feature("wiki");
1529 style_header("Append Comment To: %s", zPageName);
1530 if( !goodCaptcha ){
1531 @ <p class="generalError">Error: Incorrect security code.</p>
1532 }
1533 if( P("preview")!=0 ){
@@ -1564,10 +1575,11 @@
1575 Blob sql;
1576 Stmt q;
1577 login_check_credentials();
1578 if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
1579 zPageName = PD("name","");
1580 style_set_current_feature("wiki");
1581 style_header("History Of %s", zPageName);
1582 blob_init(&sql, 0, 0);
1583 blob_append(&sql, timeline_query_for_www(), -1);
1584 blob_append_sql(&sql,
1585 "AND event.objid IN ("
@@ -1645,10 +1657,11 @@
1657 }
1658 nextRid = wiki_next(wiki_tagid(pW1->zWikiTitle),pW1->rDate);
1659 if( nextRid ){
1660 style_submenu_element("Next", "%R/wdiff?rid=%d", nextRid);
1661 }
1662 style_set_current_feature("wiki");
1663 style_header("Changes To %s", pW1->zWikiTitle);
1664 blob_zero(&d);
1665 diffFlags = construct_diff_flags(1);
1666 text_diff(&w2, &w1, &d, 0, diffFlags | DIFF_HTML | DIFF_LINENO);
1667 @ <pre class="udiff">
@@ -1701,10 +1714,11 @@
1714 int showAll = P("all")!=0;
1715 int showRid = P("showid")!=0;
1716
1717 login_check_credentials();
1718 if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
1719 style_set_current_feature("wiki");
1720 style_header("Available Wiki Pages");
1721 if( showAll ){
1722 style_submenu_element("Active", "%R/wcontent");
1723 }else{
1724 style_submenu_element("All", "%R/wcontent?all=1");
@@ -1771,10 +1785,11 @@
1785 Stmt q;
1786 const char *zTitle;
1787 login_check_credentials();
1788 if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
1789 zTitle = PD("title","*");
1790 style_set_current_feature("wiki");
1791 style_header("Wiki Pages Found");
1792 @ <ul>
1793 db_prepare(&q,
1794 "SELECT substr(tagname, 6, 1000) FROM tag WHERE tagname like 'wiki-%%%q%%'"
1795 " ORDER BY lower(tagname) /*sort*/" ,
1796
--- src/xfersetup.c
+++ src/xfersetup.c
@@ -116,10 +116,11 @@
116116
isSubmit = P("submit")!=0;
117117
z = P("x");
118118
if( z==0 ){
119119
z = db_get(zDbField, zDfltValue);
120120
}
121
+ style_set_current_feature("xfersetup");
121122
style_header("Edit %s", zTitle);
122123
if( P("clear")!=0 ){
123124
login_verify_csrf_secret();
124125
db_unset(zDbField, 0);
125126
if( xRebuild ) xRebuild();
126127
--- src/xfersetup.c
+++ src/xfersetup.c
@@ -116,10 +116,11 @@
116 isSubmit = P("submit")!=0;
117 z = P("x");
118 if( z==0 ){
119 z = db_get(zDbField, zDfltValue);
120 }
 
121 style_header("Edit %s", zTitle);
122 if( P("clear")!=0 ){
123 login_verify_csrf_secret();
124 db_unset(zDbField, 0);
125 if( xRebuild ) xRebuild();
126
--- src/xfersetup.c
+++ src/xfersetup.c
@@ -116,10 +116,11 @@
116 isSubmit = P("submit")!=0;
117 z = P("x");
118 if( z==0 ){
119 z = db_get(zDbField, zDfltValue);
120 }
121 style_set_current_feature("xfersetup");
122 style_header("Edit %s", zTitle);
123 if( P("clear")!=0 ){
124 login_verify_csrf_secret();
125 db_unset(zDbField, 0);
126 if( xRebuild ) xRebuild();
127
+1
--- src/zip.c
+++ src/zip.c
@@ -944,10 +944,11 @@
944944
if( zInclude ) blob_appendf(&cacheKey, ",in=%Q", zInclude);
945945
if( zExclude ) blob_appendf(&cacheKey, ",ex=%Q", zExclude);
946946
zKey = blob_str(&cacheKey);
947947
etag_check(ETAG_HASH, zKey);
948948
949
+ style_set_current_feature("zip");
949950
if( P("debug")!=0 ){
950951
style_header("%s Archive Generator Debug Screen", zType);
951952
@ zName = "%h(zName)"<br />
952953
@ rid = %d(rid)<br />
953954
if( zInclude ){
954955
--- src/zip.c
+++ src/zip.c
@@ -944,10 +944,11 @@
944 if( zInclude ) blob_appendf(&cacheKey, ",in=%Q", zInclude);
945 if( zExclude ) blob_appendf(&cacheKey, ",ex=%Q", zExclude);
946 zKey = blob_str(&cacheKey);
947 etag_check(ETAG_HASH, zKey);
948
 
949 if( P("debug")!=0 ){
950 style_header("%s Archive Generator Debug Screen", zType);
951 @ zName = "%h(zName)"<br />
952 @ rid = %d(rid)<br />
953 if( zInclude ){
954
--- src/zip.c
+++ src/zip.c
@@ -944,10 +944,11 @@
944 if( zInclude ) blob_appendf(&cacheKey, ",in=%Q", zInclude);
945 if( zExclude ) blob_appendf(&cacheKey, ",ex=%Q", zExclude);
946 zKey = blob_str(&cacheKey);
947 etag_check(ETAG_HASH, zKey);
948
949 style_set_current_feature("zip");
950 if( P("debug")!=0 ){
951 style_header("%s Archive Generator Debug Screen", zType);
952 @ zName = "%h(zName)"<br />
953 @ rid = %d(rid)<br />
954 if( zInclude ){
955

Keyboard Shortcuts

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