Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch body-feature-class Excluding Merge-Ins
This is equivalent to a diff from e6e8ea8ffb to 358f7d80c2
|
2020-12-22
| ||
| 18:31 | Add support for the "$current_feature" TH1 variable as a possibly better way to do page-specific of feature-specific styling. ... (check-in: 112c713be1 user: drh tags: trunk) | |
| 12:30 | Whitespace style fix ... (Closed-Leaf check-in: 358f7d80c2 user: wyoung tags: body-feature-class) | |
| 12:13 | Removed the parameter from style_finish_page() since the resulting content div class is now redundant with respect to the body class. This potentially breaks CSS made against old class names that a prior commit on this branch changed, but such skins would be made against an unreleased version of Fossil, it's unlikely many are using that first version of the feature anyway, and most of the class names did *not* change unless you were targeting a "div" instead of "body" or just a generic class name. None of the shipping skins are affected. ... (check-in: 0e83ca88ce user: wyoung tags: body-feature-class) | |
| 11:55 | Created a new TH1 variable $current_feature set by default from the page URL's first component, but which may be overridden by code that knows a better feature name to use for that page. This is then used as the page's "body" class, making this the start of a replacement for the "content div" based feature class stuff done on branch [/timeline?r=default-css-cleanups | default-css-cleanups]. This is a better way to do it because it lets us target things outside the content div, such as the nav bar, the skin header, the skin footer, etc. ... (check-in: c671fc5d81 user: wyoung tags: body-feature-class) | |
| 10:31 | Comment fix to track a code change made in commit [3d6444fc]. ... (check-in: e6e8ea8ffb user: wyoung tags: trunk) | |
| 09:36 | Moved the "artifact" vs "artefact" point in the JSON API doc intro into a new section within the contribution doc. ... (check-in: e50d270775 user: wyoung tags: trunk) | |
Changes to skins/bootstrap/header.txt.
| ︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - + |
if(/^#/.test(x)) x = x.substr(1);
var e = document.getElementById(x);
if(!e) throw new Error("Expecting element with ID "+x);
else return e;
}
</script>
</head>
|
| ︙ |
Changes to src/alerts.c.
| ︙ | |||
169 170 171 172 173 174 175 176 177 | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | + - + |
** If the subscriber table does not exist, then paint an error message
** web page and return true.
**
** If the subscriber table does exist, return 0 without doing anything.
*/
static int alert_webpages_disabled(void){
if( alert_tables_exist() ) return 0;
style_set_current_feature("alerts");
style_header("Email Alerts Are Disabled");
@ <p>Email alerts are disabled on this server</p>
|
| ︙ | |||
214 215 216 217 218 219 220 221 222 223 224 225 226 227 | 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | + |
login_needed(0);
return;
}
db_begin_transaction();
alert_submenu_common();
style_submenu_element("Send Announcement","%R/announce");
style_set_current_feature("alerts");
style_header("Email Notification Setup");
@ <h1>Status</h1>
@ <table class="label-value">
if( alert_enabled() ){
stats_for_email();
}else{
@ <th>Disabled</th>
|
| ︙ | |||
306 307 308 309 310 311 312 | 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 | - + | @ The default TCP port number is 25. @ (Property: "email-send-relayhost")</p> @ <hr> @ <p><input type="submit" name="submit" value="Apply Changes" /></p> @ </div></form> db_end_transaction(0); |
| ︙ | |||
1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 | 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 | + |
return;
}
}
if( !g.perm.Admin && !db_get_boolean("anon-subscribe",1) ){
register_page();
return;
}
style_set_current_feature("alerts");
alert_submenu_common();
needCaptcha = !login_is_individual();
if( P("submit")
&& cgi_csrf_safe(1)
&& subscribe_error_check(&eErr,&zErr,needCaptcha)
){
/* A validated request for a new subscription has been received. */
|
| ︙ | |||
1433 1434 1435 1436 1437 1438 1439 | 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 | - + |
@ </pre></blockquote>
}else{
@ <p>An email has been sent to "%h(zEAddr)". That email contains a
@ hyperlink that you must click to activate your
@ subscription.</p>
}
alert_sender_free(pSender);
|
| ︙ | |||
1550 1551 1552 1553 1554 1555 1556 | 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 | - + + - + |
@ %h(zCaptcha)
@ </pre>
@ Enter the 8 characters above in the "Security Code" box<br/>
@ </td></tr></table></div>
}
@ </form>
fossil_free(zErr);
|
| ︙ | |||
1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 | 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 | + |
" unsubscribe");
}else{
alert_unsubscribe(sid);
db_commit_transaction();
return;
}
}
style_set_current_feature("alerts");
style_header("Update Subscription");
db_prepare(&q,
"SELECT"
" semail," /* 0 */
" sverified," /* 1 */
" sdonotcall," /* 2 */
" sdigest," /* 3 */
|
| ︙ | |||
1912 1913 1914 1915 1916 1917 1918 | 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 | - + | @ <td><input type="submit" name="submit" value="Submit"> @ <input type="submit" name="delete" value="Unsubscribe"> @ </tr> @ </table> @ </form> fossil_free(zErr); db_finalize(&q); |
| ︙ | |||
1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 | 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 | + + |
/* Logged in users are redirected to the /alerts page */
login_check_credentials();
if( login_is_individual() ){
cgi_redirectf("%R/alerts");
return;
}
style_set_current_feature("alerts");
zEAddr = PD("e","");
dx = atoi(PD("dx","0"));
bSubmit = P("submit")!=0 && P("e")!=0 && cgi_csrf_safe(1);
if( bSubmit ){
if( !captcha_is_correct(1) ){
eErr = 2;
zErr = mprintf("enter the security code shown below");
|
| ︙ | |||
2019 2020 2021 2022 2023 2024 2025 | 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 | - + |
@ %h(pSender->zErr)
@ </pre></blockquote>
}else{
@ <p>An email has been sent to "%h(zEAddr)" that explains how to
@ unsubscribe and/or modify your subscription settings</p>
}
alert_sender_free(pSender);
|
| ︙ | |||
2069 2070 2071 2072 2073 2074 2075 | 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 | - + | @ <div class="captcha"><table class="captcha"><tr><td><pre class="captcha"> @ %h(zCaptcha) @ </pre> @ Enter the 8 characters above in the "Security Code" box<br/> @ </td></tr></table></div> @ </form> fossil_free(zErr); |
| ︙ | |||
2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 | 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 | + |
login_check_credentials();
if( !g.perm.Admin ){
login_needed(0);
return;
}
alert_submenu_common();
style_submenu_element("Users","setup_ulist");
style_set_current_feature("alerts");
style_header("Subscriber List");
nTotal = db_int(0, "SELECT count(*) FROM subscriber");
nPending = db_int(0, "SELECT count(*) FROM subscriber WHERE NOT sverified");
if( nPending>0 && P("purge") && cgi_csrf_safe(0) ){
int nNewPending;
db_multi_exec(
"DELETE FROM subscriber"
|
| ︙ | |||
2180 2181 2182 2183 2184 2185 2186 | 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 | - + |
@ <td data-sortkey='%010llx(iMtime)'>%z(human_readable_age(rAge))</td>
@ <td>%h(db_column_text(&q,7))</td>
@ </tr>
}
@ </tbody></table>
db_finalize(&q);
style_table_sorter();
|
| ︙ | |||
2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 | 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 | + - + |
void contact_admin_page(void){
const char *zAdminEmail = db_get("email-admin",0);
unsigned int uSeed = 0;
const char *zDecoded;
char *zCaptcha = 0;
login_check_credentials();
style_set_current_feature("alerts");
if( zAdminEmail==0 || zAdminEmail[0]==0 ){
style_header("Outbound Email Disabled");
@ <p>Outbound email is disabled on this repository
|
| ︙ | |||
2832 2833 2834 2835 2836 2837 2838 | 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 | - + + |
@ %h(pSender->zErr)
@ </pre></blockquote>
}else{
@ <p>Your message has been sent to the repository administrator.
@ Thank you for your input.</p>
}
alert_sender_free(pSender);
|
| ︙ | |||
2879 2880 2881 2882 2883 2884 2885 | 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 | - + |
@ <div class="captcha"><table class="captcha"><tr><td><pre class="captcha">
@ %h(zCaptcha)
@ </pre>
@ Enter the 8 characters above in the "Security Code" box<br/>
@ </td></tr></table></div>
}
@ </form>
|
| ︙ | |||
2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 | 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 | + - + |
*/
void announce_page(void){
login_check_credentials();
if( !g.perm.Announce ){
login_needed(0);
return;
}
style_set_current_feature("alerts");
if( fossil_strcmp(P("name"),"test1")==0 ){
/* Visit the /announce/test1 page to see the CGI variables */
@ <p style='border: 1px solid black; padding: 1ex;'>
cgi_print_all(0, 0);
@ </p>
}else if( P("submit")!=0 && cgi_csrf_safe(1) ){
char *zErr = alert_send_announcement();
style_header("Announcement Sent");
if( zErr ){
@ <h1>Internal Error</h1>
@ <p>The following error was reported by the system:
@ <blockquote><pre>
@ %h(zErr)
@ </pre></blockquote>
}else{
@ <p>The announcement has been sent.
@ <a href="%h(PD("REQUEST_URI","/"))">Send another</a></p>
}
|
| ︙ | |||
3041 3042 3043 3044 3045 3046 3047 | 3052 3053 3054 3055 3056 3057 3058 3059 3060 | - + |
@ <td><input type="submit" name="submit" value="Dry Run">
}else{
@ <td><input type="submit" name="submit" value="Send Message">
}
@ </tr>
@ </table>
@ </form>
|
Changes to src/attach.c.
| ︙ | |||
43 44 45 46 47 48 49 50 51 52 53 54 55 56 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | + |
const char *zTkt = P("tkt");
const char *zTechNote = P("technote");
Blob sql;
Stmt q;
if( zPage && zTkt ) zTkt = 0;
login_check_credentials();
style_set_current_feature("attach");
blob_zero(&sql);
blob_append_sql(&sql,
"SELECT datetime(mtime,toLocal()), src, target, filename,"
" comment, user,"
" (SELECT uuid FROM blob WHERE rid=attachid), attachid,"
" (CASE WHEN 'tkt-'||target IN (SELECT tagname FROM tag)"
" THEN 1"
|
| ︙ | |||
143 144 145 146 147 148 149 | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | - + |
}
@ by %h(zDispUser) on
hyperlink_to_date(zDate, ".");
free(zUrlTail);
}
db_finalize(&q);
@ </ol>
|
| ︙ | |||
174 175 176 177 178 179 180 181 182 183 184 185 186 187 | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | + |
const char *zFile = P("file");
const char *zTarget = 0;
int attachid = atoi(PD("attachid","0"));
char *zUUID;
if( zFile==0 ) fossil_redirect_home();
login_check_credentials();
style_set_current_feature("attach");
if( zPage ){
if( g.perm.RdWiki==0 ){ login_needed(g.anon.RdWiki); return; }
zTarget = zPage;
}else if( zTkt ){
if( g.perm.RdTkt==0 ){ login_needed(g.anon.RdTkt); return; }
zTarget = zTkt;
}else if( zTechNote ){
|
| ︙ | |||
203 204 205 206 207 208 209 | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | - + - + |
" ORDER BY mtime DESC LIMIT 1",
zTarget, zFile
);
}
if( zUUID==0 || zUUID[0]==0 ){
style_header("No Such Attachment");
@ No such attachment....
|
| ︙ | |||
384 385 386 387 388 389 390 391 392 393 394 395 396 397 | 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 | + |
if( P("ok") && szContent>0 && (goodCaptcha = captcha_is_correct(0)) ){
int needModerator = (zTkt!=0 && ticket_need_moderation(0)) ||
(zPage!=0 && wiki_need_moderation(0));
const char *zComment = PD("comment", "");
attach_commit(zName, zTarget, aContent, szContent, needModerator, zComment);
cgi_redirect(zFrom);
}
style_set_current_feature("attach");
style_header("Add Attachment");
if( !goodCaptcha ){
@ <p class="generalError">Error: Incorrect security code.</p>
}
@ <h2>Add Attachment To %s(zTargetType)</h2>
form_begin("enctype='multipart/form-data'", "%R/attachadd");
@ <div>
|
| ︙ | |||
408 409 410 411 412 413 414 | 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 | - + | } @ <input type="hidden" name="from" value="%h(zFrom)" /> @ <input type="submit" name="ok" value="Add Attachment" /> @ <input type="submit" name="cancel" value="Cancel" /> @ </div> captcha_generate(0); @ </form> |
| ︙ | |||
537 538 539 540 541 542 543 544 545 546 547 548 549 550 | 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 | + |
}
return;
}
if( strcmp(zModAction,"approve")==0 ){
moderation_approve('a', rid);
}
}
style_set_current_feature("attach");
style_header("Attachment Details");
style_submenu_element("Raw", "%R/artifact/%s", zUuid);
if(fShowContent){
style_submenu_element("Line Numbers", "%R/ainfo/%s%s", zUuid,
((zLn&&*zLn) ? "" : "?ln=0"));
}
|
| ︙ | |||
620 621 622 623 624 625 626 | 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 | - + |
}else{
int sz = db_int(0, "SELECT size FROM blob WHERE rid=%d", ridSrc);
@ <i>(file is %d(sz) bytes of binary data)</i>
}
@ </blockquote>
manifest_destroy(pAttach);
blob_reset(&attach);
|
| ︙ |
Changes to src/backlink.c.
| ︙ | |||
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | + - + + |
Stmt q;
login_check_credentials();
if( !g.perm.Read || !g.perm.RdTkt || !g.perm.RdWiki ){
login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki);
return;
}
style_set_current_feature("test");
style_header("Backlink Timeline (Internal Testing Use)");
db_multi_exec(
"CREATE TEMP TABLE IF NOT EXISTS ok(rid INTEGER PRIMARY KEY);"
"DELETE FROM ok;"
"INSERT OR IGNORE INTO ok"
" SELECT blob.rid FROM backlink, blob"
" WHERE blob.uuid BETWEEN backlink.target AND (backlink.target||'x')"
);
blob_zero(&sql);
blob_append(&sql, timeline_query_for_www(), -1);
blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
db_prepare(&q, "%s", blob_sql_text(&sql));
www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
0, 0, 0, 0, 0, 0);
db_finalize(&q);
|
| ︙ | |||
150 151 152 153 154 155 156 | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | - + |
}
}
@ <td>%h(zMtime)</tr>
}
@ </tbody>
@ </table>
db_finalize(&q);
|
| ︙ |
Changes to src/branch.c.
| ︙ | |||
456 457 458 459 460 461 462 463 464 465 466 467 468 469 | 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 | + |
*/
static void new_brlist_page(void){
Stmt q;
double rNow;
int show_colors = PB("colors");
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
style_set_current_feature("branch");
style_header("Branches");
style_adunit_config(ADUNIT_RIGHT_OK);
style_submenu_checkbox("colors", "Use Branch Colors", 0, 0);
login_anonymous_available();
brlist_create_temp_table();
db_prepare(&q, "SELECT * FROM tmp_brlist ORDER BY mtime DESC");
|
| ︙ | |||
512 513 514 515 516 517 518 | 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | - + |
@ <td></td>
}
@ </tr>
}
@ </tbody></table></div>
db_finalize(&q);
style_table_sorter();
|
| ︙ | |||
554 555 556 557 558 559 560 561 562 563 564 565 566 567 | 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 | + |
if( colorTest ){
showClosed = 0;
showAll = 1;
}
if( showAll ) brFlags = BRL_BOTH;
if( showClosed ) brFlags = BRL_CLOSED_ONLY;
style_set_current_feature("branch");
style_header("%s", showClosed ? "Closed Branches" :
showAll ? "All Branches" : "Open Branches");
style_submenu_element("Timeline", "brtimeline");
if( showClosed ){
style_submenu_element("All", "brlist?all");
style_submenu_element("Open", "brlist?open");
}else if( showAll ){
|
| ︙ | |||
620 621 622 623 624 625 626 | 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 | - + |
@ <li>%z(href("%R/timeline?r=%T",zBr))%h(zBr)</a></li>
}
}
if( cnt ){
@ </ul>
}
db_finalize(&q);
|
| ︙ | |||
669 670 671 672 673 674 675 676 677 678 679 680 681 682 | 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 | + |
int tmFlags; /* Timeline display flags */
int fNoHidden = PB("nohidden")!=0; /* The "nohidden" query parameter */
int fOnlyHidden = PB("onlyhidden")!=0; /* The "onlyhidden" query parameter */
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
style_set_current_feature("branch");
style_header("Branches");
style_submenu_element("List", "brlist");
login_anonymous_available();
timeline_ss_submenu();
cookie_render();
@ <h2>The initial check-in for each branch:</h2>
blob_append(&sql, timeline_query_for_www(), -1);
|
| ︙ | |||
696 697 698 699 700 701 702 | 699 700 701 702 703 704 705 706 707 | - + |
** many descenders to (off-screen) parents. */
tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL;
if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH;
if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR;
if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR;
www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, brtimeline_extra);
db_finalize(&q);
|
Changes to src/browse.c.
| ︙ | |||
334 335 336 337 338 339 340 | 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 | - + |
manifest_destroy(pM);
@ </ul></div>
/* If the "noreadme" query parameter is present, do not try to
** show the content of the README file.
*/
if( P("noreadme")!=0 ){
|
| ︙ | |||
395 396 397 398 399 400 401 | 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 | - + |
safe_html_context(DOCSRC_FILE);
wiki_render_by_mimetype(&content, zMime);
document_emit_js();
}
}
}
db_finalize(&q);
|
| ︙ | |||
911 912 913 914 915 916 917 | 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 | - + |
@ </ul>
}
}
}
@ </ul>
@ </ul></div>
builtin_request_js("tree.js");
|
| ︙ | |||
1165 1166 1167 1168 1169 1170 1171 | 1165 1166 1167 1168 1169 1170 1171 1172 1173 | - + |
@ </td></tr>
@
fossil_free(zAge);
}
@ </table></div>
db_finalize(&q1);
db_finalize(&q2);
|
Changes to src/builtin.c.
| ︙ | |||
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | + - + |
/*
** WEBPAGE: test-builtin-files
**
** Show all built-in text files.
*/
void test_builtin_list_page(void){
int i;
style_set_current_feature("test");
style_header("Built-in Text Files");
@ <ol>
for(i=0; i<count(aBuiltinFiles); i++){
const char *z = aBuiltinFiles[i].zName;
char *zUrl = href("%R/builtin?name=%T&id=%.8s&mimetype=text/plain",
z,fossil_exe_id());
@ <li>%z(zUrl)%h(z)</a>
}
@ </ol>
|
| ︙ |
Changes to src/cache.c.
| ︙ | |||
351 352 353 354 355 356 357 358 359 360 361 362 363 364 | 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 | + |
void cache_page(void){
sqlite3 *db;
sqlite3_stmt *pStmt;
char zBuf[100];
login_check_credentials();
if( !g.perm.Setup ){ login_needed(0); return; }
style_set_current_feature("cache");
style_header("Web Cache Status");
db = cacheOpen(0);
if( db==0 ){
@ The web-page cache is disabled for this repository
}else{
char *zDbName = cacheName();
cache_register_sizename(db);
|
| ︙ | |||
382 383 384 385 386 387 388 | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | - + + - + |
zDbName = cacheName();
bigSizeName(sizeof(zBuf), zBuf, file_size(zDbName, ExtFILE));
@ <p>cache-file name: %h(zDbName)</p>
@ <p>cache-file size: %s(zBuf)</p>
fossil_free(zDbName);
sqlite3_close(db);
}
|
Changes to src/captcha.c.
| ︙ | |||
584 585 586 587 588 589 590 591 592 593 594 | 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 | + - + |
void captcha_test(void){
const char *zPw = P("name");
if( zPw==0 || zPw[0]==0 ){
u64 x;
sqlite3_randomness(sizeof(x), &x);
zPw = mprintf("%016llx", x);
}
style_set_current_feature("test");
style_header("Captcha Test");
@ <pre>
@ %s(captcha_render(zPw))
@ </pre>
|
| ︙ | |||
619 620 621 622 623 624 625 626 627 628 629 630 631 | 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 | + - + |
if( zCookieValue && atoi(zCookieValue)==1 ) return 0;
if( captcha_is_correct(0) ){
cgi_set_cookie(zCookieName, "1", login_cookie_path(), 8*3600);
return 0;
}
/* This appears to be a spider. Offer the captcha */
style_set_current_feature("captcha");
style_header("Verification");
@ <form method='POST' action='%s(g.zPath)'>
cgi_query_parameters_to_hidden();
@ <p>Please demonstrate that you are human, not a spider or robot</p>
captcha_generate(1);
@ </form>
|
| ︙ |
Changes to src/clone.c.
| ︙ | |||
420 421 422 423 424 425 426 | 420 421 422 423 424 425 426 427 428 | - + |
}else{
const char *zNm = db_get("short-project-name","clone");
@ <p>Clone the repository using this command:
@ <blockquote><pre>
@ fossil clone %s(g.zBaseURL) %h(zNm).fossil
@ </pre></blockquote>
}
|
Changes to src/cookies.c.
| ︙ | |||
223 224 225 226 227 228 229 | 223 224 225 226 227 228 229 230 231 | - + |
@ "fossil_display_settings" cookie.
@ <ul>
@ <li>Raw cookie value: "%h(PD("fossil_display_settings",""))"
for(i=0; i<cookies.nParam; i++){
@ <li>%h(cookies.aParam[i].zPName): "%h(cookies.aParam[i].zPValue)"
}
@ </ul>
|
Changes to src/descendants.c.
| ︙ | |||
559 560 561 562 563 564 565 566 567 568 569 570 571 572 | 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 | + |
if( !showClosed ){
style_submenu_element("Closed", "%s", url_render(&url, "closed", "", 0, 0));
}
if( showClosed || showAll ){
style_submenu_element("Open", "%s", url_render(&url, 0, 0, 0, 0));
}
url_reset(&url);
style_set_current_feature("leaves");
style_header("Leaves");
login_anonymous_available();
timeline_ss_submenu();
cookie_render();
#if 0
style_sidebox_begin("Nomenclature:", "33%");
@ <ol>
|
| ︙ | |||
611 612 613 614 615 616 617 | 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 | - + | tmFlags = TIMELINE_LEAFONLY | TIMELINE_DISJOINT | TIMELINE_NOSCROLL; if( fNg==0 ) tmFlags |= TIMELINE_GRAPH; if( fBrBg ) tmFlags |= TIMELINE_BRCOLOR; if( fUBg ) tmFlags |= TIMELINE_UCOLOR; www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, 0); db_finalize(&q); @ <br /> |
| ︙ |
Changes to src/diff.c.
| ︙ | |||
2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 | 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 | + |
if( ignoreWs ) annFlags |= DIFF_IGNORE_ALLWS;
/* compute the annotation */
annotate_file(&ann, zFilename, zRevision, zLimit, zOrigin, annFlags);
zCI = ann.aVers[0].zMUuid;
/* generate the web page */
style_set_current_feature("annotate");
style_header("Annotation For %h", zFilename);
if( bBlame ){
url_initialize(&url, "blame");
}else{
url_initialize(&url, "annotate");
}
url_add_parameter(&url, "checkin", P("checkin"));
|
| ︙ | |||
2554 2555 2556 2557 2558 2559 2560 | 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 | - + |
sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%*s%4d:",szHash+12,"",i+1);
}
}
@ %s(zPrefix) %h(z)
}
@ </pre>
|
| ︙ |
Changes to src/dispatch.c.
| ︙ | |||
745 746 747 748 749 750 751 752 753 754 755 756 757 758 | 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 | + |
const char *zCmd = P("cmd");
if( zCmd==0 ) zCmd = P("name");
if( zCmd && *zCmd ){
int rc;
const CmdOrPage *pCmd = 0;
style_set_current_feature("tkt");
style_header("Help: %s", zCmd);
style_submenu_element("Command-List", "%R/help");
rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd);
if( *zCmd=='/' ){
/* Some of the webpages require query parameters in order to work.
** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
|
| ︙ | |||
848 849 850 851 852 853 854 | 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 | - + + |
}else{
@ <li>%s(z)</li>
}
}
@ </ul></div>
}
|
| ︙ | |||
899 900 901 902 903 904 905 | 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 | - + |
@ <dt><big><b>%s(aCommand[i].zName)</b></big> (%s(zDesc))</dt>
@ <dd>
help_to_html(aCommand[i].zHelp, cgi_output_blob());
@ </dd>
}
@ </dl>
blob_reset(&buf);
|
| ︙ |
Changes to src/doc.c.
| ︙ | |||
553 554 555 556 557 558 559 | 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 | - + |
mimetype_from_name_custom(aMime[i].zSuffix)!=0){
zFlag = "<em><strong>!</strong></em> ";
}
@ <tr><td>%s(zFlag)%h(aMime[i].zSuffix)<td>%h(aMime[i].zMimetype)</tr>
}
@ </tbody></table>
style_table_sorter();
|
| ︙ | |||
768 769 770 771 772 773 774 | 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 | - + - + - + - + - + - + |
style_header("%s", blob_str(&title));
wiki_convert(&tail, 0, WIKI_BUTTONS);
}else{
style_header("%s", zDefaultTitle);
wiki_convert(pBody, 0, WIKI_BUTTONS);
}
document_emit_js();
|
| ︙ | |||
904 905 906 907 908 909 910 911 912 913 914 915 916 917 | 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 | + |
#ifdef FOSSIL_ENABLE_TH1_DOCS
, "index.th1"
#endif
};
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
style_set_current_feature("doc");
blob_init(&title, 0, 0);
zDfltTitle = isUV ? "" : "Documentation";
db_begin_transaction();
while( rid==0 && (++nMiss)<=count(azSuffix) ){
zName = P("name");
if( isUV ){
if( zName==0 ) zName = "index.wiki";
|
| ︙ | |||
1027 1028 1029 1030 1031 1032 1033 | 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 | - + |
}
cgi_set_status(404, "Not Found");
style_header("Not Found");
@ <p>Document %h(zOrigName) not found
if( fossil_strcmp(zCheckin,"ckout")!=0 ){
@ in %z(href("%R/tree?ci=%T",zCheckin))%h(zCheckin)</a>
}
|
| ︙ | |||
1200 1201 1202 1203 1204 1205 1206 | 1201 1202 1203 1204 1205 1206 1207 1208 1209 | - + |
**
** s=PATTERN Search for PATTERN
*/
void doc_search_page(void){
login_check_credentials();
style_header("Document Search");
search_screen(SRCH_DOC, 0);
|
Changes to src/event.c.
| ︙ | |||
108 109 110 111 112 113 114 115 116 117 | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | + - + |
if( db_step(&q1)==SQLITE_ROW ){
prevRid = db_column_int(&q1, 0);
}
break;
}
}
db_finalize(&q1);
style_set_current_feature("event");
if( rid==0 || (specRid!=0 && specRid!=rid) ){
style_header("No Such Tech-Note");
@ Cannot locate a technical note called <b>%h(zId)</b>.
|
| ︙ | |||
227 228 229 230 231 232 233 | 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | - + |
}
zFullId = db_text(0, "SELECT SUBSTR(tagname,7)"
" FROM tag"
" WHERE tagname GLOB 'event-%q*'",
zId);
attachment_list(zFullId, "<hr /><h2>Attachments:</h2><ul>");
document_emit_js();
|
| ︙ | |||
413 414 415 416 417 418 419 420 421 422 423 424 425 426 | 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | + |
/* Need both check-in and wiki-write or wiki-create privileges in order
** to edit/create an event.
*/
if( !g.perm.Write || (rid && !g.perm.WrWiki) || (!rid && !g.perm.NewWiki) ){
login_needed(g.anon.Write && (rid ? g.anon.WrWiki : g.anon.NewWiki));
return;
}
style_set_current_feature("event");
/* Figure out the color */
if( rid ){
zClr = db_text("", "SELECT bgcolor FROM event WHERE objid=%d", rid);
if( zClr && zClr[0] ){
const char * zRequestMethod = P("REQUEST_METHOD");
if(zRequestMethod && 'G'==zRequestMethod[0]){
|
| ︙ | |||
471 472 473 474 475 476 477 | 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 | - + |
login_verify_csrf_secret();
if ( !event_commit_common(rid, zId, zBody, zETime,
zMimetype, zComment, zTags,
zClrFlag[0] ? zClr : 0) ){
style_header("Error");
@ Internal error: Fossil tried to make an invalid artifact for
@ the edited technote.
|
| ︙ | |||
565 566 567 568 569 570 571 | 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 | - + |
@ <input type="submit" name="cancel" value="Cancel" />
@ <input type="submit" name="preview" value="Preview" />
if( P("preview") ){
@ <input type="submit" name="submit" value="Submit" />
}
@ </td></tr></table>
@ </div></form>
|
| ︙ |
Changes to src/extcgi.c.
| ︙ | |||
393 394 395 396 397 398 399 400 401 402 403 404 405 406 | 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | + |
Stmt q;
login_check_credentials();
if( !g.perm.Admin ){
login_needed(0);
return;
}
ext_files();
style_set_current_feature("extcgi");
style_header("CGI Extension Filelist");
@ <table border="0" cellspacing="0" cellpadding="3">
@ <tbody>
db_prepare(&q, "SELECT pathname, isexe FROM sfile"
" ORDER BY pathname");
while( db_step(&q)==SQLITE_ROW ){
const char *zName = db_column_text(&q,0);
|
| ︙ | |||
418 419 420 421 422 423 424 | 419 420 421 422 423 424 425 426 427 | - + |
}
}
@ </tr>
}
db_finalize(&q);
@ </tbody>
@ </table>
|
Changes to src/fileedit.c.
| ︙ | |||
1604 1605 1606 1607 1608 1609 1610 | 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 | - + |
"<code>fileedit-glob</code> repository setting</a>\n"
"must be set to a comma- and/or newine-delimited list of glob\n"
"values matching files which may be edited online."
"</p>\n");
}else{
CX("<p>Online editing is disabled for this repository.</p>\n");
}
|
| ︙ | |||
2059 2060 2061 2062 2063 2064 2065 | 2059 2060 2061 2062 2063 2064 2065 2066 2067 | - + |
"}\n");
CX("})();")/*anonymous function*/;
style_script_end();
}
blob_reset(&err);
CheckinMiniInfo_cleanup(&cimi);
db_end_transaction(0);
|
Changes to src/finfo.c.
| ︙ | |||
365 366 367 368 369 370 371 | 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 | - + |
if( brBg ) url_add_parameter(&url, "brbg", 0);
if( uBg ) url_add_parameter(&url, "ubg", 0);
ridFrom = name_to_rid_www("from");
zPrevDate[0] = 0;
cookie_render();
if( fnid==0 ){
@ No such file: %h(zFilename)
|
| ︙ | |||
752 753 754 755 756 757 758 | 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 | - + |
}else{
@ <tr class="timelineBottom" id="btm-%d(iTableId)">\
@ <td></td><td></td><td></td></tr>
}
}
@ </table>
timeline_output_graph_javascript(pGraph, TIMELINE_FILEDIFF, iTableId);
|
| ︙ | |||
777 778 779 780 781 782 783 784 785 786 787 788 789 790 | 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 | + |
void mlink_page(void){
const char *zFName = P("name");
const char *zCI = P("ci");
Stmt q;
login_check_credentials();
if( !g.perm.Admin ){ login_needed(g.anon.Admin); return; }
style_set_current_feature("finfo");
style_header("MLINK Table");
if( zFName==0 && zCI==0 ){
@ <span class='generalError'>
@ Requires either a name= or ci= query parameter
@ </span>
}else if( zFName ){
int fnid = db_int(0,"SELECT fnid FROM filename WHERE name=%Q",zFName);
|
| ︙ | |||
932 933 934 935 936 937 938 | 933 934 935 936 937 938 939 940 941 | - + |
@ </tr>
}
db_finalize(&q);
@ </tbody>
@ </table>
@ </div>
}
|
Changes to src/forum.c.
| ︙ | |||
860 861 862 863 864 865 866 867 868 869 870 871 872 873 | 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 | + |
"SELECT"
" substr(event.comment,instr(event.comment,':')+2)"
" FROM forumpost, event"
" WHERE event.objid=forumpost.fpid"
" AND forumpost.fpid=%d;",
fpid
);
style_set_current_feature("forum");
style_header("%s%s", zThreadTitle, *zThreadTitle ? "" : "Forum");
fossil_free(zThreadTitle);
if( mode!=FD_CHRONO ){
style_submenu_element("Chronological", "%R/%s/%s?t=c%s%s", g.zPath, zName,
bUnf ? "&unf" : "", bHist ? "&hist" : "");
}
if( mode!=FD_HIER ){
|
| ︙ | |||
881 882 883 884 885 886 887 | 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 | - + |
forum_display_thread(froot, fpid, mode, bUnf, bHist);
/* Emit Forum Javascript. */
builtin_request_js("forum.js");
forum_emit_js();
/* Emit the page style. */
|
| ︙ | |||
1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 | 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 | + |
if( isEdit ){
forumedit_page();
}else{
forumnew_page();
}
return;
}
style_set_current_feature("forum");
style_header("%h As Anonymous?", isEdit ? "Reply" : "Post");
@ <p>You are not logged in.
@ <p><table border="0" cellpadding="10">
@ <tr><td>
@ <form action="%s(zGoto)" method="POST">
@ <input type="submit" value="Remain Anonymous">
@ </form>
|
| ︙ | |||
1077 1078 1079 1080 1081 1082 1083 | 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 | - + | @ <input type="hidden" name="g" value="%s(zGoto)"> @ <input type="hidden" name="noanon" value="1"> @ <input type="submit" value="Login"> @ </form> @ <td>Log into an existing account @ </table> forum_emit_js(); |
| ︙ | |||
1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 | 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 | + |
if( P("submit") && cgi_csrf_safe(1) ){
if( forum_post(zTitle, 0, 0, 0, zMimetype, zContent) ) return;
}
if( P("preview") && !whitespace_only(zContent) ){
@ <h1>Preview:</h1>
forum_render(zTitle, zMimetype, zContent, "forumEdit", 1);
}
style_set_current_feature("forum");
style_header("New Forum Thread");
@ <form action="%R/forume1" method="POST">
@ <h1>New Thread:</h1>
forum_from_line();
forum_post_widget(zTitle, zMimetype, zContent);
@ <input type="submit" name="preview" value="Preview">
if( P("preview") && !whitespace_only(zContent) ){
|
| ︙ | |||
1138 1139 1140 1141 1142 1143 1144 | 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 | - + |
@ Require moderator approval</label>
@ <br><label><input type="checkbox" name="showqp" %s(PCK("showqp"))> \
@ Show query parameters</label>
@ </div>
}
@ </form>
forum_emit_js();
|
| ︙ | |||
1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 | 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 | + |
cgi_redirectf("%R/forumpost/%S",zParent);
}else{
cgi_redirectf("%R/forum");
}
return;
}
}
style_set_current_feature("forum");
isDelete = P("nullout")!=0;
if( P("submit")
&& isCsrfSafe
&& (zContent = PDT("content",""))!=0
&& (!whitespace_only(zContent) || isDelete)
){
int done = 1;
|
| ︙ | |||
1318 1319 1320 1321 1322 1323 1324 | 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 | - + |
@ Require moderator approval</label>
@ <br><label><input type="checkbox" name="showqp" %s(PCK("showqp"))> \
@ Show query parameters</label>
@ </div>
}
@ </form>
forum_emit_js();
|
| ︙ | |||
1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 | 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 | + - + |
int srchFlags;
login_check_credentials();
srchFlags = search_restrict(SRCH_FORUM);
if( !g.perm.RdForum ){
login_needed(g.anon.RdForum);
return;
}
style_set_current_feature("forum");
style_header("Forum");
if( g.perm.WrForum ){
style_submenu_element("New Thread","%R/forumnew");
}else{
/* Can't combine this with previous case using the ternary operator
* because that causes an error yelling about "non-constant format"
* with some compilers. I can't see it, since both expressions have
* the same format, but I'm no C spec lawyer. */
style_submenu_element("New Thread","%R/login");
}
if( g.perm.ModForum && moderation_needed() ){
style_submenu_element("Moderation Requests", "%R/modreq");
}
if( (srchFlags & SRCH_FORUM)!=0 ){
if( search_screen(SRCH_FORUM, 0) ){
style_submenu_element("Recent Threads","%R/forum");
|
| ︙ | |||
1453 1454 1455 1456 1457 1458 1459 | 1458 1459 1460 1461 1462 1463 1464 1465 1466 | - + |
db_finalize(&q);
}
if( iCnt>0 ){
@ </table></div>
}else{
@ <h1>No forum posts found</h1>
}
|
Changes to src/info.c.
| ︙ | |||
501 502 503 504 505 506 507 | 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 | - + |
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
rid = name_to_rid_www("name");
if( rid==0 ){
style_header("Check-in Information Error");
@ No such object: %h(g.argv[2])
|
| ︙ | |||
593 594 595 596 597 598 599 | 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 | - + |
blob_zero(&sql);
blob_append(&sql, timeline_query_for_www(), -1);
blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
db_prepare(&q, "%s", blob_sql_text(&sql));
www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
0, 0, 0, rid, 0, 0);
db_finalize(&q);
|
| ︙ | |||
627 628 629 630 631 632 633 634 635 636 637 638 | 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 | + - + |
const char *zW; /* URL param for ignoring whitespace */
const char *zPage = "vinfo"; /* Page that shows diffs */
const char *zPageHide = "ci"; /* Page that hides diffs */
const char *zBrName; /* Branch name */
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
style_set_current_feature("vinfo");
zName = P("name");
rid = name_to_rid_www("name");
if( rid==0 ){
style_header("Check-in Information Error");
@ No such object: %h(g.argv[2])
|
| ︙ | |||
938 939 940 941 942 943 944 | 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 | - + |
const char *zOldName = db_column_text(&q3, 4);
append_file_change_line(zUuid, zName, zOld, zNew, zOldName,
diffFlags,pRe,mperm);
}
db_finalize(&q3);
append_diff_javascript(diffType==2);
cookie_render();
|
| ︙ | |||
960 961 962 963 964 965 966 967 968 969 970 | 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 | + - + |
int modPending;
const char *zModAction;
int tagid;
int ridNext;
login_check_credentials();
if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
style_set_current_feature("winfo");
rid = name_to_rid_www("name");
if( rid==0 || (pWiki = manifest_get(rid, CFTYPE_WIKI, 0))==0 ){
style_header("Wiki Page Information Error");
@ No such object: %h(P("name"))
|
| ︙ | |||
1052 1053 1054 1055 1056 1057 1058 | 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 | - + | @ <div class="section">Content</div> blob_init(&wiki, pWiki->zWiki, -1); safe_html_context(DOCSRC_WIKI); wiki_render_by_mimetype(&wiki, pWiki->zMimetype); blob_reset(&wiki); manifest_destroy(pWiki); document_emit_js(); |
| ︙ | |||
1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 | 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 | + |
zFrom = P("from");
zTo = P("to");
if(zGlob && !*zGlob){
zGlob = NULL;
}
diffFlags = construct_diff_flags(diffType);
zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
style_set_current_feature("vdiff");
if( zBranch==0 ){
style_submenu_element("Path", "%R/timeline?me=%T&you=%T", zFrom, zTo);
}
if( diffType!=0 ){
style_submenu_element("Hide Diff", "%R/vdiff?%s&diff=0%s%T%s",
zQuery,
zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW);
|
| ︙ | |||
1325 1326 1327 1328 1329 1330 1331 | 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 | - + |
pFileFrom = manifest_file_next(pFrom, 0);
pFileTo = manifest_file_next(pTo, 0);
}
}
manifest_destroy(pFrom);
manifest_destroy(pTo);
append_diff_javascript(diffType==2);
|
| ︙ | |||
1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 | 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 | + |
return;
}
zV1 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v1);
zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2);
diffFlags = construct_diff_flags(diffType) | DIFF_HTML;
style_set_current_feature("fdiff");
style_header("Diff");
style_submenu_checkbox("w", "Ignore Whitespace", 0, 0);
if( diffType==2 ){
style_submenu_element("Unified Diff", "%R/fdiff?v1=%T&v2=%T&diff=1",
P("v1"), P("v2"));
}else{
style_submenu_element("Side-by-side Diff", "%R/fdiff?v1=%T&v2=%T&diff=2",
|
| ︙ | |||
1759 1760 1761 1762 1763 1764 1765 | 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 | - + |
if( pRe ){
@ <b>Only differences that match regular expression "%h(zRe)"
@ are shown.</b>
}
@ <hr />
append_diff(zV1, zV2, diffFlags, pRe);
append_diff_javascript(diffType);
|
| ︙ | |||
1963 1964 1965 1966 1967 1968 1969 | 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 | - + |
style_submenu_element("Download", "%R/raw/%s?at=%T",
zUuid, file_tail(blob_str(&downloadName)));
@ <hr />
content_get(rid, &content);
@ <blockquote><pre>
hexdump(&content);
@ </pre></blockquote>
|
| ︙ | |||
2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 | 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 | + |
char *zCIUuid = 0;
int isSymbolicCI = 0; /* ci= exists and is a symbolic name, not a hash */
int isBranchCI = 0; /* ci= refers to a branch name */
char *zHeader = 0;
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
style_set_current_feature("artifact");
/* Capture and normalize the name= and ci= query parameters */
if( zName==0 ){
zName = P("filename");
if( zName==0 ){
zName = P("fn");
}
|
| ︙ | |||
2261 2262 2263 2264 2265 2266 2267 | 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 | - + |
if( isFile ){
if( P("ci")==0 ) cgi_set_query_parameter("ci","tip");
page_tree();
return;
}
style_header("Missing name= query parameter");
@ The name= query parameter is missing
|
| ︙ | |||
2322 2323 2324 2325 2326 2327 2328 | 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 | - + |
@ File '%h(zName)' does not exist in this repository.
}
}else{
style_header("No such artifact");
@ Artifact '%h(zName)' does not exist in this repository.
}
if( rid==0 ){
|
| ︙ | |||
2530 2531 2532 2533 2534 2535 2536 | 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 | - + |
style_submenu_element("Image", "%R/raw/%s?m=%s", zUuid, zMime);
}else{
@ <i>(file is %d(blob_size(&content)) bytes of binary data)</i>
}
@ </blockquote>
}
}
|
| ︙ | |||
2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 | 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 | + |
moderation_approve('t', rid);
}
}
zTktTitle = db_table_has_column("repository", "ticket", "title" )
? db_text("(No title)",
"SELECT title FROM ticket WHERE tkt_uuid=%Q", zTktName)
: 0;
style_set_current_feature("tinfo");
style_header("Ticket Change Details");
style_submenu_element("Raw", "%R/artifact/%s", zUuid);
style_submenu_element("History", "%R/tkthistory/%s", zTktName);
style_submenu_element("Page", "%R/tktview/%t", zTktName);
style_submenu_element("Timeline", "%R/tkttimeline/%t", zTktName);
if( P("plaintext") ){
style_submenu_element("Formatted", "%R/info/%s", zUuid);
|
| ︙ | |||
2637 2638 2639 2640 2641 2642 2643 | 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 | - + |
@ </blockquote>
}
@ <div class="section">Changes</div>
@ <p>
ticket_output_change_artifact(pTktChng, 0, 1);
manifest_destroy(pTktChng);
|
| ︙ | |||
2688 2689 2690 2691 2692 2693 2694 | 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 | - + - + |
}
style_header("No Such Object");
@ <p>No such object: %h(zName)</p>
if( nLen<4 ){
@ <p>Object name should be no less than 4 characters. Ten or more
@ characters are recommended.</p>
}
|
| ︙ | |||
3225 3226 3227 3228 3229 3230 3231 | 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 | - + |
if( P("preview") ){
@ <input type="submit" name="apply" value="Apply Changes" />
}
@ </td></tr>
@ </table>
@ </div></form>
builtin_request_js("ci_edit.js");
|
| ︙ |
Changes to src/interwiki.c.
| ︙ | |||
341 342 343 344 345 346 347 348 349 350 351 352 353 354 | 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | + |
" json_object('base',%Q,'hash',%Q,'wiki',%Q),"
" now());",
zTag, zBase, zHash, zWiki);
db_protect_pop();
}
}
style_set_current_feature("interwiki");
style_header("Interwiki Map Configuration");
@ <p>Interwiki links are hyperlink targets of the form
@ <blockquote><i>Tag</i><b>:</b><i>PageName</i></blockquote>
@ <p>Such links resolve to links to <i>PageName</i> on a separate server
@ identified by <i>Tag</i>. The Interwiki Map or "intermap" is a mapping
@ from <i>Tags</i> to complete Server URLs.
db_prepare(&q,
|
| ︙ | |||
386 387 388 389 390 391 392 | 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | - + |
@ </ol>
}else{
@ No mappings are currently defined.
}
if( !g.perm.Setup ){
/* Do not show intermap editing fields to non-setup users */
|
| ︙ | |||
419 420 421 422 423 424 425 | 420 421 422 423 424 425 426 427 428 | - + | @ size="20" value="%h(zWiki)"> @ (use "<tt>/wiki?name=</tt>" when the target is Fossil)</td></tr> @ <tr><td></td> @ <td><input type="submit" name="submit" value="Apply Changes"></td></tr> @ </table> @ </form> |
Changes to src/loadctrl.c.
| ︙ | |||
50 51 52 53 54 55 56 57 58 59 60 61 | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | + - + |
** Abort the current operation of the load average of the host computer
** is too high.
*/
void load_control(void){
double mxLoad = atof(db_get("max-loadavg", 0));
if( mxLoad<=0.0 || mxLoad>=load_average() ) return;
style_set_current_feature("test");
style_header("Server Overload");
@ <h2>The server load is currently too high.
@ Please try again later.</h2>
@ <p>Current load average: %f(load_average()).<br />
@ Load average limit: %f(mxLoad)</p>
|
Changes to src/login.c.
| ︙ | |||
654 655 656 657 658 659 660 661 662 663 664 665 666 667 | 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 | + |
** where HASH is a random hex number, PROJECT is either project
** code prefix, and LOGIN is the user name.
*/
login_set_user_cookie(zUsername, uid, NULL, rememberMe?0:1);
redirect_to_g();
}
}
style_set_current_feature("login");
style_header("Login/Logout");
style_adunit_config(ADUNIT_OFF);
@ %s(zErrMsg)
if( zGoto && !noAnon ){
char *zAbbrev = fossil_strdup(zGoto);
int i;
for(i=0; zAbbrev[i] && zAbbrev[i]!='?'; i++){}
|
| ︙ | |||
793 794 795 796 797 798 799 | 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 | - + |
@ size="30" /></td></tr>
@ <tr><td></td>
@ <td><input type="submit" value="Change Password" /></td></tr>
@ </table>
@ </form>
}
}
|
| ︙ | |||
1547 1548 1549 1550 1551 1552 1553 | 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 | - + |
char *zPerms; /* Permissions for the default user */
int canDoAlerts = 0; /* True if receiving email alerts is possible */
int doAlerts = 0; /* True if subscription is wanted too */
if( !db_get_boolean("self-register", 0) ){
style_header("Registration not possible");
@ <p>This project does not allow user self-registration. Please contact the
@ project administrator to obtain an account.</p>
|
| ︙ | |||
1706 1707 1708 1709 1710 1711 1712 | 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 | - + |
@ <p>An email has been sent to "%h(zEAddr)". That email contains a
@ hyperlink that you must click to activate your account.</p>
}
alert_sender_free(pSender);
if( zGoto ){
@ <p><a href='%h(zGoto)'>Continue</a>
}
|
| ︙ | |||
1798 1799 1800 1801 1802 1803 1804 | 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 | - + | @ </table> @ <div class="captcha"><table class="captcha"><tr><td><pre class="captcha"> @ %h(zCaptcha) @ </pre> @ Enter this 8-letter code in the "Captcha" box above. @ </td></tr></table></div> @ </form> |
| ︙ |
Changes to src/main.c.
| ︙ | |||
1308 1309 1310 1311 1312 1313 1314 | 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 | - + |
verboseFlag = PD("verbose", 0) != 0;
style_header("Version Information");
style_submenu_element("Stat", "stat");
fossil_version_blob(&versionInfo, verboseFlag);
@ <pre>
@ %h(blob_str(&versionInfo))
@ </pre>
|
| ︙ | |||
3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 | 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 | + |
int iCase = atoi(PD("case","0"));
int i;
login_check_credentials();
if( !g.perm.Admin ){
login_needed(0);
return;
}
style_set_current_feature("test");
style_header("Warning Test Page");
style_submenu_element("Error Log","%R/errorlog");
if( iCase<1 || iCase>4 ){
@ <p>Generate a message to the <a href="%R/errorlog">error log</a>
@ by clicking on one of the following cases:
}else{
@ <p>This is the test page for case=%d(iCase). All possible cases:
|
| ︙ | |||
3095 3096 3097 3098 3099 3100 3101 | 3096 3097 3098 3099 3100 3101 3102 3103 3104 | - + |
@ <li value='7'> call webpage_error()"
if( iCase==7 ){
cgi_reset_content();
webpage_error("Case 7 from /test-warning");
}
@ </ol>
@ <p>End of test</p>
|
Changes to src/moderate.c.
| ︙ | |||
187 188 189 190 191 192 193 | 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | - + |
" AND event.objid IN (SELECT objid FROM modreq)"
" ORDER BY event.mtime DESC"
);
db_prepare(&q, "%s", blob_sql_text(&sql));
www_print_timeline(&q, 0, 0, 0, 0, 0, 0, 0);
db_finalize(&q);
}
|
| ︙ |
Changes to src/name.c.
| ︙ | |||
666 667 668 669 670 671 672 | 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 | - + |
@ <ul><li>
object_description(rid, 0, 0, 0);
@ </li></ul>
@ </p></li>
}
@ </ol>
db_finalize(&q);
|
| ︙ | |||
1326 1327 1328 1329 1330 1331 1332 | 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 | - + |
@ <p>Select a range of artifacts to view:</p>
@ <ul>
for(i=1; i<=mx; i+=n){
@ <li> %z(href("%R/bloblist?s=%d&n=%d",i,n))
@ %d(i)..%d(i+n-1<mx?i+n-1:mx)</a>
}
@ </ul>
|
| ︙ | |||
1405 1406 1407 1408 1409 1410 1411 | 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 | - + |
}else{
@ <td>
}
@ </tr>
}
@ </table>
db_finalize(&q);
|
| ︙ | |||
1487 1488 1489 1490 1491 1492 1493 | 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 | - + |
style_submenu_element("Artifact Log", "rcvfromlist");
style_submenu_element("Artifact List", "bloblist");
}
if( g.perm.Write ){
style_submenu_element("Artifact Stats", "artifact_stats");
}
table_of_public_phantoms();
|
| ︙ | |||
1551 1552 1553 1554 1555 1556 1557 | 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 | - + |
@ <td align="left">%h(zDesc)</td>
@ <td align="left">%z(href("%R/timeline?c=%T",zDate))%s(zDate)</a></td>
@ </tr>
}
@ </tbody></table>
db_finalize(&q);
style_table_sorter();
|
| ︙ | |||
1675 1676 1677 1678 1679 1680 1681 | 1675 1676 1677 1678 1679 1680 1681 1682 1683 | - + |
style_submenu_element("Stats", "stat");
@ <h1>Hash Prefix Collisions on Check-ins</h1>
collision_report("SELECT (SELECT uuid FROM blob WHERE rid=objid)"
" FROM event WHERE event.type='ci'"
" ORDER BY 1");
@ <h1>Hash Prefix Collisions on All Artifacts</h1>
collision_report("SELECT uuid FROM blob ORDER BY 1");
|
Changes to src/path.c.
| ︙ | |||
615 616 617 618 619 620 621 622 623 624 625 626 627 628 | 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 | + |
void test_rename_list_page(void){
Stmt q;
int nRename;
int nCheckin;
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
style_set_current_feature("test");
if( P("all")!=0 ){
style_header("List Of All Filename Changes");
db_multi_exec("%s", zRenameQuery/*safe-for-%s*/);
style_submenu_element("Distinct", "%R/test-rename-list");
}else{
style_header("List Of Distinct Filename Changes");
db_multi_exec("%s", zDistinctRenameQuery/*safe-for-%s*/);
|
| ︙ | |||
649 650 651 652 653 654 655 | 650 651 652 653 654 655 656 657 658 | - + |
@ <td>%z(href("%R/finfo?name=%t",zOld))%h(zOld)</a></td>
@ <td>%z(href("%R/finfo?name=%t",zNew))%h(zNew)</a></td>
@ <td>%z(href("%R/info/%!S",zUuid))%S(zUuid)</a></td></tr>
}
@ </tbody></table>
db_finalize(&q);
style_table_sorter();
|
Changes to src/piechart.c.
| ︙ | |||
275 276 277 278 279 280 281 282 283 284 285 286 287 288 | 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | + |
Stmt ins;
int n = 0;
int width;
int height;
int i, j;
login_check_credentials();
style_set_current_feature("test");
style_header("Pie Chart Test");
db_multi_exec("CREATE TEMP TABLE piechart(amt REAL, label TEXT);");
db_prepare(&ins, "INSERT INTO piechart(amt,label) VALUES(:amt,:label)");
zData = PD("data","");
width = atoi(PD("width","800"));
height = atoi(PD("height","400"));
i = 0;
|
| ︙ | |||
326 327 328 329 330 331 332 | 327 328 329 330 331 332 333 334 335 | - + | @ <ul> @ <li> <a href='test-piechart?data=44,2,2,2,2,2,3,2,2,2,2,2,44'>Case 1</a> @ <li> <a href='test-piechart?data=2,2,2,2,2,44,44,2,2,2,2,2'>Case 2</a> @ <li> <a href='test-piechart?data=20,2,2,2,2,2,2,2,2,2,2,80'>Case 3</a> @ <li> <a href='test-piechart?data=80,2,2,2,2,2,2,2,2,2,2,20'>Case 4</a> @ <li> <a href='test-piechart?data=2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2'>Case 5</a> @ </ul> |
Changes to src/pikchrshow.c.
| ︙ | |||
372 373 374 375 376 377 378 | 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | - + |
} CX("</div>"/*#pikchrshow-output*/);
} CX("</fieldset>"/*#pikchrshow-output-wrapper*/);
} CX("</div>"/*sbs-wrapper*/);
builtin_fossil_js_bundle_or("fetch", "copybutton", "popupwidget",
"storage", "pikchr", NULL);
builtin_request_js("fossil.page.pikchrshow.js");
builtin_fulfill_js_requests();
|
| ︙ |
Changes to src/printf.c.
| ︙ | |||
1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 | 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 | + - + |
}
else
#endif
if( g.cgiOutput==1 && g.db ){
g.cgiOutput = 2;
cgi_reset_content();
cgi_set_content_type("text/html");
style_set_current_feature("error");
style_header("Bad Request");
etag_cancel();
@ <p class="generalError">%h(z)</p>
cgi_set_status(400, "Bad Request");
|
| ︙ |
Changes to src/repolist.c.
| ︙ | |||
243 244 245 246 247 248 249 250 251 252 | 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | + - + |
}
if( g.repositoryOpen ){
/* This case runs if remote_repository_info() found a repository
** that has the "repolist_skin" property set to non-zero and left
** that repository open in g.db. Use the skin of that repository
** for display. */
login_check_credentials();
style_set_current_feature("repolist");
style_header("Repository List");
@ %s(blob_str(&html))
style_table_sorter();
|
| ︙ |
Changes to src/report.c.
| ︙ | |||
95 96 97 98 99 100 101 | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | - + |
Th_Store("report_items", blob_str(&ril));
Th_Render(zScript);
blob_reset(&ril);
if( g.thTrace ) Th_Trace("END_REPORTLIST<br />\n", -1);
|
| ︙ | |||
323 324 325 326 327 328 329 330 331 332 | 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 | + - + |
if( !g.perm.TktFmt ){
login_needed(g.anon.TktFmt);
return;
}
rn = atoi(PD("rn","0"));
db_prepare(&q, "SELECT title, sqlcode, owner, cols "
"FROM reportfmt WHERE rn=%d",rn);
style_set_current_feature("report");
style_header("SQL For Report Format Number %d", rn);
if( db_step(&q)!=SQLITE_ROW ){
@ <p>Unknown report number: %d(rn)</p>
|
| ︙ | |||
348 349 350 351 352 353 354 | 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 | - + | @ %h(zSQL) @ </pre></td> @ <td width=15></td><td valign="top"> output_color_key(zClrKey, 0, "border=0 cellspacing=0 cellpadding=3"); @ </td> @ </tr></table> report_format_hints(); |
| ︙ | |||
379 380 381 382 383 384 385 386 387 388 389 390 391 392 | 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | + |
char *zErr = 0;
login_check_credentials();
if( !g.perm.TktFmt ){
login_needed(g.anon.TktFmt);
return;
}
style_set_current_feature("report");
/*view_add_functions(0);*/
rn = atoi(PD("rn","0"));
zTitle = P("t");
zOwner = PD("w",g.zLogin);
z = P("s");
zSQL = z ? trim_string(z) : 0;
zClrKey = trim_string(PD("k",""));
|
| ︙ | |||
408 409 410 411 412 413 414 | 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 | - + |
@ related to this report will be removed and cannot be recovered.</p>
@
@ <input type="hidden" name="rn" value="%d(rn)">
login_insert_csrf_secret();
@ <input type="submit" name="del2" value="Delete The Report">
@ <input type="submit" name="can" value="Cancel">
@ </form>
|
| ︙ | |||
500 501 502 503 504 505 506 | 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 | - + - + |
@ <textarea name="k" rows="8" cols="50">%h(zClrKey)</textarea>
@ </p>
if( !g.perm.Admin && fossil_strcmp(zOwner,g.zLogin)!=0 ){
@ <p>This report format is owned by %h(zOwner). You are not allowed
@ to change it.</p>
@ </form>
report_format_hints();
|
| ︙ | |||
1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 | 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 | + |
}
count = 0;
if( !tabs ){
struct GenerateHTML sState = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
db_multi_exec("PRAGMA empty_result_callbacks=ON");
style_set_current_feature("report");
style_submenu_element("Raw", "rptview?tablist=1&%h", PD("QUERY_STRING",""));
if( g.perm.Admin
|| (g.perm.TktFmt && g.zLogin && fossil_strcmp(g.zLogin,zOwner)==0) ){
style_submenu_element("Edit", "rptedit?rn=%d", rn);
}
if( g.perm.TktFmt ){
style_submenu_element("SQL", "rptsql?rn=%d",rn);
|
| ︙ | |||
1055 1056 1057 1058 1059 1060 1061 | 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 | - + |
@ </tbody></table>
if( zErr1 ){
@ <p class="reportError">Error: %h(zErr1)</p>
}else if( zErr2 ){
@ <p class="reportError">Error: %h(zErr2)</p>
}
style_table_sorter();
|
| ︙ |
Changes to src/search.c.
| ︙ | |||
1210 1211 1212 1213 1214 1215 1216 | 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 | - + |
** f -> forum
** all -> everything
*/
void search_page(void){
login_check_credentials();
style_header("Search");
search_screen(SRCH_ALL, 1);
|
| ︙ | |||
1977 1978 1979 1980 1981 1982 1983 1984 1985 | 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 | + - + |
const char *zId = P("id");
const char *zType = P("y");
const char *zIdxed = P("ixed");
int id;
int cnt1 = 0, cnt2 = 0, cnt3 = 0;
login_check_credentials();
if( !g.perm.Admin ){ login_needed(0); return; }
style_set_current_feature("test");
if( !search_index_exists() ){
@ <p>Indexed search is disabled
|
| ︙ | |||
2023 2024 2025 2026 2027 2028 2029 | 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 | - + |
@ </table>
zName = mprintf("Indexed '%c' docs",zDocId[0]);
style_submenu_element(zName,"%R/test-ftsdocs?y=%c&ixed=1",zDocId[0]);
zName = mprintf("Unindexed '%c' docs",zDocId[0]);
style_submenu_element(zName,"%R/test-ftsdocs?y=%c&ixed=0",zDocId[0]);
}
db_finalize(&q);
|
| ︙ | |||
2053 2054 2055 2056 2057 2058 2059 | 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 | - + |
@ <ul>
while( db_step(&q)==SQLITE_ROW ){
@ <li> <a href='test-ftsdocs?id=%d(db_column_int(&q,0))'>
@ %h(db_column_text(&q,1))</a>
}
@ </ul>
db_finalize(&q);
|
| ︙ | |||
2097 2098 2099 2100 2101 2102 2103 | 2098 2099 2100 2101 2102 2103 2104 2105 2106 | - + | } db_finalize(&q); @ </tbody><tfooter> @ <tr><th>Total<th align="right">%d(cnt1)<th align="right">%d(cnt2) @ <th align="right">%d(cnt3) @ </tfooter> @ </table> |
Changes to src/security_audit.c.
| ︙ | |||
589 590 591 592 593 594 595 | 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 | - + |
@ </pre></blockquote>
@ </p>
table_of_public_phantoms();
@ </li>
}
@ </ol>
|
| ︙ | |||
631 632 633 634 635 636 637 | 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 | - + | @ <p>Click the "Cancel" button to leave things as they are.</p> @ @ <form action="%s(g.zPath)" method="post"> @ <input type="submit" name="apply" value="Make It Private"> @ <input type="submit" name="cancel" value="Cancel"> @ </form> |
| ︙ | |||
672 673 674 675 676 677 678 | 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 | - + - + - + - + |
@ </pre></blockquote>
@ <li><p>
@ If the server is running using one of
@ the "fossil http" or "fossil server" commands then add
@ a command-line option "--errorlog <i>FILENAME</i>" to that
@ command.
@ </ol>
|
Changes to src/setup.c.
| ︙ | |||
71 72 73 74 75 76 77 78 79 80 81 82 83 84 | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | + |
int setup_user = 0;
login_check_credentials();
if( !g.perm.Admin ){
login_needed(0);
}
setup_user = g.perm.Setup;
style_set_current_feature("setup");
style_header("Server Administration");
/* Make sure the header contains <base href="...">. Issue a warning
** if it does not. */
if( !cgi_header_contains("<base href=") ){
@ <p class="generalError"><b>Configuration Error:</b> Please add
@ <tt><base href="$secureurl/$current_page"></tt> after
|
| ︙ | |||
173 174 175 176 177 178 179 | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | - + |
setup_menu_entry("SQL", "admin_sql",
"Enter raw SQL commands");
setup_menu_entry("TH1", "admin_th1",
"Enter raw TH1 commands");
}
@ </table>
|
| ︙ | |||
337 338 339 340 341 342 343 344 345 346 347 348 349 350 | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | + |
};
login_check_credentials();
if( !g.perm.Setup ){
login_needed(0);
return;
}
style_set_current_feature("setup");
style_header("Access Control Settings");
db_begin_transaction();
@ <form action="%R/setup_access" method="post"><div>
login_insert_csrf_secret();
@ <input type="submit" name="submit" value="Apply Changes" /></p>
@ <hr />
multiple_choice_attribute("Redirect to HTTPS",
|
| ︙ | |||
574 575 576 577 578 579 580 | 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 | - + | @ probably secure enough and it is certainly more convenient for @ anonymous users. (Property: "auto-captcha")</p> @ <hr /> @ <p><input type="submit" name="submit" value="Apply Changes" /></p> @ </div></form> db_end_transaction(0); |
| ︙ | |||
606 607 608 609 610 611 612 613 614 615 616 617 618 619 | 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 | + |
zSelfRepo = fossil_strdup(blob_str(&fullName));
blob_reset(&fullName);
if( P("join")!=0 ){
login_group_join(zRepo, 1, zLogin, zPw, zNewName, &zErrMsg);
}else if( P("leave") ){
login_group_leave(&zErrMsg);
}
style_set_current_feature("setup");
style_header("Login Group Configuration");
if( zErrMsg ){
@ <p class="generalError">%s(zErrMsg)</p>
}
zGroup = login_group_name();
if( zGroup==0 ){
@ <p>This repository (in the file named "%h(zSelfRepo)")
|
| ︙ | |||
702 703 704 705 706 707 708 | 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 | - + |
@ <td>%h(db_column_text(&q,1))</td>
@ <td>%h(db_column_text(&q,2))</td></tr>
}
db_finalize(&q);
@ </tbody></table>
style_table_sorter();
}
|
| ︙ | |||
727 728 729 730 731 732 733 734 735 736 737 738 739 740 | 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 | + |
};
login_check_credentials();
if( !g.perm.Admin ){
login_needed(0);
return;
}
style_set_current_feature("setup");
style_header("Timeline Display Preferences");
db_begin_transaction();
@ <form action="%R/setup_timeline" method="post"><div>
login_insert_csrf_secret();
@ <p><input type="submit" name="submit" value="Apply Changes" /></p>
@ <hr />
|
| ︙ | |||
841 842 843 844 845 846 847 | 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 | - + + | @ right of the entry. @ <p>(Properties: "timeline-tslink-info") @ <hr /> @ <p><input type="submit" name="submit" value="Apply Changes" /></p> @ </div></form> db_end_transaction(0); |
| ︙ | |||
934 935 936 937 938 939 940 | 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 | - + + |
(char*)pSet->def, hasVersionableValue);
@<br />
}
}
@ </td></tr></table>
@ </div></form>
db_end_transaction(0);
|
| ︙ | |||
1030 1031 1032 1033 1034 1035 1036 | 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 | - + + |
entry_attribute("Contact", 40, "sitemap-contact", "smcontact",
"", 0);
@ (Property: sitemap-contact)
@ <hr />
@ <p><input type="submit" name="submit" value="Apply Changes" /></p>
@ </div></form>
db_end_transaction(0);
|
| ︙ | |||
1106 1107 1108 1109 1110 1111 1112 | 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 | - + + | @ to trusted users. It should <strong>not</strong> be used on a publicly @ editable wiki.</p> @ (Property: "wiki-use-html") @ <hr /> @ <p><input type="submit" name="submit" value="Apply Changes" /></p> @ </div></form> db_end_transaction(0); |
| ︙ | |||
1152 1153 1154 1155 1156 1157 1158 | 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 | - + | @ moderation. (Property: "modreq-wiki") @ </p> @ <hr /> @ <p><input type="submit" name="submit" value="Apply Changes" /></p> @ </div></form> db_end_transaction(0); |
| ︙ | |||
1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 | 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 | + |
db_multi_exec("DELETE FROM config WHERE name GLOB 'adunit*'");
db_protect_pop();
cgi_replace_parameter("adunit","");
cgi_replace_parameter("adright","");
setup_incr_cfgcnt();
}
style_set_current_feature("setup");
style_header("Edit Ad Unit");
@ <form action="%R/setup_adunit" method="post"><div>
login_insert_csrf_secret();
@ <b>Banner Ad-Unit:</b><br />
textarea_attribute("", 6, 80, "adunit", "adunit", "", 0);
@ <br />
@ <b>Right-Column Ad-Unit:</b><br />
|
| ︙ | |||
1233 1234 1235 1236 1237 1238 1239 | 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 | - + | @ width: 600px; @ height: 90px; @ border: 1px solid #f11; @ background-color: #fcc; @ '>Demo Ad</div> @ </pre></blockquote> @ </li> |
| ︙ | |||
1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 | 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 | + |
"DELETE FROM config WHERE name IN "
"('icon-image','icon-mimetype')"
);
db_protect_pop();
db_end_transaction(0);
cgi_redirect("setup_logo");
}
style_set_current_feature("setup");
style_header("Edit Project Logo And Background");
@ <p>The current project logo has a MIME-Type of <b>%h(zLogoMime)</b>
@ and looks like this:</p>
@ <blockquote><p><img src="%R/logo/%z(zLogoMtime)" \
@ alt="logo" border="1" />
@ </p></blockquote>
@
|
| ︙ | |||
1435 1436 1437 1438 1439 1440 1441 | 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 | - + | @ </div></form> @ <p>(Properties: "icon-image" and "icon-mimetype") @ <hr /> @ @ <p><span class="note">Note:</span> Your browser has probably cached these @ images, so you may need to press the Reload button before changes will @ take effect. </p> |
| ︙ | |||
1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 | 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 | + |
login_check_credentials();
if( !g.perm.Setup ){
login_needed(0);
return;
}
add_content_sql_commands(g.db);
zQ = cgi_csrf_safe(1) ? P("q") : 0;
style_set_current_feature("setup");
style_header("Raw SQL Commands");
@ <p><b>Caution:</b> There are no restrictions on the SQL that can be
@ run by this page. You can do serious and irrepairable damage to the
@ repository. Proceed with extreme caution.</p>
@
#if 0
@ <p>Only the first statement in the entry box will be run.
|
| ︙ | |||
1597 1598 1599 1600 1601 1602 1603 | 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 | - + + |
}
@ </tr>
}
sqlite3_finalize(pStmt);
@ </table>
}
}
|
| ︙ | |||
1641 1642 1643 1644 1645 1646 1647 | 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 | - + + |
zR = Th_GetResult(g.interp, &n);
if( rc==TH_OK ){
@ <pre class="th1result">%h(zR)</pre>
}else{
@ <pre class="th1error">%h(zR)</pre>
}
}
|
| ︙ | |||
1708 1709 1710 1711 1712 1713 1714 | 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 | - + + |
@ </tr>
}
db_finalize(&stLog);
@ </tbody></table>
if( counter>ofst+limit ){
@ <p><a href="admin_log?n=%d(limit)&x=%d(limit+ofst)">[Older]</a></p>
}
|
| ︙ | |||
1788 1789 1790 1791 1792 1793 1794 | 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 | - + |
@ <p>The SQLite FTS4 search index is disabled. All searching will be
@ a full-text scan. This usually works fine, but can be slow for
@ larger repositories.</p>
onoff_attribute("Use Porter Stemmer","search-stemmer","ss",0,0);
@ <p><input type="submit" name="fts1" value="Create A Full-Text Index">
}
@ </div></form>
|
| ︙ | |||
1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 | 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 | + |
int cnt = 0;
Blob namelist;
login_check_credentials();
if( !g.perm.Admin ){
login_needed(0);
return;
}
style_set_current_feature("setup");
style_header("URL Alias Configuration");
if( P("submit")!=0 ){
Blob token;
Blob sql;
const char *zNewName;
const char *zValue;
char zCnt[10];
|
| ︙ | |||
1946 1947 1948 1949 1950 1951 1952 | 1961 1962 1963 1964 1965 1966 1967 1968 1969 | - + | @ </ul> @ @ <p>To delete an entry from the alias table, change its name or value to an @ empty string and press "Apply Changes". @ @ <p>To add a new alias, fill in the name and value in the bottom row @ of the table above and press "Apply Changes". |
Changes to src/setupuser.c.
| ︙ | |||
50 51 52 53 54 55 56 57 58 59 60 61 62 63 | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | + |
style_submenu_element("Add", "setup_uedit");
style_submenu_element("Log", "access_log");
style_submenu_element("Help", "setup_ulist_notes");
if( alert_tables_exist() ){
style_submenu_element("Subscribers", "subscribers");
}
style_set_current_feature("setup");
style_header("User List");
if( (zWith==0 || zWith[0]==0) && !bUnusedOnly ){
@ <table border=1 cellpadding=2 cellspacing=0 class='userTable'>
@ <thead><tr>
@ <th>Category
@ <th>Capabilities (<a href='%R/setup_ucap_list'>key</a>)
@ <th>Info <th>Last Change</tr></thead>
|
| ︙ | |||
200 201 202 203 204 205 206 | 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | - + + |
@ </tr>
fossil_free(zAge);
}
@ </tbody></table>
db_finalize(&s);
style_table_sorter();
|
| ︙ | |||
246 247 248 249 250 251 252 | 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | - + + - + | @ <span class="usertype">nobody</span>. @ </p></li> @ @ <li><p>The permission flags are as follows:</p> capabilities_table(CAPCLASS_ALL); @ </li> @ </ol> |
| ︙ | |||
361 362 363 364 365 366 367 368 369 370 371 372 373 374 | 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 | + + |
}else{
zDeleteVerify = mprintf(
"User \"%s\" has %d or more artifacts in the block-chain. "
"Delete anyhow?",
P("login")/*safe-for-%s*/, n);
}
}
style_set_current_feature("setup");
/* If we have all the necessary information, write the new or
** modified user record. After writing the user record, redirect
** to the page that displays a list of users.
*/
if( !cgi_all("login","info","pw","apply") ){
/* need all of the above properties to make a change. Since one or
|
| ︙ | |||
407 408 409 410 411 412 413 | 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 | - + - + |
if( strlen(zLogin)==0 ){
const char *zRef = cgi_referer("setup_ulist");
style_header("User Creation Error");
@ <span class="loginError">Empty login not allowed.</span>
@
@ <p><a href="setup_uedit?id=%d(uid)&referer=%T(zRef)">
@ [Bummer]</a></p>
|
| ︙ | |||
476 477 478 479 480 481 482 | 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 | - + |
const char *zRef = cgi_referer("setup_ulist");
style_header("User Change Error");
admin_log( "Error updating user '%q': %s'.", zLogin, zErr );
@ <span class="loginError">%h(zErr)</span>
@
@ <p><a href="setup_uedit?id=%d(uid)&referer=%T(zRef)">
@ [Bummer]</a></p>
|
| ︙ | |||
894 895 896 897 898 899 900 | 899 900 901 902 903 904 905 906 907 | - + | @ <span class="usertype">developer</span> @ user. Similarly, the <span class="usertype">reader</span> user is a @ template for users who are allowed more access than @ <span class="usertype">anonymous</span>, @ but less than a <span class="usertype">developer</span>. @ </p></li> @ </ul> |
Changes to src/shun.c.
| ︙ | |||
261 262 263 264 265 266 267 | 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | - + |
}
}
if( cnt==0 ){
@ <i>no artifacts are shunned on this server</i>
}
db_finalize(&q);
@ </p></blockquote>
|
| ︙ | |||
401 402 403 404 405 406 407 | 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | - + |
@ <td style="padding-right: 15px;text-align: left;">%s(zHash)</td>
@ <td style="text-align: left;">%s(zIpAddr)</td>
@ </tr>
}
}
db_finalize(&q);
@ </table>
|
| ︙ | |||
547 548 549 550 551 552 553 | 547 548 549 550 551 552 553 554 555 | - + |
}
@ </form>
@ </td></tr>
}
}
@ </table>
db_finalize(&q);
|
Changes to src/sitemap.c.
| ︙ | |||
219 220 221 222 223 224 225 | 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | - + + |
}
@ <li>%z(href("%R/sitemap-test"))Test Pages</a></li>
if( isPopup ){
@ <li>%z(href("%R/sitemap"))Site Map</a></li>
}
@ </ul>
if( !isPopup ){
|
| ︙ | |||
271 272 273 274 275 276 277 | 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | - + + |
if( g.perm.Read && g.perm.Hyperlink ){
@ <li>%z(href("%R/timewarps"))Timeline of timewarps</a></li>
}
@ <li>%z(href("%R/cookies"))Content of display preference cookie</a></li>
@ <li>%z(href("%R/test-captcha"))Random ASCII-art Captcha image</a></li>
@ <li>%z(href("%R/test-piechart"))Pie-Chart generator test</a></li>
if( !isPopup ){
|
| ︙ | |||
311 312 313 314 315 316 317 | 313 314 315 316 317 318 319 320 321 322 | - + |
@ <li>%z(href("%R/timeline?forks"))Forks</a></li>
@ <li>%z(href("%R/timeline?cherrypicks"))Cherrypick merges</a></li>
@ <li>%z(href("%R/timewarps"))Timewarps</a></li>
@ <li>%z(href("%R/timeline?ubg"))Color-coded by user</a></li>
@ <li>%z(href("%R/timeline?deltabg"))Delta vs. baseline manifests</a></li>
@ </ul>
if( !isPopup ){
|
Changes to src/skins.c.
| ︙ | |||
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 | 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | + - + |
int ex = 0;
if( P("rename")==0 ) return 0;
zOldName = P("sn");
zNewName = P("newname");
if( zOldName==0 ) return 0;
if( zNewName==0 || zNewName[0]==0 || (ex = skinExists(zNewName))!=0 ){
if( zNewName==0 ) zNewName = zOldName;
style_set_current_feature("skins");
style_header("Rename A Skin");
if( ex ){
@ <p><span class="generalError">There is already another skin
@ named "%h(zNewName)". Choose a different name.</span></p>
}
@ <form action="%R/setup_skin_admin" method="post"><div>
@ <table border="0"><tr>
@ <tr><td align="right">Current name:<td align="left"><b>%h(zOldName)</b>
@ <tr><td align="right">New name:<td align="left">
@ <input type="text" size="35" name="newname" value="%h(zNewName)">
@ <tr><td><td>
@ <input type="hidden" name="sn" value="%h(zOldName)">
@ <input type="submit" name="rename" value="Rename">
@ <input type="submit" name="canren" value="Cancel">
@ </table>
login_insert_csrf_secret();
@ </div></form>
|
| ︙ | |||
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 | + - + |
int ex = 0;
if( P("save")==0 ) return 0;
zNewName = P("svname");
if( zNewName && zNewName[0]!=0 ){
}
if( zNewName==0 || zNewName[0]==0 || (ex = skinExists(zNewName))!=0 ){
if( zNewName==0 ) zNewName = "";
style_set_current_feature("skins");
style_header("Save Current Skin");
if( ex ){
@ <p><span class="generalError">There is already another skin
@ named "%h(zNewName)". Choose a different name.</span></p>
}
@ <form action="%R/setup_skin_admin" method="post"><div>
@ <table border="0"><tr>
@ <tr><td align="right">Name for this skin:<td align="left">
@ <input type="text" size="35" name="svname" value="%h(zNewName)">
@ <tr><td><td>
@ <input type="submit" name="save" value="Save">
@ <input type="submit" name="cansave" value="Cancel">
@ </table>
login_insert_csrf_secret();
@ </div></form>
|
| ︙ | |||
481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 | 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 | + + - + |
}
db_begin_transaction();
zCurrent = getSkin(0);
for(i=0; i<count(aBuiltinSkin); i++){
aBuiltinSkin[i].zSQL = getSkin(aBuiltinSkin[i].zLabel);
}
style_set_current_feature("skins");
if( cgi_csrf_safe(1) ){
/* Process requests to delete a user-defined skin */
if( P("del1") && (zName = skinVarName(P("sn"), 1))!=0 ){
style_header("Confirm Custom Skin Delete");
@ <form action="%R/setup_skin_admin" method="post"><div>
@ <p>Deletion of a custom skin is a permanent action that cannot
@ be undone. Please confirm that this is what you want to do:</p>
@ <input type="hidden" name="sn" value="%h(P("sn"))" />
@ <input type="submit" name="del2" value="Confirm - Delete The Skin" />
@ <input type="submit" name="cancel" value="Cancel - Do Not Delete" />
login_insert_csrf_secret();
@ </div></form>
|
| ︙ | |||
646 647 648 649 650 651 652 | 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 | - + |
@ <input type="submit" name="draftdel" value="Delete">
@ <input type="hidden" name="name" value="%h(zN)">
@ </form></tr>
}
db_finalize(&q);
@ </table>
|
| ︙ | |||
794 795 796 797 798 799 800 801 802 803 804 805 806 807 | 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 | + |
zContent = PD(zFile,zOrig);
if( P("revert")!=0 && cgi_csrf_safe(0) ){
zContent = zDflt;
isRevert = 1;
}
db_begin_transaction();
style_set_current_feature("skins");
style_header("%s", zTitle);
for(j=0; j<count(aSkinAttr); j++){
style_submenu_element(aSkinAttr[j].zSubmenu,
"%R/setup_skinedit?w=%d&basis=%h&sk=%d",j,zBasis,iSkin);
}
@ <form action="%R/setup_skinedit" method="post"><div>
login_insert_csrf_secret();
|
| ︙ | |||
843 844 845 846 847 848 849 | 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 | - + |
@ </pre>
}
blob_reset(&from);
blob_reset(&to);
blob_reset(&out);
}
@ </div></form>
|
| ︙ | |||
960 961 962 963 964 965 966 967 968 969 970 971 972 973 | 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 | + |
}
/* Publish the draft skin */
if( P("pub7")!=0 && PB("pub7ck1") && PB("pub7ck2") ){
skin_publish(iSkin);
}
style_set_current_feature("skins");
style_header("Customize Skin");
@ <p>Customize the look of this Fossil repository by making changes
@ to the CSS, Header, Footer, and Detail Settings in one of nine "draft"
@ configurations. Then, after verifying that all is working correctly,
@ publish the draft to become the new main Skin.<p>
@
|
| ︙ | |||
1121 1122 1123 1124 1125 1126 1127 | 1127 1128 1129 1130 1131 1132 1133 1134 1135 | - + |
@ <p>Administrators can optionally save or restore legacy skins, and/or
@ undo a prior publish.
}else{
@ <p>Visit the <a href='%R/setup_skin_admin'>Skin Admin</a> page
@ for cleanup and recovery actions.
}
builtin_request_js("skin.js");
|
Changes to src/smtp.c.
| ︙ | |||
767 768 769 770 771 772 773 774 775 776 777 778 779 780 | 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 | + |
Stmt q;
login_check_credentials();
if( !g.perm.Setup ){
login_needed(0);
return;
}
db_begin_transaction();
style_set_current_feature("smtp");
style_header("Email Server Setup");
if( db_table_exists("repository","emailroute") ){
style_submenu_element("emailblob table", "%R/emailblob");
style_submenu_element("emailoutq table", "%R/emailoutq");
db_prepare(&q, "SELECT eaddr, epolicy FROM emailroute ORDER BY 1");
}else{
db_prepare(&q, "SELECT null, null WHERE false");
|
| ︙ | |||
803 804 805 806 807 808 809 | 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 | - + | @ <tr> @ <td colspan="3"> @ <form method="POST" action="%R/setup_smtp_route"> @ <input type="submit" value="New"> @ ← Add a new email address @ </form> @ </table> |
| ︙ | |||
831 832 833 834 835 836 837 838 839 840 841 842 843 844 | 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 | + |
char *zErr = 0;
int iErr = 0;
login_check_credentials();
if( !g.perm.Setup ){
login_needed(0);
return;
}
style_set_current_feature("smtp");
style_header("Email Route Editor");
if( P("edit") && cgi_csrf_safe(1) && zEAddr!=0 && zEPolicy!=0 ){
smtp_server_schema(0);
if( (zOAddr==0 || fossil_strcmp(zEAddr,zOAddr)!=0) ){
/* New or changed email address */
if( db_exists("SELECT 1 FROM emailroute WHERE eaddr=%Q",zEAddr) ){
|
| ︙ | |||
922 923 924 925 926 927 928 | 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 | - + | @ <li><p><b>mbox</b> <i>login-name</i> @ <p>Store the message in the local mailbox for the user @ with USER.LOGIN=<i>login-name</i>. @ </ul> @ @ <p>To delete a route → erase all text from the "Routing" field then @ press the "Apply" button. |
| ︙ |
Changes to src/stat.c.
| ︙ | |||
286 287 288 289 290 291 292 | 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | - + |
@ <td>Last run: %z(backoffice_last_run())</td></tr>
}
if( g.perm.Admin && alert_enabled() ){
stats_for_email();
}
@ </table>
|
| ︙ | |||
457 458 459 460 461 462 463 464 465 466 467 468 469 470 | 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 | + |
int showAll = P("all")!=0;
int nOmitted;
sqlite3_int64 iNow;
char *zRemote;
login_check_credentials();
if( !g.perm.Admin ){ login_needed(0); return; }
style_set_current_feature("stat");
style_header("URLs and Checkouts");
style_adunit_config(ADUNIT_RIGHT_OK);
style_submenu_element("Stat", "stat");
style_submenu_element("Schema", "repo_schema");
iNow = db_int64(0, "SELECT strftime('%%s','now')");
@ <div class="section">URLs</div>
@ <table border="0" width='100%%'>
|
| ︙ | |||
514 515 516 517 518 519 520 | 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | - + + |
url_parse_local(zRemote, URL_OMIT_USER, &x);
@ <p><a href='%h(x.canonical)'>%h(zRemote)</a>
}else{
@ <p>%h(zRemote)</p>
}
@ </div>
}
|
| ︙ | |||
572 573 574 575 576 577 578 | 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 | - + + - + + |
}
@ </pre>
db_finalize(&q);
}else{
style_submenu_element("Stat1","repo_stat1");
}
}
|
| ︙ | |||
676 677 678 679 680 681 682 | 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 | - + |
fsize = file_size(g.zLocalDbName, ExtFILE);
approxSizeName(sizeof(zBuf), zBuf, fsize);
@ <h2>%h(file_tail(g.zLocalDbName)) Size: %s(zBuf)</h2>
@ <center><svg width='800' height='500'>
piechart_render(800,500,PIE_OTHER|PIE_PERCENT);
@ </svg></center>
}
|
| ︙ | |||
796 797 798 799 800 801 802 803 804 805 806 807 808 809 | 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 | + |
*/
if( !g.perm.Write && !db_get_boolean("artifact_stats_enable",0) ){
login_needed(g.anon.Write);
return;
}
load_control();
style_set_current_feature("stat");
style_header("Artifact Statistics");
style_submenu_element("Repository Stats", "stat");
style_submenu_element("Artifact List", "bloblist");
gather_artifact_stats(1);
db_prepare(&q,
"SELECT count(*), sum(isDelta), max(szCmpr),"
|
| ︙ | |||
817 818 819 820 821 822 823 | 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 | - + |
mxCmpr = db_column_int(&q, 2);
mxExp = db_column_int(&q, 3);
sumCmpr = db_column_int64(&q, 4);
sumExp = db_column_int64(&q, 5);
db_finalize(&q);
if( nTotal==0 ){
@ No artifacts in this repository!
|
| ︙ | |||
962 963 964 965 966 967 968 | 967 968 969 970 971 972 973 974 975 | - + |
@ <td>%h(zDate)</td>
@ <td>%z(href("%R/rcvfrom?rcvid=%d",iRcvid))%d(iRcvid)</a></td></tr>
}
@ </tbody></table></div>
db_finalize(&q);
}
style_table_sorter();
|
Changes to src/statrep.c.
| ︙ | |||
823 824 825 826 827 828 829 | 823 824 825 826 827 828 829 830 831 | - + |
case RPT_BYFILE:
stats_report_by_file(zUserName);
break;
case RPT_LASTCHNG:
stats_report_last_change();
break;
}
|
Changes to src/style.c.
| ︙ | |||
565 566 567 568 569 570 571 | 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | @ <meta http-equiv="Content-Security-Policy" content="$default_csp" /> @ <meta name="viewport" content="width=device-width, initial-scale=1.0"> @ <title>$<project_name>: $<title></title> @ <link rel="alternate" type="application/rss+xml" title="RSS Feed" \ @ href="$home/timeline.rss" /> @ <link rel="stylesheet" href="$stylesheet_url" type="text/css" /> @ </head> |
| ︙ | |||
611 612 613 614 615 616 617 618 619 620 621 622 623 624 | 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 | + |
Th_Store("compiler_name", COMPILER_NAME);
url_var("stylesheet", "css", "style.css");
image_url_var("logo");
image_url_var("background");
if( !login_is_nobody() ){
Th_Store("login", g.zLogin);
}
Th_MaybeStore("current_feature", feature_from_page_path(local_zCurrentPage) );
}
/*
** Draw the header.
*/
void style_header(const char *zTitleFormat, ...){
va_list ap;
|
| ︙ | |||
747 748 749 750 751 752 753 | 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 | - - - - - + | ** submenu elements. The header generation is deferred until this point ** so that we know that all style_submenu_element() and similar have ** been received. ** ** * Finalizes the page content. ** ** * Appends the footer. |
| ︙ | |||
884 885 886 887 888 889 890 | 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 | - + |
@ </div>
}else if( zAd ){
@ <div class="adunit_banner">
cgi_append_content(zAd, -1);
@ </div>
}
|
| ︙ | |||
1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 | 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 | + |
char zCap[100];
login_check_credentials();
if( g.perm.Admin || g.perm.Setup || db_get_boolean("test_env_enable",0) ){
isAuth = 1;
}
cgi_load_environment();
style_set_current_feature("error");
if( zFormat[0] ){
va_list ap;
va_start(ap, zFormat);
zErr = vmprintf(zFormat, ap);
va_end(ap);
style_header("Bad Request");
@ <h1>/%h(g.zPath): %h(zErr)</h1>
|
| ︙ | |||
1204 1205 1206 1207 1208 1209 1210 | 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 | - + - + |
@ <hr />
@ <pre>
@ %h(blob_str(&g.httpHeader))
@ </pre>
}
}
if( zErr && zErr[0] ){
|
| ︙ | |||
1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 | 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 | + - + |
if( zFormat ){
va_start(ap, zFormat);
zMsg = vmprintf(zFormat, ap);
va_end(ap);
}else{
zMsg = "Not Found";
}
style_set_current_feature("enotfound");
style_header("Not Found");
@ <p>%h(zMsg)</p>
cgi_set_status(404, "Not Found");
|
| ︙ |
Changes to src/tag.c.
| ︙ | |||
722 723 724 725 726 727 728 | 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 | - + |
@ %h(zName)</a></li>
}else{
@ <li><span class="tagDsp">%h(zName)</span></li>
}
}
@ </ul>
db_finalize(&q);
|
| ︙ | |||
779 780 781 782 783 784 785 | 779 780 781 782 783 784 785 786 787 | - + |
tmFlags = TIMELINE_XMERGE | TIMELINE_FILLGAPS | TIMELINE_NOSCROLL;
if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH;
if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR;
if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR;
www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, 0);
db_finalize(&q);
@ <br />
|
Changes to src/tar.c.
| ︙ | |||
783 784 785 786 787 788 789 | 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 | - + - + |
if( zInclude ){
@ zInclude = "%h(zInclude)"<br />
}
if( zExclude ){
@ zExclude = "%h(zExclude)"<br />
}
@ zKey = "%h(zKey)"
|
| ︙ |
Changes to src/th_main.c.
| ︙ | |||
1476 1477 1478 1479 1480 1481 1482 | 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 | - + |
const char **argv,
int *argl
){
if( argc!=1 ){
return Th_WrongNumArgs(interp, "styleFooter");
}
if( Th_IsRepositoryOpen() ){
|
| ︙ |
Changes to src/timeline.c.
| ︙ | |||
187 188 189 190 191 192 193 194 195 196 197 198 199 200 | 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | + |
*/
void test_hash_color_page(void){
const char *zBr;
char zNm[10];
int i, cnt;
login_check_credentials();
style_set_current_feature("test");
style_header("Hash Color Test");
for(i=cnt=0; i<10; i++){
sqlite3_snprintf(sizeof(zNm),zNm,"b%d",i);
zBr = P(zNm);
if( zBr && zBr[0] ){
@ <p style='border:1px solid;background-color:%s(hash_color(zBr));'>
@ %h(zBr) - %s(hash_color(zBr)) -
|
| ︙ | |||
212 213 214 215 216 217 218 | 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | - + |
for(i=0; i<10; i++){
sqlite3_snprintf(sizeof(zNm),zNm,"b%d",i);
zBr = P(zNm);
@ <input type="text" size="30" name='%s(zNm)' value='%h(PD(zNm,""))'><br />
}
@ <input type="submit">
@ </form>
|
| ︙ | |||
2727 2728 2729 2730 2731 2732 2733 | 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 | - + |
selectedRid, secondaryRid, 0);
db_finalize(&q);
if( zOlderButton ){
@ %z(chref("button","%s",zOlderButton))%h(zOlderButtonLabel)\
@ ↓</a>
}
document_emit_js(/*handles pikchrs rendered above*/);
|
| ︙ | |||
3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 | 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 | + |
char *z;
login_check_credentials();
if( (!g.perm.Read && !g.perm.RdTkt && !g.perm.RdWiki && !g.perm.RdForum) ){
login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki);
return;
}
style_set_current_feature("timeline");
style_header("Today In History");
zToday = (char*)P("today");
if( zToday ){
zToday = timeline_expand_datetime(zToday);
if( !fossil_isdate(zToday) ) zToday = 0;
}
if( zToday==0 ){
|
| ︙ | |||
3233 3234 3235 3236 3237 3238 3239 | 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 | - + |
" ORDER BY sortby DESC LIMIT 1");
@ <h2>%d(iAgo) Year%s(iAgo>1?"s":"") Ago
@ <small>%z(href("%R/timeline?c=%t",zId))(more context)</a>\
@ </small></h2>
www_print_timeline(&q, TIMELINE_GRAPH, 0, 0, 0, 0, 0, 0);
}
db_finalize(&q);
|
| ︙ | |||
3339 3340 3341 3342 3343 3344 3345 | 3341 3342 3343 3344 3345 3346 3347 3348 3349 | - + |
}
db_finalize(&q);
if( cnt==0 ){
@ <p>No timewarps in this repository</p>
}else{
@ </tbody></table></div>
}
|
Changes to src/tkt.c.
| ︙ | |||
583 584 585 586 587 588 589 590 591 592 593 594 595 596 | 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 | + |
zUuid, zUuid);
}
if( P("plaintext") ){
style_submenu_element("Formatted", "%R/tktview/%s", zUuid);
}else{
style_submenu_element("Plaintext", "%R/tktview/%s?plaintext", zUuid);
}
style_set_current_feature("tkt");
style_header("View Ticket");
if( showTimeline ){
int tagid = db_int(0,"SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",
zUuid);
if( tagid ){
tkt_draw_timeline(tagid, "a");
@ <hr>
|
| ︙ | |||
616 617 618 619 620 621 622 | 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 | - + |
zFullName = db_text(0,
"SELECT tkt_uuid FROM ticket"
" WHERE tkt_uuid GLOB '%q*'", zUuid);
if( zFullName ){
attachment_list(zFullName, "<hr /><h2>Attachments:</h2><ul>");
}
|
| ︙ | |||
813 814 815 816 817 818 819 820 821 822 823 824 825 826 | 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 | + |
char *zNewUuid = 0;
login_check_credentials();
if( !g.perm.NewTkt ){ login_needed(g.anon.NewTkt); return; }
if( P("cancel") ){
cgi_redirect("home");
}
style_set_current_feature("tkt");
style_header("New Ticket");
ticket_standard_submenu(T_ALL_BUT(T_NEW));
if( g.thTrace ) Th_Trace("BEGIN_TKTNEW<br />\n", -1);
ticket_init();
initializeVariablesFromCGI();
getAllTicketFields();
initializeVariablesFromDb();
|
| ︙ | |||
839 840 841 842 843 844 845 | 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 | - + |
if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zNewUuid ){
cgi_redirect(mprintf("%R/tktview/%s", zNewUuid));
return;
}
captcha_generate(0);
@ </form>
if( g.thTrace ) Th_Trace("END_TKTVIEW<br />\n", -1);
|
| ︙ | |||
868 869 870 871 872 873 874 875 876 877 878 | 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 | + - + - + - + |
login_needed(g.anon.ApndTkt || g.anon.WrTkt);
return;
}
zName = P("name");
if( P("cancel") ){
cgi_redirectf("tktview?name=%T", zName);
}
style_set_current_feature("tkt");
style_header("Edit Ticket");
if( zName==0 || (nName = strlen(zName))<4 || nName>HNAME_LEN_SHA1
|| !validate16(zName,nName) ){
@ <span class="tktError">Not a valid ticket id: "%h(zName)"</span>
|
| ︙ | |||
910 911 912 913 914 915 916 | 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 | - + |
if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zName ){
cgi_redirect(mprintf("%R/tktview/%s", zName));
return;
}
captcha_generate(0);
@ </form>
if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT<br />\n", -1);
|
| ︙ | |||
1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 | 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 | + - + - + |
style_submenu_element("History", "%R/tkthistory/%s", zUuid);
style_submenu_element("Status", "%R/info/%s", zUuid);
if( zType[0]=='c' ){
zTitle = mprintf("Check-ins Associated With Ticket %h", zUuid);
}else{
zTitle = mprintf("Timeline Of Ticket %h", zUuid);
}
style_set_current_feature("tkt");
style_header("%z", zTitle);
sqlite3_snprintf(6, zGlobPattern, "%s", zUuid);
canonical16(zGlobPattern, strlen(zGlobPattern));
tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid);
if( tagid==0 ){
@ No such ticket: %h(zUuid)
|
| ︙ | |||
1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 | 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 | + - + |
style_submenu_element("Check-ins", "%R/tkttimeline?name=%s&y=ci", zUuid);
style_submenu_element("Timeline", "%R/tkttimeline?name=%s", zUuid);
if( P("raw")!=0 ){
style_submenu_element("Decoded", "%R/tkthistory/%s", zUuid);
}else if( g.perm.Admin ){
style_submenu_element("Raw", "%R/tkthistory/%s?raw", zUuid);
}
style_set_current_feature("tkt");
style_header("%z", zTitle);
tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid);
if( tagid==0 ){
@ No such ticket: %h(zUuid)
|
| ︙ | |||
1160 1161 1162 1163 1164 1165 1166 | 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 | - + |
manifest_destroy(pTicket);
}
}
db_finalize(&q);
if( nChng ){
@ </ol>
}
|
| ︙ | |||
1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 | 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 | + - + |
** WEBPAGE: tktsrch
** Usage: /tktsrch?s=PATTERN
**
** Full-text search of all current tickets
*/
void tkt_srchpage(void){
login_check_credentials();
style_set_current_feature("tkt");
style_header("Ticket Search");
ticket_standard_submenu(T_ALL_BUT(T_SRCH));
search_screen(SRCH_TKT, 0);
|
Changes to src/tktsetup.c.
| ︙ | |||
52 53 54 55 56 57 58 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | - + |
setup_menu_entry("Report List Page", "tktsetup_reportlist",
"HTML with embedded TH1 code for the \"report list\" webpage.");
setup_menu_entry("Report Template", "tktsetup_rpttplt",
"The default ticket report format.");
setup_menu_entry("Key Template", "tktsetup_keytplt",
"The default color key for reports.");
@ </table>
|
| ︙ | |||
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | + + |
int isSubmit;
login_check_credentials();
if( !g.perm.Setup ){
login_needed(0);
return;
}
style_set_current_feature("tktsetup");
if( PB("setup") ){
cgi_redirect("tktsetup");
}
isSubmit = P("submit")!=0;
z = P("x");
if( z==0 ){
z = db_get(zDbField, zDfltValue);
}
style_set_current_feature("tktsetup");
style_header("Edit %s", zTitle);
if( P("clear")!=0 ){
login_verify_csrf_secret();
db_unset(zDbField, 0);
if( xRebuild ) xRebuild();
cgi_redirect("tktsetup");
}else if( isSubmit ){
|
| ︙ | |||
161 162 163 164 165 166 167 | 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | - + | @ </p></blockquote> @ </div></form> @ <hr /> @ <h2>Default %s(zTitle)</h2> @ <blockquote><pre> @ %h(zDfltValue) @ </pre></blockquote> |
| ︙ | |||
899 900 901 902 903 904 905 906 907 908 909 910 911 912 | 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 | + |
login_needed(0);
return;
}
if( P("setup") ){
cgi_redirect("tktsetup");
}
style_set_current_feature("tktsetup");
style_header("Ticket Display On Timelines");
db_begin_transaction();
@ <form action="%R/tktsetup_timeline" method="post"><div>
login_insert_csrf_secret();
@ <hr />
entry_attribute("Ticket Title", 40, "ticket-title-expr", "t",
|
| ︙ | |||
932 933 934 935 936 937 938 | 935 936 937 938 939 940 941 942 943 944 | - + | @ <hr /> @ <p> @ <input type="submit" name="submit" value="Apply Changes" /> @ <input type="submit" name="setup" value="Cancel" /> @ </p> @ </div></form> db_end_transaction(0); |
Changes to src/unversioned.c.
| ︙ | |||
544 545 546 547 548 549 550 | 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 | - + |
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
etag_check(ETAG_DATA,0);
style_header("Unversioned Files");
if( !db_table_exists("repository","unversioned") ){
@ No unversioned files on this server
|
| ︙ | |||
630 631 632 633 634 635 636 | 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 | - + |
@ <td>
}
@ </tfoot>
@ </table></div>
}else{
@ No unversioned files on this server.
}
|
| ︙ |
Changes to src/user.c.
| ︙ | |||
770 771 772 773 774 775 776 | 770 771 772 773 774 775 776 777 778 | - + | @ </form> @ <form method="post" action="%R/access_log"> @ <label><input type="checkbox" name="delall"> @ Delete all entries</input></label> @ <input type="submit" name="delallbtn" value="Delete"></input> @ </form> style_table_sorter(); |
Changes to src/webmail.c.
| ︙ | |||
405 406 407 408 409 410 411 412 413 414 415 416 417 418 | 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | + |
" FROM emailblob, emailbox"
" WHERE emailid=emsgid AND ebid=%d",
emailid
);
if( zUser ) blob_append_sql(&sql, " AND euser=%Q", zUser);
db_prepare_blob(&q, &sql);
blob_reset(&sql);
style_set_current_feature("webmail");
style_header("Message %d",emailid);
if( db_step(&q)==SQLITE_ROW ){
Blob msg = db_column_text_as_blob(&q, 0);
int eFormat = atoi(PD("f","0"));
eState = db_column_int(&q, 1);
eTranscript = db_column_int(&q, 2);
if( eFormat==2 ){
|
| ︙ | |||
511 512 513 514 515 516 517 | 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 | - + |
}
if( eState==3 ){
style_submenu_element("Delete", "%s",
url_render(pUrl,"trash","1",zENum,"1"));
}
db_end_transaction(0);
|
| ︙ | |||
608 609 610 611 612 613 614 615 616 617 | 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 | + - + |
char zNPg[30]; /* Next page */
HQuery url;
login_check_credentials();
if( !login_is_individual() ){
login_needed(0);
return;
}
style_set_current_feature("webmail");
if( !db_table_exists("repository","emailbox") ){
style_header("Webmail Not Available");
@ <p>This repository is not configured to provide webmail</p>
|
| ︙ | |||
755 756 757 758 759 760 761 | 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 | - + |
@ function webmailSelectAll(){
@ var x = document.getElementsByClassName("webmailckbox");
@ for(i=0; i<x.length; i++){
@ x[i].checked = true;
@ }
@ }
@ </script>
|
| ︙ | |||
778 779 780 781 782 783 784 785 786 787 788 789 790 791 | 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 | + |
Stmt q;
login_check_credentials();
if( !g.perm.Setup ){
login_needed(0);
return;
}
add_content_sql_commands(g.db);
style_set_current_feature("webmail");
style_header("emailblob table");
if( id>0 ){
style_submenu_element("Index", "%R/emailblob");
@ <ul>
db_prepare(&q, "SELECT emailid FROM emailblob WHERE ets=%d", id);
while( db_step(&q)==SQLITE_ROW ){
int id = db_column_int(&q, 0);
|
| ︙ | |||
852 853 854 855 856 857 858 | 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 | - + + |
@ <td align="right" data-sortkey='%08x(csz)'>%,d(csz)</td>
@ </tr>
}
@ </tbody></table>
db_finalize(&q);
style_table_sorter();
}
|
| ︙ | |||
909 910 911 912 913 914 915 | 913 914 915 916 917 918 919 920 921 | - + |
}else{
@ <td> </td>
}
}
@ </tbody></table>
db_finalize(&q);
style_table_sorter();
|
Changes to src/wiki.c.
| ︙ | |||
60 61 62 63 64 65 66 67 68 69 70 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | + - + |
/*
** Check a wiki name. If it is not well-formed, then issue an error
** and return true. If it is well-formed, return false.
*/
static int check_name(const char *z){
if( !wiki_name_is_wellformed((const unsigned char *)z) ){
style_set_current_feature("wiki");
style_header("Wiki Page Name Error");
@ The wiki name "<span class="wikiError">%h(z)</span>" is not well-formed.
@ Rules for wiki page names:
well_formed_wiki_name_rules();
|
| ︙ | |||
132 133 134 135 136 137 138 139 140 141 142 143 144 145 | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | + - + |
login_check_credentials();
g.zExtra = zPageName;
cgi_set_parameter_nocopy("name", g.zExtra, 1);
g.isHome = 1;
wiki_page();
return;
}
style_set_current_feature("wiki");
style_header("Home");
@ <p>This is a stub home-page for the project.
@ To fill in this page, first go to
@ %z(href("%R/setup_config"))setup/config</a>
@ and establish a "Project Name". Then create a
@ wiki page with that name. The content of that wiki page
@ will be displayed in place of this message.</p>
|
| ︙ | |||
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | + - + + - + + - + |
** WEBPAGE: md_rules
**
** Show a summary of the Markdown wiki formatting rules.
*/
void markdown_rules_page(void){
Blob x;
int fTxt = P("txt")!=0;
style_set_current_feature("wiki");
style_header("Markdown Formatting Rules");
if( fTxt ){
style_submenu_element("Formatted", "%R/md_rules");
}else{
style_submenu_element("Plain-Text", "%R/md_rules?txt=1");
}
style_submenu_element("Wiki", "%R/wiki_rules");
blob_init(&x, builtin_text("markdown.md"), -1);
blob_materialize(&x);
interwiki_append_map_table(&x);
safe_html_context(DOCSRC_TRUSTED);
wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-markdown");
blob_reset(&x);
|
| ︙ | |||
342 343 344 345 346 347 348 349 350 351 352 353 354 355 | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 | + |
/*
** WEBPAGE: wikihelp
** A generic landing page for wiki.
*/
void wiki_helppage(void){
login_check_credentials();
if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
style_set_current_feature("wiki");
style_header("Wiki Help");
wiki_standard_submenu(W_ALL_BUT(W_HELP));
@ <h2>Wiki Links</h2>
@ <ul>
@ <li> %z(href("%R/timeline?y=w"))Recent changes</a> to wiki pages.</li>
@ <li> Formatting rules for %z(href("%R/wiki_rules"))Fossil Wiki</a> and for
@ %z(href("%R/md_rules"))Markdown Wiki</a>.</li>
|
| ︙ | |||
367 368 369 370 371 372 373 | 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 | - + + - + |
@ <li> %z(href("%R/modreq"))Tend to pending moderation requests</a></li>
}
if( search_restrict(SRCH_WIKI)!=0 ){
@ <li> %z(href("%R/wikisrch"))Search</a> for wiki pages containing key
@ words</li>
}
@ </ul>
|
| ︙ | |||
444 445 446 447 448 449 450 451 452 453 454 455 456 457 | 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 | + |
** continuing to the plain wiki display.
*/
static int wiki_page_header(
int eType, /* Page type. Might be WIKITYPE_UNKNOWN */
const char *zPageName, /* Name of the page */
const char *zExtra /* Extra prefix text on the page header */
){
style_set_current_feature("wiki");
if( eType==WIKITYPE_UNKNOWN ) eType = wiki_page_type(zPageName);
switch( eType ){
case WIKITYPE_NORMAL: {
style_header("%s%s", zExtra, zPageName);
break;
}
case WIKITYPE_CHECKIN: {
|
| ︙ | |||
595 596 597 598 599 600 601 | 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 | - + |
safe_html_context(DOCSRC_WIKI);
wiki_render_by_mimetype(&wiki, zMimetype);
blob_reset(&wiki);
}
attachment_list(zPageName, "<hr /><h2>Attachments:</h2><ul>");
manifest_destroy(pWiki);
document_emit_js(/*for optional pikchr support*/);
|
| ︙ | |||
1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 | 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 | + |
}
}else{
if( !g.perm.RdWiki ){
login_needed(g.anon.RdWiki);
return;
}
}
style_set_current_feature("wiki");
style_header("Wiki Editor");
style_emit_noscript_for_js_page();
/* Status bar */
CX("<div id='fossil-status-bar' "
"title='Status message area. Double-click to clear them.'>"
"Status messages will go here.</div>\n"
|
| ︙ | |||
1342 1343 1344 1345 1346 1347 1348 | 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 | - + |
CX("P.loadPage(%!j);\n", zPageName);
}
CX("}catch(e){"
"fossil.error(e); console.error('Exception:',e);"
"}\n");
CX("});\n"/*fossil.onPageLoad()*/);
style_script_end();
|
| ︙ | |||
1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 | 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 | + - + |
return;
}
zName = PD("name","");
zMimetype = wiki_filter_mimetypes(P("mimetype"));
if( zName[0] && wiki_name_is_wellformed((const unsigned char *)zName) ){
cgi_redirectf("wikiedit?name=%T&mimetype=%s", zName, zMimetype);
}
style_set_current_feature("wiki");
style_header("Create A New Wiki Page");
wiki_standard_submenu(W_ALL_BUT(W_NEW));
@ <p>Rules for wiki page names:</p>
well_formed_wiki_name_rules();
form_begin(0, "%R/wikinew");
@ <p>Name of new wiki page:
@ <input style="width: 35;" type="text" name="name" value="%h(zName)" /><br />
@ %z(href("%R/markup_help"))Markup style</a>:
mimetype_option_menu("text/x-fossil-wiki");
@ <br /><input type="submit" value="Create" />
@ </p></form>
if( zName[0] ){
@ <p><span class="wikiError">
@ "%h(zName)" is not a valid wiki page name!</span></p>
}
|
| ︙ | |||
1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 | 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 | + |
cgi_redirectf("wiki?name=%T", zPageName);
}
if( P("cancel")!=0 ){
cgi_redirectf("wiki?name=%T", zPageName);
return;
}
style_set_current_page("%T?name=%T", g.zPath, zPageName);
style_set_current_feature("wiki");
style_header("Append Comment To: %s", zPageName);
if( !goodCaptcha ){
@ <p class="generalError">Error: Incorrect security code.</p>
}
if( P("preview")!=0 ){
Blob preview;
blob_zero(&preview);
|
| ︙ | |||
1542 1543 1544 1545 1546 1547 1548 | 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 | - + + - + |
@ rows="10" wrap="virtual">%h(PD("r",""))</textarea>
@ <br />
@ <input type="submit" name="preview" value="Preview Your Comment" />
@ <input type="submit" name="submit" value="Append Your Changes" />
@ <input type="submit" name="cancel" value="Cancel" />
captcha_generate(0);
@ </form>
|
| ︙ | |||
1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 | 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 | + - + |
@ "%z(href("%R/whistory?name=%s",pW1->zWikiTitle))%h(pW1->zWikiTitle)</a>"\
@ </h2>
}
nextRid = wiki_next(wiki_tagid(pW1->zWikiTitle),pW1->rDate);
if( nextRid ){
style_submenu_element("Next", "%R/wdiff?rid=%d", nextRid);
}
style_set_current_feature("wiki");
style_header("Changes To %s", pW1->zWikiTitle);
blob_zero(&d);
diffFlags = construct_diff_flags(1);
text_diff(&w2, &w1, &d, 0, diffFlags | DIFF_HTML | DIFF_LINENO);
@ <pre class="udiff">
@ %s(blob_str(&d))
@ <pre>
manifest_destroy(pW1);
manifest_destroy(pW2);
|
| ︙ | |||
1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 | 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 | + |
Stmt q;
double rNow;
int showAll = P("all")!=0;
int showRid = P("showid")!=0;
login_check_credentials();
if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
style_set_current_feature("wiki");
style_header("Available Wiki Pages");
if( showAll ){
style_submenu_element("Active", "%R/wcontent");
}else{
style_submenu_element("All", "%R/wcontent?all=1");
}
wiki_standard_submenu(W_ALL_BUT(W_LIST));
|
| ︙ | |||
1754 1755 1756 1757 1758 1759 1760 | 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 | - + + - + |
}
@ </tr>
fossil_free(zWDisplayName);
}
@ </tbody></table></div>
db_finalize(&q);
style_table_sorter();
|
| ︙ |
Changes to src/xfersetup.c.
| ︙ | |||
83 84 85 86 87 88 89 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | - + |
url_enable_proxy(0);
@ <pre class="xfersetup">
client_sync(syncFlags, 0, 0, 0);
@ </pre>
}
}
|
| ︙ | |||
114 115 116 117 118 119 120 121 122 123 124 125 126 127 | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | + |
cgi_redirect("xfersetup");
}
isSubmit = P("submit")!=0;
z = P("x");
if( z==0 ){
z = db_get(zDbField, zDfltValue);
}
style_set_current_feature("xfersetup");
style_header("Edit %s", zTitle);
if( P("clear")!=0 ){
login_verify_csrf_secret();
db_unset(zDbField, 0);
if( xRebuild ) xRebuild();
z = zDfltValue;
}else if( isSubmit ){
|
| ︙ | |||
148 149 150 151 152 153 154 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | - + |
if ( zDfltValue ){
@ <hr />
@ <h2>Default %s(zTitle)</h2>
@ <blockquote><pre>
@ %h(zDfltValue)
@ </pre></blockquote>
}
|
| ︙ |
Changes to src/zip.c.
| ︙ | |||
942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 | 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 | + - + - + |
blob_appendf(&cacheKey, "/%s/%z", g.zPath, rid_to_uuid(rid));
blob_appendf(&cacheKey, "/%q", zName);
if( zInclude ) blob_appendf(&cacheKey, ",in=%Q", zInclude);
if( zExclude ) blob_appendf(&cacheKey, ",ex=%Q", zExclude);
zKey = blob_str(&cacheKey);
etag_check(ETAG_HASH, zKey);
style_set_current_feature("zip");
if( P("debug")!=0 ){
style_header("%s Archive Generator Debug Screen", zType);
@ zName = "%h(zName)"<br />
@ rid = %d(rid)<br />
if( zInclude ){
@ zInclude = "%h(zInclude)"<br />
}
if( zExclude ){
@ zExclude = "%h(zExclude)"<br />
}
@ zKey = "%h(zKey)"
|
| ︙ |
Changes to www/customskin.md.
| ︙ | |||
82 83 84 85 86 87 88 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | - + + + + + + + + + + + + + |
<head>
<base href="..." />
<meta http-equiv="Content-Security-Policy" content="...." />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>....</title>
<link rel="stylesheet" href="..." type="text/css" />
</head>
|
| ︙ |