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.
Commit
8ac0830bfce807cadcc3900557cc5a974a20bd716b27434042b56d735aaf0757
Parent
556923fab5b43de…
39 files changed
+11
+4
+2
+3
+1
+2
+2
+1
+1
+2
+1
+2
+1
+1
+5
+6
+1
+1
+1
+1
+1
+1
+1
+1
+3
+1
+15
+5
+2
+6
+2
+5
+2
+6
+3
+4
+15
+1
+1
~
src/alerts.c
~
src/attach.c
~
src/backlink.c
~
src/branch.c
~
src/builtin.c
~
src/cache.c
~
src/captcha.c
~
src/descendants.c
~
src/diff.c
~
src/dispatch.c
~
src/doc.c
~
src/event.c
~
src/extcgi.c
~
src/finfo.c
~
src/forum.c
~
src/info.c
~
src/interwiki.c
~
src/loadctrl.c
~
src/login.c
~
src/main.c
~
src/path.c
~
src/piechart.c
~
src/printf.c
~
src/repolist.c
~
src/report.c
~
src/search.c
~
src/setup.c
~
src/setupuser.c
~
src/sitemap.c
~
src/skins.c
~
src/smtp.c
~
src/stat.c
~
src/timeline.c
~
src/tkt.c
~
src/tktsetup.c
~
src/webmail.c
~
src/wiki.c
~
src/xfersetup.c
~
src/zip.c
+11
| --- src/alerts.c | ||
| +++ src/alerts.c | ||
| @@ -171,10 +171,11 @@ | ||
| 171 | 171 | ** |
| 172 | 172 | ** If the subscriber table does exist, return 0 without doing anything. |
| 173 | 173 | */ |
| 174 | 174 | static int alert_webpages_disabled(void){ |
| 175 | 175 | if( alert_tables_exist() ) return 0; |
| 176 | + style_set_current_feature("alerts"); | |
| 176 | 177 | style_header("Email Alerts Are Disabled"); |
| 177 | 178 | @ <p>Email alerts are disabled on this server</p> |
| 178 | 179 | style_finish_page("alerts"); |
| 179 | 180 | return 1; |
| 180 | 181 | } |
| @@ -216,10 +217,11 @@ | ||
| 216 | 217 | } |
| 217 | 218 | db_begin_transaction(); |
| 218 | 219 | |
| 219 | 220 | alert_submenu_common(); |
| 220 | 221 | style_submenu_element("Send Announcement","%R/announce"); |
| 222 | + style_set_current_feature("alerts"); | |
| 221 | 223 | style_header("Email Notification Setup"); |
| 222 | 224 | @ <h1>Status</h1> |
| 223 | 225 | @ <table class="label-value"> |
| 224 | 226 | if( alert_enabled() ){ |
| 225 | 227 | stats_for_email(); |
| @@ -1364,10 +1366,11 @@ | ||
| 1364 | 1366 | } |
| 1365 | 1367 | if( !g.perm.Admin && !db_get_boolean("anon-subscribe",1) ){ |
| 1366 | 1368 | register_page(); |
| 1367 | 1369 | return; |
| 1368 | 1370 | } |
| 1371 | + style_set_current_feature("alerts"); | |
| 1369 | 1372 | alert_submenu_common(); |
| 1370 | 1373 | needCaptcha = !login_is_individual(); |
| 1371 | 1374 | if( P("submit") |
| 1372 | 1375 | && cgi_csrf_safe(1) |
| 1373 | 1376 | && subscribe_error_check(&eErr,&zErr,needCaptcha) |
| @@ -1572,10 +1575,11 @@ | ||
| 1572 | 1575 | if( db_step(&q)==SQLITE_ROW ){ |
| 1573 | 1576 | zEmail = db_column_text(&q, 0); |
| 1574 | 1577 | zLogin = db_column_text(&q, 1); |
| 1575 | 1578 | uid = db_int(0, "SELECT uid FROM user WHERE login=%Q", zLogin); |
| 1576 | 1579 | } |
| 1580 | + style_set_current_feature("alerts"); | |
| 1577 | 1581 | if( zEmail==0 ){ |
| 1578 | 1582 | style_header("Unsubscribe Fail"); |
| 1579 | 1583 | @ <p>Unable to locate a subscriber with the requested key</p> |
| 1580 | 1584 | }else{ |
| 1581 | 1585 | |
| @@ -1737,10 +1741,11 @@ | ||
| 1737 | 1741 | alert_unsubscribe(sid); |
| 1738 | 1742 | db_commit_transaction(); |
| 1739 | 1743 | return; |
| 1740 | 1744 | } |
| 1741 | 1745 | } |
| 1746 | + style_set_current_feature("alerts"); | |
| 1742 | 1747 | style_header("Update Subscription"); |
| 1743 | 1748 | db_prepare(&q, |
| 1744 | 1749 | "SELECT" |
| 1745 | 1750 | " semail," /* 0 */ |
| 1746 | 1751 | " sverified," /* 1 */ |
| @@ -1977,10 +1982,12 @@ | ||
| 1977 | 1982 | if( login_is_individual() ){ |
| 1978 | 1983 | cgi_redirectf("%R/alerts"); |
| 1979 | 1984 | return; |
| 1980 | 1985 | } |
| 1981 | 1986 | |
| 1987 | + style_set_current_feature("alerts"); | |
| 1988 | + | |
| 1982 | 1989 | zEAddr = PD("e",""); |
| 1983 | 1990 | dx = atoi(PD("dx","0")); |
| 1984 | 1991 | bSubmit = P("submit")!=0 && P("e")!=0 && cgi_csrf_safe(1); |
| 1985 | 1992 | if( bSubmit ){ |
| 1986 | 1993 | if( !captcha_is_correct(1) ){ |
| @@ -2098,10 +2105,11 @@ | ||
| 2098 | 2105 | login_needed(0); |
| 2099 | 2106 | return; |
| 2100 | 2107 | } |
| 2101 | 2108 | alert_submenu_common(); |
| 2102 | 2109 | style_submenu_element("Users","setup_ulist"); |
| 2110 | + style_set_current_feature("alerts"); | |
| 2103 | 2111 | style_header("Subscriber List"); |
| 2104 | 2112 | nTotal = db_int(0, "SELECT count(*) FROM subscriber"); |
| 2105 | 2113 | nPending = db_int(0, "SELECT count(*) FROM subscriber WHERE NOT sverified"); |
| 2106 | 2114 | if( nPending>0 && P("purge") && cgi_csrf_safe(0) ){ |
| 2107 | 2115 | int nNewPending; |
| @@ -2799,10 +2807,11 @@ | ||
| 2799 | 2807 | unsigned int uSeed = 0; |
| 2800 | 2808 | const char *zDecoded; |
| 2801 | 2809 | char *zCaptcha = 0; |
| 2802 | 2810 | |
| 2803 | 2811 | login_check_credentials(); |
| 2812 | + style_set_current_feature("alerts"); | |
| 2804 | 2813 | if( zAdminEmail==0 || zAdminEmail[0]==0 ){ |
| 2805 | 2814 | style_header("Outbound Email Disabled"); |
| 2806 | 2815 | @ <p>Outbound email is disabled on this repository |
| 2807 | 2816 | style_finish_page("alerts"); |
| 2808 | 2817 | return; |
| @@ -2842,10 +2851,11 @@ | ||
| 2842 | 2851 | if( captcha_needed() ){ |
| 2843 | 2852 | uSeed = captcha_seed(); |
| 2844 | 2853 | zDecoded = captcha_decode(uSeed); |
| 2845 | 2854 | zCaptcha = captcha_render(zDecoded); |
| 2846 | 2855 | } |
| 2856 | + style_set_current_feature("alerts"); | |
| 2847 | 2857 | style_header("Message To Administrator"); |
| 2848 | 2858 | form_begin(0, "%R/contact_admin"); |
| 2849 | 2859 | @ <p>Enter a message to the repository administrator below:</p> |
| 2850 | 2860 | @ <table class="subscribe"> |
| 2851 | 2861 | if( zCaptcha ){ |
| @@ -2971,10 +2981,11 @@ | ||
| 2971 | 2981 | login_check_credentials(); |
| 2972 | 2982 | if( !g.perm.Announce ){ |
| 2973 | 2983 | login_needed(0); |
| 2974 | 2984 | return; |
| 2975 | 2985 | } |
| 2986 | + style_set_current_feature("alerts"); | |
| 2976 | 2987 | if( fossil_strcmp(P("name"),"test1")==0 ){ |
| 2977 | 2988 | /* Visit the /announce/test1 page to see the CGI variables */ |
| 2978 | 2989 | @ <p style='border: 1px solid black; padding: 1ex;'> |
| 2979 | 2990 | cgi_print_all(0, 0); |
| 2980 | 2991 | @ </p> |
| 2981 | 2992 |
| --- 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 |
+4
| --- src/attach.c | ||
| +++ src/attach.c | ||
| @@ -45,10 +45,11 @@ | ||
| 45 | 45 | Blob sql; |
| 46 | 46 | Stmt q; |
| 47 | 47 | |
| 48 | 48 | if( zPage && zTkt ) zTkt = 0; |
| 49 | 49 | login_check_credentials(); |
| 50 | + style_set_current_feature("attach"); | |
| 50 | 51 | blob_zero(&sql); |
| 51 | 52 | blob_append_sql(&sql, |
| 52 | 53 | "SELECT datetime(mtime,toLocal()), src, target, filename," |
| 53 | 54 | " comment, user," |
| 54 | 55 | " (SELECT uuid FROM blob WHERE rid=attachid), attachid," |
| @@ -176,10 +177,11 @@ | ||
| 176 | 177 | int attachid = atoi(PD("attachid","0")); |
| 177 | 178 | char *zUUID; |
| 178 | 179 | |
| 179 | 180 | if( zFile==0 ) fossil_redirect_home(); |
| 180 | 181 | login_check_credentials(); |
| 182 | + style_set_current_feature("attach"); | |
| 181 | 183 | if( zPage ){ |
| 182 | 184 | if( g.perm.RdWiki==0 ){ login_needed(g.anon.RdWiki); return; } |
| 183 | 185 | zTarget = zPage; |
| 184 | 186 | }else if( zTkt ){ |
| 185 | 187 | if( g.perm.RdTkt==0 ){ login_needed(g.anon.RdTkt); return; } |
| @@ -386,10 +388,11 @@ | ||
| 386 | 388 | (zPage!=0 && wiki_need_moderation(0)); |
| 387 | 389 | const char *zComment = PD("comment", ""); |
| 388 | 390 | attach_commit(zName, zTarget, aContent, szContent, needModerator, zComment); |
| 389 | 391 | cgi_redirect(zFrom); |
| 390 | 392 | } |
| 393 | + style_set_current_feature("attach"); | |
| 391 | 394 | style_header("Add Attachment"); |
| 392 | 395 | if( !goodCaptcha ){ |
| 393 | 396 | @ <p class="generalError">Error: Incorrect security code.</p> |
| 394 | 397 | } |
| 395 | 398 | @ <h2>Add Attachment To %s(zTargetType)</h2> |
| @@ -539,10 +542,11 @@ | ||
| 539 | 542 | } |
| 540 | 543 | if( strcmp(zModAction,"approve")==0 ){ |
| 541 | 544 | moderation_approve('a', rid); |
| 542 | 545 | } |
| 543 | 546 | } |
| 547 | + style_set_current_feature("attach"); | |
| 544 | 548 | style_header("Attachment Details"); |
| 545 | 549 | style_submenu_element("Raw", "%R/artifact/%s", zUuid); |
| 546 | 550 | if(fShowContent){ |
| 547 | 551 | style_submenu_element("Line Numbers", "%R/ainfo/%s%s", zUuid, |
| 548 | 552 | ((zLn&&*zLn) ? "" : "?ln=0")); |
| 549 | 553 |
| --- 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 |
+2
| --- src/backlink.c | ||
| +++ src/backlink.c | ||
| @@ -76,10 +76,11 @@ | ||
| 76 | 76 | login_check_credentials(); |
| 77 | 77 | if( !g.perm.Read || !g.perm.RdTkt || !g.perm.RdWiki ){ |
| 78 | 78 | login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki); |
| 79 | 79 | return; |
| 80 | 80 | } |
| 81 | + style_set_current_feature("test"); | |
| 81 | 82 | style_header("Backlink Timeline (Internal Testing Use)"); |
| 82 | 83 | db_multi_exec( |
| 83 | 84 | "CREATE TEMP TABLE IF NOT EXISTS ok(rid INTEGER PRIMARY KEY);" |
| 84 | 85 | "DELETE FROM ok;" |
| 85 | 86 | "INSERT OR IGNORE INTO ok" |
| @@ -107,10 +108,11 @@ | ||
| 107 | 108 | login_check_credentials(); |
| 108 | 109 | if( !g.perm.Admin ){ |
| 109 | 110 | login_needed(g.anon.Admin); |
| 110 | 111 | return; |
| 111 | 112 | } |
| 113 | + style_set_current_feature("test"); | |
| 112 | 114 | style_header("Backlink Table (Internal Testing Use)"); |
| 113 | 115 | n = db_int(0, "SELECT count(*) FROM backlink"); |
| 114 | 116 | @ <p>%d(n) backlink table entries:</p> |
| 115 | 117 | db_prepare(&q, |
| 116 | 118 | "SELECT target, srctype, srcid, datetime(mtime)," |
| 117 | 119 |
| --- 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 |
+3
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -458,10 +458,11 @@ | ||
| 458 | 458 | Stmt q; |
| 459 | 459 | double rNow; |
| 460 | 460 | int show_colors = PB("colors"); |
| 461 | 461 | login_check_credentials(); |
| 462 | 462 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 463 | + style_set_current_feature("branch"); | |
| 463 | 464 | style_header("Branches"); |
| 464 | 465 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 465 | 466 | style_submenu_checkbox("colors", "Use Branch Colors", 0, 0); |
| 466 | 467 | login_anonymous_available(); |
| 467 | 468 | |
| @@ -556,10 +557,11 @@ | ||
| 556 | 557 | showAll = 1; |
| 557 | 558 | } |
| 558 | 559 | if( showAll ) brFlags = BRL_BOTH; |
| 559 | 560 | if( showClosed ) brFlags = BRL_CLOSED_ONLY; |
| 560 | 561 | |
| 562 | + style_set_current_feature("branch"); | |
| 561 | 563 | style_header("%s", showClosed ? "Closed Branches" : |
| 562 | 564 | showAll ? "All Branches" : "Open Branches"); |
| 563 | 565 | style_submenu_element("Timeline", "brtimeline"); |
| 564 | 566 | if( showClosed ){ |
| 565 | 567 | style_submenu_element("All", "brlist?all"); |
| @@ -671,10 +673,11 @@ | ||
| 671 | 673 | int fOnlyHidden = PB("onlyhidden")!=0; /* The "onlyhidden" query parameter */ |
| 672 | 674 | |
| 673 | 675 | login_check_credentials(); |
| 674 | 676 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 675 | 677 | |
| 678 | + style_set_current_feature("branch"); | |
| 676 | 679 | style_header("Branches"); |
| 677 | 680 | style_submenu_element("List", "brlist"); |
| 678 | 681 | login_anonymous_available(); |
| 679 | 682 | timeline_ss_submenu(); |
| 680 | 683 | cookie_render(); |
| 681 | 684 |
| --- 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 |
+1
| --- src/builtin.c | ||
| +++ src/builtin.c | ||
| @@ -94,10 +94,11 @@ | ||
| 94 | 94 | ** |
| 95 | 95 | ** Show all built-in text files. |
| 96 | 96 | */ |
| 97 | 97 | void test_builtin_list_page(void){ |
| 98 | 98 | int i; |
| 99 | + style_set_current_feature("test"); | |
| 99 | 100 | style_header("Built-in Text Files"); |
| 100 | 101 | @ <ol> |
| 101 | 102 | for(i=0; i<count(aBuiltinFiles); i++){ |
| 102 | 103 | const char *z = aBuiltinFiles[i].zName; |
| 103 | 104 | char *zUrl = href("%R/builtin?name=%T&id=%.8s&mimetype=text/plain", |
| 104 | 105 |
| --- 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 |
+2
| --- src/cache.c | ||
| +++ src/cache.c | ||
| @@ -353,10 +353,11 @@ | ||
| 353 | 353 | sqlite3_stmt *pStmt; |
| 354 | 354 | char zBuf[100]; |
| 355 | 355 | |
| 356 | 356 | login_check_credentials(); |
| 357 | 357 | if( !g.perm.Setup ){ login_needed(0); return; } |
| 358 | + style_set_current_feature("cache"); | |
| 358 | 359 | style_header("Web Cache Status"); |
| 359 | 360 | db = cacheOpen(0); |
| 360 | 361 | if( db==0 ){ |
| 361 | 362 | @ The web-page cache is disabled for this repository |
| 362 | 363 | }else{ |
| @@ -405,13 +406,14 @@ | ||
| 405 | 406 | login_check_credentials(); |
| 406 | 407 | if( !g.perm.Setup ){ login_needed(0); return; } |
| 407 | 408 | zKey = PD("key",""); |
| 408 | 409 | blob_zero(&content); |
| 409 | 410 | if( cache_read(&content, zKey)==0 ){ |
| 411 | + style_set_current_feature("cache"); | |
| 410 | 412 | style_header("Cache Download Error"); |
| 411 | 413 | @ The cache does not contain any entry with this key: "%h(zKey)" |
| 412 | 414 | style_finish_page("cache"); |
| 413 | 415 | return; |
| 414 | 416 | } |
| 415 | 417 | cgi_set_content(&content); |
| 416 | 418 | cgi_set_content_type("application/x-compressed"); |
| 417 | 419 | } |
| 418 | 420 |
| --- 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 |
+2
| --- src/captcha.c | ||
| +++ src/captcha.c | ||
| @@ -586,10 +586,11 @@ | ||
| 586 | 586 | if( zPw==0 || zPw[0]==0 ){ |
| 587 | 587 | u64 x; |
| 588 | 588 | sqlite3_randomness(sizeof(x), &x); |
| 589 | 589 | zPw = mprintf("%016llx", x); |
| 590 | 590 | } |
| 591 | + style_set_current_feature("test"); | |
| 591 | 592 | style_header("Captcha Test"); |
| 592 | 593 | @ <pre> |
| 593 | 594 | @ %s(captcha_render(zPw)) |
| 594 | 595 | @ </pre> |
| 595 | 596 | style_finish_page("test"); |
| @@ -621,10 +622,11 @@ | ||
| 621 | 622 | cgi_set_cookie(zCookieName, "1", login_cookie_path(), 8*3600); |
| 622 | 623 | return 0; |
| 623 | 624 | } |
| 624 | 625 | |
| 625 | 626 | /* This appears to be a spider. Offer the captcha */ |
| 627 | + style_set_current_feature("captcha"); | |
| 626 | 628 | style_header("Verification"); |
| 627 | 629 | @ <form method='POST' action='%s(g.zPath)'> |
| 628 | 630 | cgi_query_parameters_to_hidden(); |
| 629 | 631 | @ <p>Please demonstrate that you are human, not a spider or robot</p> |
| 630 | 632 | captcha_generate(1); |
| 631 | 633 |
| --- 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 |
+1
| --- src/descendants.c | ||
| +++ src/descendants.c | ||
| @@ -561,10 +561,11 @@ | ||
| 561 | 561 | } |
| 562 | 562 | if( showClosed || showAll ){ |
| 563 | 563 | style_submenu_element("Open", "%s", url_render(&url, 0, 0, 0, 0)); |
| 564 | 564 | } |
| 565 | 565 | url_reset(&url); |
| 566 | + style_set_current_feature("leaves"); | |
| 566 | 567 | style_header("Leaves"); |
| 567 | 568 | login_anonymous_available(); |
| 568 | 569 | timeline_ss_submenu(); |
| 569 | 570 | cookie_render(); |
| 570 | 571 | #if 0 |
| 571 | 572 |
| --- 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 @@ | ||
| 2448 | 2448 | /* compute the annotation */ |
| 2449 | 2449 | annotate_file(&ann, zFilename, zRevision, zLimit, zOrigin, annFlags); |
| 2450 | 2450 | zCI = ann.aVers[0].zMUuid; |
| 2451 | 2451 | |
| 2452 | 2452 | /* generate the web page */ |
| 2453 | + style_set_current_feature("annotate"); | |
| 2453 | 2454 | style_header("Annotation For %h", zFilename); |
| 2454 | 2455 | if( bBlame ){ |
| 2455 | 2456 | url_initialize(&url, "blame"); |
| 2456 | 2457 | }else{ |
| 2457 | 2458 | url_initialize(&url, "annotate"); |
| 2458 | 2459 |
| --- 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 |
+2
| --- src/dispatch.c | ||
| +++ src/dispatch.c | ||
| @@ -747,10 +747,11 @@ | ||
| 747 | 747 | if( zCmd==0 ) zCmd = P("name"); |
| 748 | 748 | if( zCmd && *zCmd ){ |
| 749 | 749 | int rc; |
| 750 | 750 | const CmdOrPage *pCmd = 0; |
| 751 | 751 | |
| 752 | + style_set_current_feature("tkt"); | |
| 752 | 753 | style_header("Help: %s", zCmd); |
| 753 | 754 | |
| 754 | 755 | style_submenu_element("Command-List", "%R/help"); |
| 755 | 756 | rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd); |
| 756 | 757 | if( *zCmd=='/' ){ |
| @@ -862,10 +863,11 @@ | ||
| 862 | 863 | */ |
| 863 | 864 | void test_all_help_page(void){ |
| 864 | 865 | int i; |
| 865 | 866 | Blob buf; |
| 866 | 867 | blob_init(&buf,0,0); |
| 868 | + style_set_current_feature("test"); | |
| 867 | 869 | style_header("All Help Text"); |
| 868 | 870 | @ <dl> |
| 869 | 871 | for(i=0; i<MX_COMMAND; i++){ |
| 870 | 872 | const char *zDesc; |
| 871 | 873 | unsigned int e = aCommand[i].eCmdFlags; |
| 872 | 874 |
| --- 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 @@ | ||
| 906 | 906 | #endif |
| 907 | 907 | }; |
| 908 | 908 | |
| 909 | 909 | login_check_credentials(); |
| 910 | 910 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 911 | + style_set_current_feature("doc"); | |
| 911 | 912 | blob_init(&title, 0, 0); |
| 912 | 913 | zDfltTitle = isUV ? "" : "Documentation"; |
| 913 | 914 | db_begin_transaction(); |
| 914 | 915 | while( rid==0 && (++nMiss)<=count(azSuffix) ){ |
| 915 | 916 | zName = P("name"); |
| 916 | 917 |
| --- 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 |
+2
| --- src/event.c | ||
| +++ src/event.c | ||
| @@ -110,10 +110,11 @@ | ||
| 110 | 110 | } |
| 111 | 111 | break; |
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | 114 | db_finalize(&q1); |
| 115 | + style_set_current_feature("event"); | |
| 115 | 116 | if( rid==0 || (specRid!=0 && specRid!=rid) ){ |
| 116 | 117 | style_header("No Such Tech-Note"); |
| 117 | 118 | @ Cannot locate a technical note called <b>%h(zId)</b>. |
| 118 | 119 | style_finish_page("event"); |
| 119 | 120 | return; |
| @@ -415,10 +416,11 @@ | ||
| 415 | 416 | */ |
| 416 | 417 | if( !g.perm.Write || (rid && !g.perm.WrWiki) || (!rid && !g.perm.NewWiki) ){ |
| 417 | 418 | login_needed(g.anon.Write && (rid ? g.anon.WrWiki : g.anon.NewWiki)); |
| 418 | 419 | return; |
| 419 | 420 | } |
| 421 | + style_set_current_feature("event"); | |
| 420 | 422 | |
| 421 | 423 | /* Figure out the color */ |
| 422 | 424 | if( rid ){ |
| 423 | 425 | zClr = db_text("", "SELECT bgcolor FROM event WHERE objid=%d", rid); |
| 424 | 426 | if( zClr && zClr[0] ){ |
| 425 | 427 |
| --- 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 |
+1
| --- src/extcgi.c | ||
| +++ src/extcgi.c | ||
| @@ -395,10 +395,11 @@ | ||
| 395 | 395 | if( !g.perm.Admin ){ |
| 396 | 396 | login_needed(0); |
| 397 | 397 | return; |
| 398 | 398 | } |
| 399 | 399 | ext_files(); |
| 400 | + style_set_current_feature("extcgi"); | |
| 400 | 401 | style_header("CGI Extension Filelist"); |
| 401 | 402 | @ <table border="0" cellspacing="0" cellpadding="3"> |
| 402 | 403 | @ <tbody> |
| 403 | 404 | db_prepare(&q, "SELECT pathname, isexe FROM sfile" |
| 404 | 405 | " ORDER BY pathname"); |
| 405 | 406 |
| --- 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 |
+1
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -779,10 +779,11 @@ | ||
| 779 | 779 | const char *zCI = P("ci"); |
| 780 | 780 | Stmt q; |
| 781 | 781 | |
| 782 | 782 | login_check_credentials(); |
| 783 | 783 | if( !g.perm.Admin ){ login_needed(g.anon.Admin); return; } |
| 784 | + style_set_current_feature("finfo"); | |
| 784 | 785 | style_header("MLINK Table"); |
| 785 | 786 | if( zFName==0 && zCI==0 ){ |
| 786 | 787 | @ <span class='generalError'> |
| 787 | 788 | @ Requires either a name= or ci= query parameter |
| 788 | 789 | @ </span> |
| 789 | 790 |
| --- 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 |
+5
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -862,10 +862,11 @@ | ||
| 862 | 862 | " FROM forumpost, event" |
| 863 | 863 | " WHERE event.objid=forumpost.fpid" |
| 864 | 864 | " AND forumpost.fpid=%d;", |
| 865 | 865 | fpid |
| 866 | 866 | ); |
| 867 | + style_set_current_feature("forum"); | |
| 867 | 868 | style_header("%s%s", zThreadTitle, *zThreadTitle ? "" : "Forum"); |
| 868 | 869 | fossil_free(zThreadTitle); |
| 869 | 870 | if( mode!=FD_CHRONO ){ |
| 870 | 871 | style_submenu_element("Chronological", "%R/%s/%s?t=c%s%s", g.zPath, zName, |
| 871 | 872 | bUnf ? "&unf" : "", bHist ? "&hist" : ""); |
| @@ -1054,10 +1055,11 @@ | ||
| 1054 | 1055 | }else{ |
| 1055 | 1056 | forumnew_page(); |
| 1056 | 1057 | } |
| 1057 | 1058 | return; |
| 1058 | 1059 | } |
| 1060 | + style_set_current_feature("forum"); | |
| 1059 | 1061 | style_header("%h As Anonymous?", isEdit ? "Reply" : "Post"); |
| 1060 | 1062 | @ <p>You are not logged in. |
| 1061 | 1063 | @ <p><table border="0" cellpadding="10"> |
| 1062 | 1064 | @ <tr><td> |
| 1063 | 1065 | @ <form action="%s(zGoto)" method="POST"> |
| @@ -1115,10 +1117,11 @@ | ||
| 1115 | 1117 | } |
| 1116 | 1118 | if( P("preview") && !whitespace_only(zContent) ){ |
| 1117 | 1119 | @ <h1>Preview:</h1> |
| 1118 | 1120 | forum_render(zTitle, zMimetype, zContent, "forumEdit", 1); |
| 1119 | 1121 | } |
| 1122 | + style_set_current_feature("forum"); | |
| 1120 | 1123 | style_header("New Forum Thread"); |
| 1121 | 1124 | @ <form action="%R/forume1" method="POST"> |
| 1122 | 1125 | @ <h1>New Thread:</h1> |
| 1123 | 1126 | forum_from_line(); |
| 1124 | 1127 | forum_post_widget(zTitle, zMimetype, zContent); |
| @@ -1214,10 +1217,11 @@ | ||
| 1214 | 1217 | cgi_redirectf("%R/forum"); |
| 1215 | 1218 | } |
| 1216 | 1219 | return; |
| 1217 | 1220 | } |
| 1218 | 1221 | } |
| 1222 | + style_set_current_feature("forum"); | |
| 1219 | 1223 | isDelete = P("nullout")!=0; |
| 1220 | 1224 | if( P("submit") |
| 1221 | 1225 | && isCsrfSafe |
| 1222 | 1226 | && (zContent = PDT("content",""))!=0 |
| 1223 | 1227 | && (!whitespace_only(zContent) || isDelete) |
| @@ -1346,10 +1350,11 @@ | ||
| 1346 | 1350 | srchFlags = search_restrict(SRCH_FORUM); |
| 1347 | 1351 | if( !g.perm.RdForum ){ |
| 1348 | 1352 | login_needed(g.anon.RdForum); |
| 1349 | 1353 | return; |
| 1350 | 1354 | } |
| 1355 | + style_set_current_feature("forum"); | |
| 1351 | 1356 | style_header("Forum"); |
| 1352 | 1357 | if( g.perm.WrForum ){ |
| 1353 | 1358 | style_submenu_element("New Thread","%R/forumnew"); |
| 1354 | 1359 | }else{ |
| 1355 | 1360 | /* Can't combine this with previous case using the ternary operator |
| 1356 | 1361 |
| --- 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 @@ | ||
| 629 | 629 | const char *zPageHide = "ci"; /* Page that hides diffs */ |
| 630 | 630 | const char *zBrName; /* Branch name */ |
| 631 | 631 | |
| 632 | 632 | login_check_credentials(); |
| 633 | 633 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 634 | + style_set_current_feature("vinfo"); | |
| 634 | 635 | zName = P("name"); |
| 635 | 636 | rid = name_to_rid_www("name"); |
| 636 | 637 | if( rid==0 ){ |
| 637 | 638 | style_header("Check-in Information Error"); |
| 638 | 639 | @ No such object: %h(g.argv[2]) |
| @@ -962,10 +963,11 @@ | ||
| 962 | 963 | int tagid; |
| 963 | 964 | int ridNext; |
| 964 | 965 | |
| 965 | 966 | login_check_credentials(); |
| 966 | 967 | if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } |
| 968 | + style_set_current_feature("winfo"); | |
| 967 | 969 | rid = name_to_rid_www("name"); |
| 968 | 970 | if( rid==0 || (pWiki = manifest_get(rid, CFTYPE_WIKI, 0))==0 ){ |
| 969 | 971 | style_header("Wiki Page Information Error"); |
| 970 | 972 | @ No such object: %h(P("name")) |
| 971 | 973 | style_finish_page("winfo"); |
| @@ -1210,10 +1212,11 @@ | ||
| 1210 | 1212 | if(zGlob && !*zGlob){ |
| 1211 | 1213 | zGlob = NULL; |
| 1212 | 1214 | } |
| 1213 | 1215 | diffFlags = construct_diff_flags(diffType); |
| 1214 | 1216 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 1217 | + style_set_current_feature("vdiff"); | |
| 1215 | 1218 | if( zBranch==0 ){ |
| 1216 | 1219 | style_submenu_element("Path", "%R/timeline?me=%T&you=%T", zFrom, zTo); |
| 1217 | 1220 | } |
| 1218 | 1221 | if( diffType!=0 ){ |
| 1219 | 1222 | style_submenu_element("Hide Diff", "%R/vdiff?%s&diff=0%s%T%s", |
| @@ -1730,10 +1733,11 @@ | ||
| 1730 | 1733 | |
| 1731 | 1734 | zV1 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v1); |
| 1732 | 1735 | zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2); |
| 1733 | 1736 | diffFlags = construct_diff_flags(diffType) | DIFF_HTML; |
| 1734 | 1737 | |
| 1738 | + style_set_current_feature("fdiff"); | |
| 1735 | 1739 | style_header("Diff"); |
| 1736 | 1740 | style_submenu_checkbox("w", "Ignore Whitespace", 0, 0); |
| 1737 | 1741 | if( diffType==2 ){ |
| 1738 | 1742 | style_submenu_element("Unified Diff", "%R/fdiff?v1=%T&v2=%T&diff=1", |
| 1739 | 1743 | P("v1"), P("v2")); |
| @@ -2234,10 +2238,11 @@ | ||
| 2234 | 2238 | int isBranchCI = 0; /* ci= refers to a branch name */ |
| 2235 | 2239 | char *zHeader = 0; |
| 2236 | 2240 | |
| 2237 | 2241 | login_check_credentials(); |
| 2238 | 2242 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 2243 | + style_set_current_feature("artifact"); | |
| 2239 | 2244 | |
| 2240 | 2245 | /* Capture and normalize the name= and ci= query parameters */ |
| 2241 | 2246 | if( zName==0 ){ |
| 2242 | 2247 | zName = P("filename"); |
| 2243 | 2248 | if( zName==0 ){ |
| @@ -2590,10 +2595,11 @@ | ||
| 2590 | 2595 | } |
| 2591 | 2596 | zTktTitle = db_table_has_column("repository", "ticket", "title" ) |
| 2592 | 2597 | ? db_text("(No title)", |
| 2593 | 2598 | "SELECT title FROM ticket WHERE tkt_uuid=%Q", zTktName) |
| 2594 | 2599 | : 0; |
| 2600 | + style_set_current_feature("tinfo"); | |
| 2595 | 2601 | style_header("Ticket Change Details"); |
| 2596 | 2602 | style_submenu_element("Raw", "%R/artifact/%s", zUuid); |
| 2597 | 2603 | style_submenu_element("History", "%R/tkthistory/%s", zTktName); |
| 2598 | 2604 | style_submenu_element("Page", "%R/tktview/%t", zTktName); |
| 2599 | 2605 | style_submenu_element("Timeline", "%R/tkttimeline/%t", zTktName); |
| 2600 | 2606 |
| --- 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 |
+1
| --- src/interwiki.c | ||
| +++ src/interwiki.c | ||
| @@ -343,10 +343,11 @@ | ||
| 343 | 343 | zTag, zBase, zHash, zWiki); |
| 344 | 344 | db_protect_pop(); |
| 345 | 345 | } |
| 346 | 346 | } |
| 347 | 347 | |
| 348 | + style_set_current_feature("interwiki"); | |
| 348 | 349 | style_header("Interwiki Map Configuration"); |
| 349 | 350 | @ <p>Interwiki links are hyperlink targets of the form |
| 350 | 351 | @ <blockquote><i>Tag</i><b>:</b><i>PageName</i></blockquote> |
| 351 | 352 | @ <p>Such links resolve to links to <i>PageName</i> on a separate server |
| 352 | 353 | @ identified by <i>Tag</i>. The Interwiki Map or "intermap" is a mapping |
| 353 | 354 |
| --- 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 |
+1
| --- src/loadctrl.c | ||
| +++ src/loadctrl.c | ||
| @@ -52,10 +52,11 @@ | ||
| 52 | 52 | */ |
| 53 | 53 | void load_control(void){ |
| 54 | 54 | double mxLoad = atof(db_get("max-loadavg", 0)); |
| 55 | 55 | if( mxLoad<=0.0 || mxLoad>=load_average() ) return; |
| 56 | 56 | |
| 57 | + style_set_current_feature("test"); | |
| 57 | 58 | style_header("Server Overload"); |
| 58 | 59 | @ <h2>The server load is currently too high. |
| 59 | 60 | @ Please try again later.</h2> |
| 60 | 61 | @ <p>Current load average: %f(load_average()).<br /> |
| 61 | 62 | @ Load average limit: %f(mxLoad)</p> |
| 62 | 63 |
| --- 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 |
+1
| --- src/login.c | ||
| +++ src/login.c | ||
| @@ -656,10 +656,11 @@ | ||
| 656 | 656 | */ |
| 657 | 657 | login_set_user_cookie(zUsername, uid, NULL, rememberMe?0:1); |
| 658 | 658 | redirect_to_g(); |
| 659 | 659 | } |
| 660 | 660 | } |
| 661 | + style_set_current_feature("login"); | |
| 661 | 662 | style_header("Login/Logout"); |
| 662 | 663 | style_adunit_config(ADUNIT_OFF); |
| 663 | 664 | @ %s(zErrMsg) |
| 664 | 665 | if( zGoto && !noAnon ){ |
| 665 | 666 | char *zAbbrev = fossil_strdup(zGoto); |
| 666 | 667 |
| --- 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 @@ | ||
| 3049 | 3049 | login_check_credentials(); |
| 3050 | 3050 | if( !g.perm.Admin ){ |
| 3051 | 3051 | login_needed(0); |
| 3052 | 3052 | return; |
| 3053 | 3053 | } |
| 3054 | + style_set_current_feature("test"); | |
| 3054 | 3055 | style_header("Warning Test Page"); |
| 3055 | 3056 | style_submenu_element("Error Log","%R/errorlog"); |
| 3056 | 3057 | if( iCase<1 || iCase>4 ){ |
| 3057 | 3058 | @ <p>Generate a message to the <a href="%R/errorlog">error log</a> |
| 3058 | 3059 | @ by clicking on one of the following cases: |
| 3059 | 3060 |
| --- 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 @@ | ||
| 617 | 617 | int nRename; |
| 618 | 618 | int nCheckin; |
| 619 | 619 | |
| 620 | 620 | login_check_credentials(); |
| 621 | 621 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 622 | + style_set_current_feature("test"); | |
| 622 | 623 | if( P("all")!=0 ){ |
| 623 | 624 | style_header("List Of All Filename Changes"); |
| 624 | 625 | db_multi_exec("%s", zRenameQuery/*safe-for-%s*/); |
| 625 | 626 | style_submenu_element("Distinct", "%R/test-rename-list"); |
| 626 | 627 | }else{ |
| 627 | 628 |
| --- 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 |
+1
| --- src/piechart.c | ||
| +++ src/piechart.c | ||
| @@ -277,10 +277,11 @@ | ||
| 277 | 277 | int width; |
| 278 | 278 | int height; |
| 279 | 279 | int i, j; |
| 280 | 280 | |
| 281 | 281 | login_check_credentials(); |
| 282 | + style_set_current_feature("test"); | |
| 282 | 283 | style_header("Pie Chart Test"); |
| 283 | 284 | db_multi_exec("CREATE TEMP TABLE piechart(amt REAL, label TEXT);"); |
| 284 | 285 | db_prepare(&ins, "INSERT INTO piechart(amt,label) VALUES(:amt,:label)"); |
| 285 | 286 | zData = PD("data",""); |
| 286 | 287 | width = atoi(PD("width","800")); |
| 287 | 288 |
| --- 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 |
+1
| --- src/printf.c | ||
| +++ src/printf.c | ||
| @@ -1116,10 +1116,11 @@ | ||
| 1116 | 1116 | #endif |
| 1117 | 1117 | if( g.cgiOutput==1 && g.db ){ |
| 1118 | 1118 | g.cgiOutput = 2; |
| 1119 | 1119 | cgi_reset_content(); |
| 1120 | 1120 | cgi_set_content_type("text/html"); |
| 1121 | + style_set_current_feature("error"); | |
| 1121 | 1122 | style_header("Bad Request"); |
| 1122 | 1123 | etag_cancel(); |
| 1123 | 1124 | @ <p class="generalError">%h(z)</p> |
| 1124 | 1125 | cgi_set_status(400, "Bad Request"); |
| 1125 | 1126 | style_finish_page("error"); |
| 1126 | 1127 |
| --- 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 |
+1
| --- src/repolist.c | ||
| +++ src/repolist.c | ||
| @@ -245,10 +245,11 @@ | ||
| 245 | 245 | /* This case runs if remote_repository_info() found a repository |
| 246 | 246 | ** that has the "repolist_skin" property set to non-zero and left |
| 247 | 247 | ** that repository open in g.db. Use the skin of that repository |
| 248 | 248 | ** for display. */ |
| 249 | 249 | login_check_credentials(); |
| 250 | + style_set_current_feature("repolist"); | |
| 250 | 251 | style_header("Repository List"); |
| 251 | 252 | @ %s(blob_str(&html)) |
| 252 | 253 | style_table_sorter(); |
| 253 | 254 | style_finish_page("repolist"); |
| 254 | 255 | }else{ |
| 255 | 256 |
| --- 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 |
+3
| --- src/report.c | ||
| +++ src/report.c | ||
| @@ -325,10 +325,11 @@ | ||
| 325 | 325 | return; |
| 326 | 326 | } |
| 327 | 327 | rn = atoi(PD("rn","0")); |
| 328 | 328 | db_prepare(&q, "SELECT title, sqlcode, owner, cols " |
| 329 | 329 | "FROM reportfmt WHERE rn=%d",rn); |
| 330 | + style_set_current_feature("report"); | |
| 330 | 331 | style_header("SQL For Report Format Number %d", rn); |
| 331 | 332 | if( db_step(&q)!=SQLITE_ROW ){ |
| 332 | 333 | @ <p>Unknown report number: %d(rn)</p> |
| 333 | 334 | style_finish_page("report"); |
| 334 | 335 | db_finalize(&q); |
| @@ -381,10 +382,11 @@ | ||
| 381 | 382 | login_check_credentials(); |
| 382 | 383 | if( !g.perm.TktFmt ){ |
| 383 | 384 | login_needed(g.anon.TktFmt); |
| 384 | 385 | return; |
| 385 | 386 | } |
| 387 | + style_set_current_feature("report"); | |
| 386 | 388 | /*view_add_functions(0);*/ |
| 387 | 389 | rn = atoi(PD("rn","0")); |
| 388 | 390 | zTitle = P("t"); |
| 389 | 391 | zOwner = PD("w",g.zLogin); |
| 390 | 392 | z = P("s"); |
| @@ -1029,10 +1031,11 @@ | ||
| 1029 | 1031 | count = 0; |
| 1030 | 1032 | if( !tabs ){ |
| 1031 | 1033 | struct GenerateHTML sState = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
| 1032 | 1034 | |
| 1033 | 1035 | db_multi_exec("PRAGMA empty_result_callbacks=ON"); |
| 1036 | + style_set_current_feature("report"); | |
| 1034 | 1037 | style_submenu_element("Raw", "rptview?tablist=1&%h", PD("QUERY_STRING","")); |
| 1035 | 1038 | if( g.perm.Admin |
| 1036 | 1039 | || (g.perm.TktFmt && g.zLogin && fossil_strcmp(g.zLogin,zOwner)==0) ){ |
| 1037 | 1040 | style_submenu_element("Edit", "rptedit?rn=%d", rn); |
| 1038 | 1041 | } |
| 1039 | 1042 |
| --- 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 |
+1
| --- src/search.c | ||
| +++ src/search.c | ||
| @@ -1979,10 +1979,11 @@ | ||
| 1979 | 1979 | const char *zIdxed = P("ixed"); |
| 1980 | 1980 | int id; |
| 1981 | 1981 | int cnt1 = 0, cnt2 = 0, cnt3 = 0; |
| 1982 | 1982 | login_check_credentials(); |
| 1983 | 1983 | if( !g.perm.Admin ){ login_needed(0); return; } |
| 1984 | + style_set_current_feature("test"); | |
| 1984 | 1985 | if( !search_index_exists() ){ |
| 1985 | 1986 | @ <p>Indexed search is disabled |
| 1986 | 1987 | style_finish_page("report"); |
| 1987 | 1988 | return; |
| 1988 | 1989 | } |
| 1989 | 1990 |
| --- 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 @@ | ||
| 73 | 73 | if( !g.perm.Admin ){ |
| 74 | 74 | login_needed(0); |
| 75 | 75 | } |
| 76 | 76 | setup_user = g.perm.Setup; |
| 77 | 77 | |
| 78 | + style_set_current_feature("setup"); | |
| 78 | 79 | style_header("Server Administration"); |
| 79 | 80 | |
| 80 | 81 | /* Make sure the header contains <base href="...">. Issue a warning |
| 81 | 82 | ** if it does not. */ |
| 82 | 83 | if( !cgi_header_contains("<base href=") ){ |
| @@ -339,10 +340,11 @@ | ||
| 339 | 340 | if( !g.perm.Setup ){ |
| 340 | 341 | login_needed(0); |
| 341 | 342 | return; |
| 342 | 343 | } |
| 343 | 344 | |
| 345 | + style_set_current_feature("setup"); | |
| 344 | 346 | style_header("Access Control Settings"); |
| 345 | 347 | db_begin_transaction(); |
| 346 | 348 | @ <form action="%R/setup_access" method="post"><div> |
| 347 | 349 | login_insert_csrf_secret(); |
| 348 | 350 | @ <input type="submit" name="submit" value="Apply Changes" /></p> |
| @@ -608,10 +610,11 @@ | ||
| 608 | 610 | if( P("join")!=0 ){ |
| 609 | 611 | login_group_join(zRepo, 1, zLogin, zPw, zNewName, &zErrMsg); |
| 610 | 612 | }else if( P("leave") ){ |
| 611 | 613 | login_group_leave(&zErrMsg); |
| 612 | 614 | } |
| 615 | + style_set_current_feature("setup"); | |
| 613 | 616 | style_header("Login Group Configuration"); |
| 614 | 617 | if( zErrMsg ){ |
| 615 | 618 | @ <p class="generalError">%s(zErrMsg)</p> |
| 616 | 619 | } |
| 617 | 620 | zGroup = login_group_name(); |
| @@ -729,10 +732,11 @@ | ||
| 729 | 732 | if( !g.perm.Admin ){ |
| 730 | 733 | login_needed(0); |
| 731 | 734 | return; |
| 732 | 735 | } |
| 733 | 736 | |
| 737 | + style_set_current_feature("setup"); | |
| 734 | 738 | style_header("Timeline Display Preferences"); |
| 735 | 739 | db_begin_transaction(); |
| 736 | 740 | @ <form action="%R/setup_timeline" method="post"><div> |
| 737 | 741 | login_insert_csrf_secret(); |
| 738 | 742 | @ <p><input type="submit" name="submit" value="Apply Changes" /></p> |
| @@ -864,10 +868,11 @@ | ||
| 864 | 868 | if( !g.perm.Setup ){ |
| 865 | 869 | login_needed(0); |
| 866 | 870 | return; |
| 867 | 871 | } |
| 868 | 872 | |
| 873 | + style_set_current_feature("setup"); | |
| 869 | 874 | style_header("Settings"); |
| 870 | 875 | if(!g.repositoryOpen){ |
| 871 | 876 | /* Provide read-only access to versioned settings, |
| 872 | 877 | but only if no repo file was explicitly provided. */ |
| 873 | 878 | db_open_local(0); |
| @@ -951,10 +956,11 @@ | ||
| 951 | 956 | if( !g.perm.Setup ){ |
| 952 | 957 | login_needed(0); |
| 953 | 958 | return; |
| 954 | 959 | } |
| 955 | 960 | |
| 961 | + style_set_current_feature("setup"); | |
| 956 | 962 | style_header("WWW Configuration"); |
| 957 | 963 | db_begin_transaction(); |
| 958 | 964 | @ <form action="%R/setup_config" method="post"><div> |
| 959 | 965 | login_insert_csrf_secret(); |
| 960 | 966 | @ <input type="submit" name="submit" value="Apply Changes" /></p> |
| @@ -1047,10 +1053,11 @@ | ||
| 1047 | 1053 | if( !g.perm.Setup ){ |
| 1048 | 1054 | login_needed(0); |
| 1049 | 1055 | return; |
| 1050 | 1056 | } |
| 1051 | 1057 | |
| 1058 | + style_set_current_feature("setup"); | |
| 1052 | 1059 | style_header("Wiki Configuration"); |
| 1053 | 1060 | db_begin_transaction(); |
| 1054 | 1061 | @ <form action="%R/setup_wiki" method="post"><div> |
| 1055 | 1062 | login_insert_csrf_secret(); |
| 1056 | 1063 | @ <input type="submit" name="submit" value="Apply Changes" /></p> |
| @@ -1123,10 +1130,11 @@ | ||
| 1123 | 1130 | if( !g.perm.Admin ){ |
| 1124 | 1131 | login_needed(0); |
| 1125 | 1132 | return; |
| 1126 | 1133 | } |
| 1127 | 1134 | |
| 1135 | + style_set_current_feature("setup"); | |
| 1128 | 1136 | style_header("Moderator For Wiki And Tickets"); |
| 1129 | 1137 | db_begin_transaction(); |
| 1130 | 1138 | @ <form action="%R/setup_modreq" method="post"><div> |
| 1131 | 1139 | login_insert_csrf_secret(); |
| 1132 | 1140 | @ <hr /> |
| @@ -1180,10 +1188,11 @@ | ||
| 1180 | 1188 | cgi_replace_parameter("adunit",""); |
| 1181 | 1189 | cgi_replace_parameter("adright",""); |
| 1182 | 1190 | setup_incr_cfgcnt(); |
| 1183 | 1191 | } |
| 1184 | 1192 | |
| 1193 | + style_set_current_feature("setup"); | |
| 1185 | 1194 | style_header("Edit Ad Unit"); |
| 1186 | 1195 | @ <form action="%R/setup_adunit" method="post"><div> |
| 1187 | 1196 | login_insert_csrf_secret(); |
| 1188 | 1197 | @ <b>Banner Ad-Unit:</b><br /> |
| 1189 | 1198 | textarea_attribute("", 6, 80, "adunit", "adunit", "", 0); |
| @@ -1361,10 +1370,11 @@ | ||
| 1361 | 1370 | ); |
| 1362 | 1371 | db_protect_pop(); |
| 1363 | 1372 | db_end_transaction(0); |
| 1364 | 1373 | cgi_redirect("setup_logo"); |
| 1365 | 1374 | } |
| 1375 | + style_set_current_feature("setup"); | |
| 1366 | 1376 | style_header("Edit Project Logo And Background"); |
| 1367 | 1377 | @ <p>The current project logo has a MIME-Type of <b>%h(zLogoMime)</b> |
| 1368 | 1378 | @ and looks like this:</p> |
| 1369 | 1379 | @ <blockquote><p><img src="%R/logo/%z(zLogoMtime)" \ |
| 1370 | 1380 | @ alt="logo" border="1" /> |
| @@ -1481,10 +1491,11 @@ | ||
| 1481 | 1491 | login_needed(0); |
| 1482 | 1492 | return; |
| 1483 | 1493 | } |
| 1484 | 1494 | add_content_sql_commands(g.db); |
| 1485 | 1495 | zQ = cgi_csrf_safe(1) ? P("q") : 0; |
| 1496 | + style_set_current_feature("setup"); | |
| 1486 | 1497 | style_header("Raw SQL Commands"); |
| 1487 | 1498 | @ <p><b>Caution:</b> There are no restrictions on the SQL that can be |
| 1488 | 1499 | @ run by this page. You can do serious and irrepairable damage to the |
| 1489 | 1500 | @ repository. Proceed with extreme caution.</p> |
| 1490 | 1501 | @ |
| @@ -1618,10 +1629,11 @@ | ||
| 1618 | 1629 | login_check_credentials(); |
| 1619 | 1630 | if( !g.perm.Setup ){ |
| 1620 | 1631 | login_needed(0); |
| 1621 | 1632 | return; |
| 1622 | 1633 | } |
| 1634 | + style_set_current_feature("setup"); | |
| 1623 | 1635 | style_header("Raw TH1 Commands"); |
| 1624 | 1636 | @ <p><b>Caution:</b> There are no restrictions on the TH1 that can be |
| 1625 | 1637 | @ run by this page. If Tcl integration was enabled at compile-time and |
| 1626 | 1638 | @ the "tcl" setting is enabled, Tcl commands may be run as well.</p> |
| 1627 | 1639 | @ |
| @@ -1664,10 +1676,11 @@ | ||
| 1664 | 1676 | login_check_credentials(); |
| 1665 | 1677 | if( !g.perm.Admin ){ |
| 1666 | 1678 | login_needed(0); |
| 1667 | 1679 | return; |
| 1668 | 1680 | } |
| 1681 | + style_set_current_feature("setup"); | |
| 1669 | 1682 | style_header("Admin Log"); |
| 1670 | 1683 | create_admin_log_table(); |
| 1671 | 1684 | limit = atoi(PD("n","200")); |
| 1672 | 1685 | ofst = atoi(PD("x","0")); |
| 1673 | 1686 | fLogEnabled = db_get_boolean("admin-log", 0); |
| @@ -1724,10 +1737,11 @@ | ||
| 1724 | 1737 | login_check_credentials(); |
| 1725 | 1738 | if( !g.perm.Admin ){ |
| 1726 | 1739 | login_needed(0); |
| 1727 | 1740 | return; |
| 1728 | 1741 | } |
| 1742 | + style_set_current_feature("setup"); | |
| 1729 | 1743 | style_header("Search Configuration"); |
| 1730 | 1744 | @ <form action="%R/srchsetup" method="post"><div> |
| 1731 | 1745 | login_insert_csrf_secret(); |
| 1732 | 1746 | @ <div style="text-align:center;font-weight:bold;"> |
| 1733 | 1747 | @ Server-specific settings that affect the |
| @@ -1849,10 +1863,11 @@ | ||
| 1849 | 1863 | login_check_credentials(); |
| 1850 | 1864 | if( !g.perm.Admin ){ |
| 1851 | 1865 | login_needed(0); |
| 1852 | 1866 | return; |
| 1853 | 1867 | } |
| 1868 | + style_set_current_feature("setup"); | |
| 1854 | 1869 | style_header("URL Alias Configuration"); |
| 1855 | 1870 | if( P("submit")!=0 ){ |
| 1856 | 1871 | Blob token; |
| 1857 | 1872 | Blob sql; |
| 1858 | 1873 | const char *zNewName; |
| 1859 | 1874 |
| --- 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 |
+5
| --- src/setupuser.c | ||
| +++ src/setupuser.c | ||
| @@ -52,10 +52,11 @@ | ||
| 52 | 52 | style_submenu_element("Log", "access_log"); |
| 53 | 53 | style_submenu_element("Help", "setup_ulist_notes"); |
| 54 | 54 | if( alert_tables_exist() ){ |
| 55 | 55 | style_submenu_element("Subscribers", "subscribers"); |
| 56 | 56 | } |
| 57 | + style_set_current_feature("setup"); | |
| 57 | 58 | style_header("User List"); |
| 58 | 59 | if( (zWith==0 || zWith[0]==0) && !bUnusedOnly ){ |
| 59 | 60 | @ <table border=1 cellpadding=2 cellspacing=0 class='userTable'> |
| 60 | 61 | @ <thead><tr> |
| 61 | 62 | @ <th>Category |
| @@ -213,10 +214,11 @@ | ||
| 213 | 214 | ** A documentation page showing notes about user configuration. This |
| 214 | 215 | ** information used to be a side-bar on the user list page, but has been |
| 215 | 216 | ** factored out for improved presentation. |
| 216 | 217 | */ |
| 217 | 218 | void setup_ulist_notes(void){ |
| 219 | + style_set_current_feature("setup"); | |
| 218 | 220 | style_header("User Configuration Notes"); |
| 219 | 221 | @ <h1>User Configuration Notes:</h1> |
| 220 | 222 | @ <ol> |
| 221 | 223 | @ <li><p> |
| 222 | 224 | @ Every user, logged in or not, inherits the privileges of |
| @@ -258,10 +260,11 @@ | ||
| 258 | 260 | ** |
| 259 | 261 | ** A documentation page showing the meaning of the various user capabilities |
| 260 | 262 | ** code letters. |
| 261 | 263 | */ |
| 262 | 264 | void setup_ucap_list(void){ |
| 265 | + style_set_current_feature("setup"); | |
| 263 | 266 | style_header("User Capability Codes"); |
| 264 | 267 | @ <h1>All capabilities</h1> |
| 265 | 268 | capabilities_table(CAPCLASS_ALL); |
| 266 | 269 | @ <h1>Capabilities associated with checked-in content</h1> |
| 267 | 270 | capabilities_table(CAPCLASS_CODE); |
| @@ -363,10 +366,12 @@ | ||
| 363 | 366 | "User \"%s\" has %d or more artifacts in the block-chain. " |
| 364 | 367 | "Delete anyhow?", |
| 365 | 368 | P("login")/*safe-for-%s*/, n); |
| 366 | 369 | } |
| 367 | 370 | } |
| 371 | + | |
| 372 | + style_set_current_feature("setup"); | |
| 368 | 373 | |
| 369 | 374 | /* If we have all the necessary information, write the new or |
| 370 | 375 | ** modified user record. After writing the user record, redirect |
| 371 | 376 | ** to the page that displays a list of users. |
| 372 | 377 | */ |
| 373 | 378 |
| --- 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 |
+2
| --- src/sitemap.c | ||
| +++ src/sitemap.c | ||
| @@ -236,10 +236,11 @@ | ||
| 236 | 236 | */ |
| 237 | 237 | void sitemap_test_page(void){ |
| 238 | 238 | int isPopup = 0; /* This is an XMLHttpRequest() for /sitemap */ |
| 239 | 239 | |
| 240 | 240 | login_check_credentials(); |
| 241 | + style_set_current_feature("sitemap"); | |
| 241 | 242 | if( P("popup")!=0 && cgi_csrf_safe(0) ){ |
| 242 | 243 | /* If this is a POST from the same origin with the popup=1 parameter, |
| 243 | 244 | ** then disable anti-robot defenses */ |
| 244 | 245 | isPopup = 1; |
| 245 | 246 | g.perm.Hyperlink = 1; |
| @@ -287,10 +288,11 @@ | ||
| 287 | 288 | */ |
| 288 | 289 | void sitemap_timeline_page(void){ |
| 289 | 290 | int isPopup = 0; /* This is an XMLHttpRequest() for /sitemap */ |
| 290 | 291 | |
| 291 | 292 | login_check_credentials(); |
| 293 | + style_set_current_feature("sitemap"); | |
| 292 | 294 | if( P("popup")!=0 && cgi_csrf_safe(0) ){ |
| 293 | 295 | /* If this is a POST from the same origin with the popup=1 parameter, |
| 294 | 296 | ** then disable anti-robot defenses */ |
| 295 | 297 | isPopup = 1; |
| 296 | 298 | g.perm.Hyperlink = 1; |
| 297 | 299 |
| --- 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 |
+6
| --- src/skins.c | ||
| +++ src/skins.c | ||
| @@ -387,10 +387,11 @@ | ||
| 387 | 387 | zOldName = P("sn"); |
| 388 | 388 | zNewName = P("newname"); |
| 389 | 389 | if( zOldName==0 ) return 0; |
| 390 | 390 | if( zNewName==0 || zNewName[0]==0 || (ex = skinExists(zNewName))!=0 ){ |
| 391 | 391 | if( zNewName==0 ) zNewName = zOldName; |
| 392 | + style_set_current_feature("skins"); | |
| 392 | 393 | style_header("Rename A Skin"); |
| 393 | 394 | if( ex ){ |
| 394 | 395 | @ <p><span class="generalError">There is already another skin |
| 395 | 396 | @ named "%h(zNewName)". Choose a different name.</span></p> |
| 396 | 397 | } |
| @@ -429,10 +430,11 @@ | ||
| 429 | 430 | zNewName = P("svname"); |
| 430 | 431 | if( zNewName && zNewName[0]!=0 ){ |
| 431 | 432 | } |
| 432 | 433 | if( zNewName==0 || zNewName[0]==0 || (ex = skinExists(zNewName))!=0 ){ |
| 433 | 434 | if( zNewName==0 ) zNewName = ""; |
| 435 | + style_set_current_feature("skins"); | |
| 434 | 436 | style_header("Save Current Skin"); |
| 435 | 437 | if( ex ){ |
| 436 | 438 | @ <p><span class="generalError">There is already another skin |
| 437 | 439 | @ named "%h(zNewName)". Choose a different name.</span></p> |
| 438 | 440 | } |
| @@ -482,10 +484,12 @@ | ||
| 482 | 484 | db_begin_transaction(); |
| 483 | 485 | zCurrent = getSkin(0); |
| 484 | 486 | for(i=0; i<count(aBuiltinSkin); i++){ |
| 485 | 487 | aBuiltinSkin[i].zSQL = getSkin(aBuiltinSkin[i].zLabel); |
| 486 | 488 | } |
| 489 | + | |
| 490 | + style_set_current_feature("skins"); | |
| 487 | 491 | |
| 488 | 492 | if( cgi_csrf_safe(1) ){ |
| 489 | 493 | /* Process requests to delete a user-defined skin */ |
| 490 | 494 | if( P("del1") && (zName = skinVarName(P("sn"), 1))!=0 ){ |
| 491 | 495 | style_header("Confirm Custom Skin Delete"); |
| @@ -796,10 +800,11 @@ | ||
| 796 | 800 | zContent = zDflt; |
| 797 | 801 | isRevert = 1; |
| 798 | 802 | } |
| 799 | 803 | |
| 800 | 804 | db_begin_transaction(); |
| 805 | + style_set_current_feature("skins"); | |
| 801 | 806 | style_header("%s", zTitle); |
| 802 | 807 | for(j=0; j<count(aSkinAttr); j++){ |
| 803 | 808 | style_submenu_element(aSkinAttr[j].zSubmenu, |
| 804 | 809 | "%R/setup_skinedit?w=%d&basis=%h&sk=%d",j,zBasis,iSkin); |
| 805 | 810 | } |
| @@ -962,10 +967,11 @@ | ||
| 962 | 967 | /* Publish the draft skin */ |
| 963 | 968 | if( P("pub7")!=0 && PB("pub7ck1") && PB("pub7ck2") ){ |
| 964 | 969 | skin_publish(iSkin); |
| 965 | 970 | } |
| 966 | 971 | |
| 972 | + style_set_current_feature("skins"); | |
| 967 | 973 | style_header("Customize Skin"); |
| 968 | 974 | |
| 969 | 975 | @ <p>Customize the look of this Fossil repository by making changes |
| 970 | 976 | @ to the CSS, Header, Footer, and Detail Settings in one of nine "draft" |
| 971 | 977 | @ configurations. Then, after verifying that all is working correctly, |
| 972 | 978 |
| --- 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 @@ | ||
| 769 | 769 | if( !g.perm.Setup ){ |
| 770 | 770 | login_needed(0); |
| 771 | 771 | return; |
| 772 | 772 | } |
| 773 | 773 | db_begin_transaction(); |
| 774 | + style_set_current_feature("smtp"); | |
| 774 | 775 | style_header("Email Server Setup"); |
| 775 | 776 | if( db_table_exists("repository","emailroute") ){ |
| 776 | 777 | style_submenu_element("emailblob table", "%R/emailblob"); |
| 777 | 778 | style_submenu_element("emailoutq table", "%R/emailoutq"); |
| 778 | 779 | db_prepare(&q, "SELECT eaddr, epolicy FROM emailroute ORDER BY 1"); |
| @@ -833,10 +834,11 @@ | ||
| 833 | 834 | login_check_credentials(); |
| 834 | 835 | if( !g.perm.Setup ){ |
| 835 | 836 | login_needed(0); |
| 836 | 837 | return; |
| 837 | 838 | } |
| 839 | + style_set_current_feature("smtp"); | |
| 838 | 840 | style_header("Email Route Editor"); |
| 839 | 841 | |
| 840 | 842 | if( P("edit") && cgi_csrf_safe(1) && zEAddr!=0 && zEPolicy!=0 ){ |
| 841 | 843 | smtp_server_schema(0); |
| 842 | 844 | if( (zOAddr==0 || fossil_strcmp(zEAddr,zOAddr)!=0) ){ |
| 843 | 845 |
| --- 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 @@ | ||
| 459 | 459 | sqlite3_int64 iNow; |
| 460 | 460 | char *zRemote; |
| 461 | 461 | login_check_credentials(); |
| 462 | 462 | if( !g.perm.Admin ){ login_needed(0); return; } |
| 463 | 463 | |
| 464 | + style_set_current_feature("stat"); | |
| 464 | 465 | style_header("URLs and Checkouts"); |
| 465 | 466 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 466 | 467 | style_submenu_element("Stat", "stat"); |
| 467 | 468 | style_submenu_element("Schema", "repo_schema"); |
| 468 | 469 | iNow = db_int64(0, "SELECT strftime('%%s','now')"); |
| @@ -531,10 +532,11 @@ | ||
| 531 | 532 | Blob sql; |
| 532 | 533 | const char *zArg = P("n"); |
| 533 | 534 | login_check_credentials(); |
| 534 | 535 | if( !g.perm.Admin ){ login_needed(0); return; } |
| 535 | 536 | |
| 537 | + style_set_current_feature("stat"); | |
| 536 | 538 | style_header("Repository Schema"); |
| 537 | 539 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 538 | 540 | style_submenu_element("Stat", "stat"); |
| 539 | 541 | style_submenu_element("URLs", "urllist"); |
| 540 | 542 | if( sqlite3_compileoption_used("ENABLE_DBSTAT_VTAB") ){ |
| @@ -586,10 +588,11 @@ | ||
| 586 | 588 | */ |
| 587 | 589 | void repo_stat1_page(void){ |
| 588 | 590 | login_check_credentials(); |
| 589 | 591 | if( !g.perm.Admin ){ login_needed(0); return; } |
| 590 | 592 | |
| 593 | + style_set_current_feature("stat"); | |
| 591 | 594 | style_header("Repository STAT1 Table"); |
| 592 | 595 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 593 | 596 | style_submenu_element("Stat", "stat"); |
| 594 | 597 | style_submenu_element("Schema", "repo_schema"); |
| 595 | 598 | if( db_table_exists("repository","sqlite_stat1") ){ |
| @@ -621,10 +624,11 @@ | ||
| 621 | 624 | sqlite3_int64 fsize; |
| 622 | 625 | char zBuf[100]; |
| 623 | 626 | |
| 624 | 627 | login_check_credentials(); |
| 625 | 628 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 629 | + style_set_current_feature("stat"); | |
| 626 | 630 | style_header("Repository Table Sizes"); |
| 627 | 631 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 628 | 632 | style_submenu_element("Stat", "stat"); |
| 629 | 633 | if( g.perm.Admin ){ |
| 630 | 634 | style_submenu_element("Schema", "repo_schema"); |
| @@ -798,10 +802,11 @@ | ||
| 798 | 802 | login_needed(g.anon.Write); |
| 799 | 803 | return; |
| 800 | 804 | } |
| 801 | 805 | load_control(); |
| 802 | 806 | |
| 807 | + style_set_current_feature("stat"); | |
| 803 | 808 | style_header("Artifact Statistics"); |
| 804 | 809 | style_submenu_element("Repository Stats", "stat"); |
| 805 | 810 | style_submenu_element("Artifact List", "bloblist"); |
| 806 | 811 | gather_artifact_stats(1); |
| 807 | 812 | |
| 808 | 813 |
| --- 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 |
+2
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -189,10 +189,11 @@ | ||
| 189 | 189 | const char *zBr; |
| 190 | 190 | char zNm[10]; |
| 191 | 191 | int i, cnt; |
| 192 | 192 | login_check_credentials(); |
| 193 | 193 | |
| 194 | + style_set_current_feature("test"); | |
| 194 | 195 | style_header("Hash Color Test"); |
| 195 | 196 | for(i=cnt=0; i<10; i++){ |
| 196 | 197 | sqlite3_snprintf(sizeof(zNm),zNm,"b%d",i); |
| 197 | 198 | zBr = P(zNm); |
| 198 | 199 | if( zBr && zBr[0] ){ |
| @@ -3188,10 +3189,11 @@ | ||
| 3188 | 3189 | login_check_credentials(); |
| 3189 | 3190 | if( (!g.perm.Read && !g.perm.RdTkt && !g.perm.RdWiki && !g.perm.RdForum) ){ |
| 3190 | 3191 | login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki); |
| 3191 | 3192 | return; |
| 3192 | 3193 | } |
| 3194 | + style_set_current_feature("timeline"); | |
| 3193 | 3195 | style_header("Today In History"); |
| 3194 | 3196 | zToday = (char*)P("today"); |
| 3195 | 3197 | if( zToday ){ |
| 3196 | 3198 | zToday = timeline_expand_datetime(zToday); |
| 3197 | 3199 | if( !fossil_isdate(zToday) ) zToday = 0; |
| 3198 | 3200 |
| --- 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 @@ | ||
| 585 | 585 | if( P("plaintext") ){ |
| 586 | 586 | style_submenu_element("Formatted", "%R/tktview/%s", zUuid); |
| 587 | 587 | }else{ |
| 588 | 588 | style_submenu_element("Plaintext", "%R/tktview/%s?plaintext", zUuid); |
| 589 | 589 | } |
| 590 | + style_set_current_feature("tkt"); | |
| 590 | 591 | style_header("View Ticket"); |
| 591 | 592 | if( showTimeline ){ |
| 592 | 593 | int tagid = db_int(0,"SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'", |
| 593 | 594 | zUuid); |
| 594 | 595 | if( tagid ){ |
| @@ -815,10 +816,11 @@ | ||
| 815 | 816 | login_check_credentials(); |
| 816 | 817 | if( !g.perm.NewTkt ){ login_needed(g.anon.NewTkt); return; } |
| 817 | 818 | if( P("cancel") ){ |
| 818 | 819 | cgi_redirect("home"); |
| 819 | 820 | } |
| 821 | + style_set_current_feature("tkt"); | |
| 820 | 822 | style_header("New Ticket"); |
| 821 | 823 | ticket_standard_submenu(T_ALL_BUT(T_NEW)); |
| 822 | 824 | if( g.thTrace ) Th_Trace("BEGIN_TKTNEW<br />\n", -1); |
| 823 | 825 | ticket_init(); |
| 824 | 826 | initializeVariablesFromCGI(); |
| @@ -870,10 +872,11 @@ | ||
| 870 | 872 | } |
| 871 | 873 | zName = P("name"); |
| 872 | 874 | if( P("cancel") ){ |
| 873 | 875 | cgi_redirectf("tktview?name=%T", zName); |
| 874 | 876 | } |
| 877 | + style_set_current_feature("tkt"); | |
| 875 | 878 | style_header("Edit Ticket"); |
| 876 | 879 | if( zName==0 || (nName = strlen(zName))<4 || nName>HNAME_LEN_SHA1 |
| 877 | 880 | || !validate16(zName,nName) ){ |
| 878 | 881 | @ <span class="tktError">Not a valid ticket id: "%h(zName)"</span> |
| 879 | 882 | style_finish_page("tkt"); |
| @@ -1035,10 +1038,11 @@ | ||
| 1035 | 1038 | if( zType[0]=='c' ){ |
| 1036 | 1039 | zTitle = mprintf("Check-ins Associated With Ticket %h", zUuid); |
| 1037 | 1040 | }else{ |
| 1038 | 1041 | zTitle = mprintf("Timeline Of Ticket %h", zUuid); |
| 1039 | 1042 | } |
| 1043 | + style_set_current_feature("tkt"); | |
| 1040 | 1044 | style_header("%z", zTitle); |
| 1041 | 1045 | |
| 1042 | 1046 | sqlite3_snprintf(6, zGlobPattern, "%s", zUuid); |
| 1043 | 1047 | canonical16(zGlobPattern, strlen(zGlobPattern)); |
| 1044 | 1048 | tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid); |
| @@ -1084,10 +1088,11 @@ | ||
| 1084 | 1088 | if( P("raw")!=0 ){ |
| 1085 | 1089 | style_submenu_element("Decoded", "%R/tkthistory/%s", zUuid); |
| 1086 | 1090 | }else if( g.perm.Admin ){ |
| 1087 | 1091 | style_submenu_element("Raw", "%R/tkthistory/%s?raw", zUuid); |
| 1088 | 1092 | } |
| 1093 | + style_set_current_feature("tkt"); | |
| 1089 | 1094 | style_header("%z", zTitle); |
| 1090 | 1095 | |
| 1091 | 1096 | tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid); |
| 1092 | 1097 | if( tagid==0 ){ |
| 1093 | 1098 | @ No such ticket: %h(zUuid) |
| @@ -1611,10 +1616,11 @@ | ||
| 1611 | 1616 | ** |
| 1612 | 1617 | ** Full-text search of all current tickets |
| 1613 | 1618 | */ |
| 1614 | 1619 | void tkt_srchpage(void){ |
| 1615 | 1620 | login_check_credentials(); |
| 1621 | + style_set_current_feature("tkt"); | |
| 1616 | 1622 | style_header("Ticket Search"); |
| 1617 | 1623 | ticket_standard_submenu(T_ALL_BUT(T_SRCH)); |
| 1618 | 1624 | search_screen(SRCH_TKT, 0); |
| 1619 | 1625 | style_finish_page("tkt"); |
| 1620 | 1626 | } |
| 1621 | 1627 |
| --- 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 |
+3
| --- src/tktsetup.c | ||
| +++ src/tktsetup.c | ||
| @@ -123,18 +123,20 @@ | ||
| 123 | 123 | login_check_credentials(); |
| 124 | 124 | if( !g.perm.Setup ){ |
| 125 | 125 | login_needed(0); |
| 126 | 126 | return; |
| 127 | 127 | } |
| 128 | + style_set_current_feature("tktsetup"); | |
| 128 | 129 | if( PB("setup") ){ |
| 129 | 130 | cgi_redirect("tktsetup"); |
| 130 | 131 | } |
| 131 | 132 | isSubmit = P("submit")!=0; |
| 132 | 133 | z = P("x"); |
| 133 | 134 | if( z==0 ){ |
| 134 | 135 | z = db_get(zDbField, zDfltValue); |
| 135 | 136 | } |
| 137 | + style_set_current_feature("tktsetup"); | |
| 136 | 138 | style_header("Edit %s", zTitle); |
| 137 | 139 | if( P("clear")!=0 ){ |
| 138 | 140 | login_verify_csrf_secret(); |
| 139 | 141 | db_unset(zDbField, 0); |
| 140 | 142 | if( xRebuild ) xRebuild(); |
| @@ -901,10 +903,11 @@ | ||
| 901 | 903 | } |
| 902 | 904 | |
| 903 | 905 | if( P("setup") ){ |
| 904 | 906 | cgi_redirect("tktsetup"); |
| 905 | 907 | } |
| 908 | + style_set_current_feature("tktsetup"); | |
| 906 | 909 | style_header("Ticket Display On Timelines"); |
| 907 | 910 | db_begin_transaction(); |
| 908 | 911 | @ <form action="%R/tktsetup_timeline" method="post"><div> |
| 909 | 912 | login_insert_csrf_secret(); |
| 910 | 913 | |
| 911 | 914 |
| --- 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 |
+4
| --- src/webmail.c | ||
| +++ src/webmail.c | ||
| @@ -407,10 +407,11 @@ | ||
| 407 | 407 | emailid |
| 408 | 408 | ); |
| 409 | 409 | if( zUser ) blob_append_sql(&sql, " AND euser=%Q", zUser); |
| 410 | 410 | db_prepare_blob(&q, &sql); |
| 411 | 411 | blob_reset(&sql); |
| 412 | + style_set_current_feature("webmail"); | |
| 412 | 413 | style_header("Message %d",emailid); |
| 413 | 414 | if( db_step(&q)==SQLITE_ROW ){ |
| 414 | 415 | Blob msg = db_column_text_as_blob(&q, 0); |
| 415 | 416 | int eFormat = atoi(PD("f","0")); |
| 416 | 417 | eState = db_column_int(&q, 1); |
| @@ -610,10 +611,11 @@ | ||
| 610 | 611 | login_check_credentials(); |
| 611 | 612 | if( !login_is_individual() ){ |
| 612 | 613 | login_needed(0); |
| 613 | 614 | return; |
| 614 | 615 | } |
| 616 | + style_set_current_feature("webmail"); | |
| 615 | 617 | if( !db_table_exists("repository","emailbox") ){ |
| 616 | 618 | style_header("Webmail Not Available"); |
| 617 | 619 | @ <p>This repository is not configured to provide webmail</p> |
| 618 | 620 | style_finish_page("webmail"); |
| 619 | 621 | return; |
| @@ -780,10 +782,11 @@ | ||
| 780 | 782 | if( !g.perm.Setup ){ |
| 781 | 783 | login_needed(0); |
| 782 | 784 | return; |
| 783 | 785 | } |
| 784 | 786 | add_content_sql_commands(g.db); |
| 787 | + style_set_current_feature("webmail"); | |
| 785 | 788 | style_header("emailblob table"); |
| 786 | 789 | if( id>0 ){ |
| 787 | 790 | style_submenu_element("Index", "%R/emailblob"); |
| 788 | 791 | @ <ul> |
| 789 | 792 | db_prepare(&q, "SELECT emailid FROM emailblob WHERE ets=%d", id); |
| @@ -872,10 +875,11 @@ | ||
| 872 | 875 | if( !g.perm.Setup ){ |
| 873 | 876 | login_needed(0); |
| 874 | 877 | return; |
| 875 | 878 | } |
| 876 | 879 | add_content_sql_commands(g.db); |
| 880 | + style_set_current_feature("webmail"); | |
| 877 | 881 | style_header("emailoutq table"); |
| 878 | 882 | style_submenu_element("emailblob table","%R/emailblob"); |
| 879 | 883 | db_prepare(&q, |
| 880 | 884 | "SELECT edomain, efrom, eto, emsgid, " |
| 881 | 885 | " datetime(ectime,'unixepoch')," |
| 882 | 886 |
| --- 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 @@ | ||
| 62 | 62 | ** Check a wiki name. If it is not well-formed, then issue an error |
| 63 | 63 | ** and return true. If it is well-formed, return false. |
| 64 | 64 | */ |
| 65 | 65 | static int check_name(const char *z){ |
| 66 | 66 | if( !wiki_name_is_wellformed((const unsigned char *)z) ){ |
| 67 | + style_set_current_feature("wiki"); | |
| 67 | 68 | style_header("Wiki Page Name Error"); |
| 68 | 69 | @ The wiki name "<span class="wikiError">%h(z)</span>" is not well-formed. |
| 69 | 70 | @ Rules for wiki page names: |
| 70 | 71 | well_formed_wiki_name_rules(); |
| 71 | 72 | style_finish_page("wiki"); |
| @@ -134,10 +135,11 @@ | ||
| 134 | 135 | cgi_set_parameter_nocopy("name", g.zExtra, 1); |
| 135 | 136 | g.isHome = 1; |
| 136 | 137 | wiki_page(); |
| 137 | 138 | return; |
| 138 | 139 | } |
| 140 | + style_set_current_feature("wiki"); | |
| 139 | 141 | style_header("Home"); |
| 140 | 142 | @ <p>This is a stub home-page for the project. |
| 141 | 143 | @ To fill in this page, first go to |
| 142 | 144 | @ %z(href("%R/setup_config"))setup/config</a> |
| 143 | 145 | @ and establish a "Project Name". Then create a |
| @@ -229,10 +231,11 @@ | ||
| 229 | 231 | ** Show a summary of the Markdown wiki formatting rules. |
| 230 | 232 | */ |
| 231 | 233 | void markdown_rules_page(void){ |
| 232 | 234 | Blob x; |
| 233 | 235 | int fTxt = P("txt")!=0; |
| 236 | + style_set_current_feature("wiki"); | |
| 234 | 237 | style_header("Markdown Formatting Rules"); |
| 235 | 238 | if( fTxt ){ |
| 236 | 239 | style_submenu_element("Formatted", "%R/md_rules"); |
| 237 | 240 | }else{ |
| 238 | 241 | style_submenu_element("Plain-Text", "%R/md_rules?txt=1"); |
| @@ -253,10 +256,11 @@ | ||
| 253 | 256 | ** Show a summary of the wiki formatting rules. |
| 254 | 257 | */ |
| 255 | 258 | void wiki_rules_page(void){ |
| 256 | 259 | Blob x; |
| 257 | 260 | int fTxt = P("txt")!=0; |
| 261 | + style_set_current_feature("wiki"); | |
| 258 | 262 | style_header("Wiki Formatting Rules"); |
| 259 | 263 | if( fTxt ){ |
| 260 | 264 | style_submenu_element("Formatted", "%R/wiki_rules"); |
| 261 | 265 | }else{ |
| 262 | 266 | style_submenu_element("Plain-Text", "%R/wiki_rules?txt=1"); |
| @@ -275,10 +279,11 @@ | ||
| 275 | 279 | ** WEBPAGE: markup_help |
| 276 | 280 | ** |
| 277 | 281 | ** Show links to the md_rules and wiki_rules pages. |
| 278 | 282 | */ |
| 279 | 283 | void markup_help_page(void){ |
| 284 | + style_set_current_feature("wiki"); | |
| 280 | 285 | style_header("Fossil Markup Styles"); |
| 281 | 286 | @ <ul> |
| 282 | 287 | @ <li><p>%z(href("%R/wiki_rules"))Fossil Wiki Formatting Rules</a></p></li> |
| 283 | 288 | @ <li><p>%z(href("%R/md_rules"))Markdown Formatting Rules</a></p></li> |
| 284 | 289 | @ </ul> |
| @@ -344,10 +349,11 @@ | ||
| 344 | 349 | ** A generic landing page for wiki. |
| 345 | 350 | */ |
| 346 | 351 | void wiki_helppage(void){ |
| 347 | 352 | login_check_credentials(); |
| 348 | 353 | if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } |
| 354 | + style_set_current_feature("wiki"); | |
| 349 | 355 | style_header("Wiki Help"); |
| 350 | 356 | wiki_standard_submenu(W_ALL_BUT(W_HELP)); |
| 351 | 357 | @ <h2>Wiki Links</h2> |
| 352 | 358 | @ <ul> |
| 353 | 359 | @ <li> %z(href("%R/timeline?y=w"))Recent changes</a> to wiki pages.</li> |
| @@ -381,10 +387,11 @@ | ||
| 381 | 387 | ** |
| 382 | 388 | ** Full-text search of all current wiki text |
| 383 | 389 | */ |
| 384 | 390 | void wiki_srchpage(void){ |
| 385 | 391 | login_check_credentials(); |
| 392 | + style_set_current_feature("wiki"); | |
| 386 | 393 | style_header("Wiki Search"); |
| 387 | 394 | wiki_standard_submenu(W_HELP|W_LIST|W_SANDBOX); |
| 388 | 395 | search_screen(SRCH_WIKI, 0); |
| 389 | 396 | style_finish_page("wiki"); |
| 390 | 397 | } |
| @@ -446,10 +453,11 @@ | ||
| 446 | 453 | static int wiki_page_header( |
| 447 | 454 | int eType, /* Page type. Might be WIKITYPE_UNKNOWN */ |
| 448 | 455 | const char *zPageName, /* Name of the page */ |
| 449 | 456 | const char *zExtra /* Extra prefix text on the page header */ |
| 450 | 457 | ){ |
| 458 | + style_set_current_feature("wiki"); | |
| 451 | 459 | if( eType==WIKITYPE_UNKNOWN ) eType = wiki_page_type(zPageName); |
| 452 | 460 | switch( eType ){ |
| 453 | 461 | case WIKITYPE_NORMAL: { |
| 454 | 462 | style_header("%s%s", zExtra, zPageName); |
| 455 | 463 | break; |
| @@ -1138,10 +1146,11 @@ | ||
| 1138 | 1146 | if( !g.perm.RdWiki ){ |
| 1139 | 1147 | login_needed(g.anon.RdWiki); |
| 1140 | 1148 | return; |
| 1141 | 1149 | } |
| 1142 | 1150 | } |
| 1151 | + style_set_current_feature("wiki"); | |
| 1143 | 1152 | style_header("Wiki Editor"); |
| 1144 | 1153 | style_emit_noscript_for_js_page(); |
| 1145 | 1154 | |
| 1146 | 1155 | /* Status bar */ |
| 1147 | 1156 | CX("<div id='fossil-status-bar' " |
| @@ -1367,10 +1376,11 @@ | ||
| 1367 | 1376 | zName = PD("name",""); |
| 1368 | 1377 | zMimetype = wiki_filter_mimetypes(P("mimetype")); |
| 1369 | 1378 | if( zName[0] && wiki_name_is_wellformed((const unsigned char *)zName) ){ |
| 1370 | 1379 | cgi_redirectf("wikiedit?name=%T&mimetype=%s", zName, zMimetype); |
| 1371 | 1380 | } |
| 1381 | + style_set_current_feature("wiki"); | |
| 1372 | 1382 | style_header("Create A New Wiki Page"); |
| 1373 | 1383 | wiki_standard_submenu(W_ALL_BUT(W_NEW)); |
| 1374 | 1384 | @ <p>Rules for wiki page names:</p> |
| 1375 | 1385 | well_formed_wiki_name_rules(); |
| 1376 | 1386 | form_begin(0, "%R/wikinew"); |
| @@ -1513,10 +1523,11 @@ | ||
| 1513 | 1523 | if( P("cancel")!=0 ){ |
| 1514 | 1524 | cgi_redirectf("wiki?name=%T", zPageName); |
| 1515 | 1525 | return; |
| 1516 | 1526 | } |
| 1517 | 1527 | style_set_current_page("%T?name=%T", g.zPath, zPageName); |
| 1528 | + style_set_current_feature("wiki"); | |
| 1518 | 1529 | style_header("Append Comment To: %s", zPageName); |
| 1519 | 1530 | if( !goodCaptcha ){ |
| 1520 | 1531 | @ <p class="generalError">Error: Incorrect security code.</p> |
| 1521 | 1532 | } |
| 1522 | 1533 | if( P("preview")!=0 ){ |
| @@ -1564,10 +1575,11 @@ | ||
| 1564 | 1575 | Blob sql; |
| 1565 | 1576 | Stmt q; |
| 1566 | 1577 | login_check_credentials(); |
| 1567 | 1578 | if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } |
| 1568 | 1579 | zPageName = PD("name",""); |
| 1580 | + style_set_current_feature("wiki"); | |
| 1569 | 1581 | style_header("History Of %s", zPageName); |
| 1570 | 1582 | blob_init(&sql, 0, 0); |
| 1571 | 1583 | blob_append(&sql, timeline_query_for_www(), -1); |
| 1572 | 1584 | blob_append_sql(&sql, |
| 1573 | 1585 | "AND event.objid IN (" |
| @@ -1645,10 +1657,11 @@ | ||
| 1645 | 1657 | } |
| 1646 | 1658 | nextRid = wiki_next(wiki_tagid(pW1->zWikiTitle),pW1->rDate); |
| 1647 | 1659 | if( nextRid ){ |
| 1648 | 1660 | style_submenu_element("Next", "%R/wdiff?rid=%d", nextRid); |
| 1649 | 1661 | } |
| 1662 | + style_set_current_feature("wiki"); | |
| 1650 | 1663 | style_header("Changes To %s", pW1->zWikiTitle); |
| 1651 | 1664 | blob_zero(&d); |
| 1652 | 1665 | diffFlags = construct_diff_flags(1); |
| 1653 | 1666 | text_diff(&w2, &w1, &d, 0, diffFlags | DIFF_HTML | DIFF_LINENO); |
| 1654 | 1667 | @ <pre class="udiff"> |
| @@ -1701,10 +1714,11 @@ | ||
| 1701 | 1714 | int showAll = P("all")!=0; |
| 1702 | 1715 | int showRid = P("showid")!=0; |
| 1703 | 1716 | |
| 1704 | 1717 | login_check_credentials(); |
| 1705 | 1718 | if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } |
| 1719 | + style_set_current_feature("wiki"); | |
| 1706 | 1720 | style_header("Available Wiki Pages"); |
| 1707 | 1721 | if( showAll ){ |
| 1708 | 1722 | style_submenu_element("Active", "%R/wcontent"); |
| 1709 | 1723 | }else{ |
| 1710 | 1724 | style_submenu_element("All", "%R/wcontent?all=1"); |
| @@ -1771,10 +1785,11 @@ | ||
| 1771 | 1785 | Stmt q; |
| 1772 | 1786 | const char *zTitle; |
| 1773 | 1787 | login_check_credentials(); |
| 1774 | 1788 | if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } |
| 1775 | 1789 | zTitle = PD("title","*"); |
| 1790 | + style_set_current_feature("wiki"); | |
| 1776 | 1791 | style_header("Wiki Pages Found"); |
| 1777 | 1792 | @ <ul> |
| 1778 | 1793 | db_prepare(&q, |
| 1779 | 1794 | "SELECT substr(tagname, 6, 1000) FROM tag WHERE tagname like 'wiki-%%%q%%'" |
| 1780 | 1795 | " ORDER BY lower(tagname) /*sort*/" , |
| 1781 | 1796 |
| --- 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 |
+1
| --- src/xfersetup.c | ||
| +++ src/xfersetup.c | ||
| @@ -116,10 +116,11 @@ | ||
| 116 | 116 | isSubmit = P("submit")!=0; |
| 117 | 117 | z = P("x"); |
| 118 | 118 | if( z==0 ){ |
| 119 | 119 | z = db_get(zDbField, zDfltValue); |
| 120 | 120 | } |
| 121 | + style_set_current_feature("xfersetup"); | |
| 121 | 122 | style_header("Edit %s", zTitle); |
| 122 | 123 | if( P("clear")!=0 ){ |
| 123 | 124 | login_verify_csrf_secret(); |
| 124 | 125 | db_unset(zDbField, 0); |
| 125 | 126 | if( xRebuild ) xRebuild(); |
| 126 | 127 |
| --- 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 @@ | ||
| 944 | 944 | if( zInclude ) blob_appendf(&cacheKey, ",in=%Q", zInclude); |
| 945 | 945 | if( zExclude ) blob_appendf(&cacheKey, ",ex=%Q", zExclude); |
| 946 | 946 | zKey = blob_str(&cacheKey); |
| 947 | 947 | etag_check(ETAG_HASH, zKey); |
| 948 | 948 | |
| 949 | + style_set_current_feature("zip"); | |
| 949 | 950 | if( P("debug")!=0 ){ |
| 950 | 951 | style_header("%s Archive Generator Debug Screen", zType); |
| 951 | 952 | @ zName = "%h(zName)"<br /> |
| 952 | 953 | @ rid = %d(rid)<br /> |
| 953 | 954 | if( zInclude ){ |
| 954 | 955 |
| --- 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 |