Fossil SCM

Rename the "style_body_and_footer()" interface to "style_finish_page()" and add a more detailed header comment to the implementation.

drh 2020-11-07 13:25 default-css-cleanups
Commit 942b2076c6a6198cb291b1b6162c89613ba360891e79616add3cd212c69179fe
+14 -14
--- src/alerts.c
+++ src/alerts.c
@@ -173,11 +173,11 @@
173173
*/
174174
static int alert_webpages_disabled(void){
175175
if( alert_tables_exist() ) return 0;
176176
style_header("Email Alerts Are Disabled");
177177
@ <p>Email alerts are disabled on this server</p>
178
- style_body_and_footer("alerts");
178
+ style_finish_page("alerts");
179179
return 1;
180180
}
181181
182182
/*
183183
** Insert a "Subscriber List" submenu link if the current user
@@ -308,11 +308,11 @@
308308
@ <hr>
309309
310310
@ <p><input type="submit" name="submit" value="Apply Changes" /></p>
311311
@ </div></form>
312312
db_end_transaction(0);
313
- style_body_and_footer("alerts");
313
+ style_finish_page("alerts");
314314
}
315315
316316
#if 0
317317
/*
318318
** Encode pMsg as MIME base64 and append it to pOut
@@ -1435,11 +1435,11 @@
14351435
@ <p>An email has been sent to "%h(zEAddr)". That email contains a
14361436
@ hyperlink that you must click to activate your
14371437
@ subscription.</p>
14381438
}
14391439
alert_sender_free(pSender);
1440
- style_body_and_footer("alerts");
1440
+ style_finish_page("alerts");
14411441
}
14421442
return;
14431443
}
14441444
style_header("Signup For Email Alerts");
14451445
if( P("submit")==0 ){
@@ -1552,11 +1552,11 @@
15521552
@ Enter the 8 characters above in the "Security Code" box<br/>
15531553
@ </td></tr></table></div>
15541554
}
15551555
@ </form>
15561556
fossil_free(zErr);
1557
- style_body_and_footer("alerts");
1557
+ style_finish_page("alerts");
15581558
}
15591559
15601560
/*
15611561
** Either shutdown or completely delete a subscription entry given
15621562
** by the hex value zName. Then paint a webpage that explains that
@@ -1590,11 +1590,11 @@
15901590
@ <a href="%R/setup_uedit?id=%d(uid)">edit or delete
15911591
@ the corresponding user "%h(zLogin)"</a></p>
15921592
}
15931593
}
15941594
db_finalize(&q);
1595
- style_body_and_footer("alerts");
1595
+ style_finish_page("alerts");
15961596
return;
15971597
}
15981598
15991599
/*
16001600
** WEBPAGE: alerts
@@ -1914,11 +1914,11 @@
19141914
@ </tr>
19151915
@ </table>
19161916
@ </form>
19171917
fossil_free(zErr);
19181918
db_finalize(&q);
1919
- style_body_and_footer("alerts");
1919
+ style_finish_page("alerts");
19201920
db_commit_transaction();
19211921
return;
19221922
}
19231923
19241924
/* This is the message that gets sent to describe how to change
@@ -2021,11 +2021,11 @@
20212021
}else{
20222022
@ <p>An email has been sent to "%h(zEAddr)" that explains how to
20232023
@ unsubscribe and/or modify your subscription settings</p>
20242024
}
20252025
alert_sender_free(pSender);
2026
- style_body_and_footer("alerts");
2026
+ style_finish_page("alerts");
20272027
return;
20282028
}
20292029
20302030
/* Non-logged-in users have to enter an email address to which is
20312031
** sent a message containing the unsubscribe link.
@@ -2071,11 +2071,11 @@
20712071
@ </pre>
20722072
@ Enter the 8 characters above in the "Security Code" box<br/>
20732073
@ </td></tr></table></div>
20742074
@ </form>
20752075
fossil_free(zErr);
2076
- style_body_and_footer("alerts");
2076
+ style_finish_page("alerts");
20772077
}
20782078
20792079
/*
20802080
** WEBPAGE: subscribers
20812081
**
@@ -2182,11 +2182,11 @@
21822182
@ </tr>
21832183
}
21842184
@ </tbody></table>
21852185
db_finalize(&q);
21862186
style_table_sorter();
2187
- style_body_and_footer("alerts");
2187
+ style_finish_page("alerts");
21882188
}
21892189
21902190
#if LOCAL_INTERFACE
21912191
/*
21922192
** A single event that might appear in an alert is recorded as an
@@ -2802,11 +2802,11 @@
28022802
28032803
login_check_credentials();
28042804
if( zAdminEmail==0 || zAdminEmail[0]==0 ){
28052805
style_header("Outbound Email Disabled");
28062806
@ <p>Outbound email is disabled on this repository
2807
- style_body_and_footer("alerts");
2807
+ style_finish_page("alerts");
28082808
return;
28092809
}
28102810
if( P("submit")!=0
28112811
&& P("subject")!=0
28122812
&& P("msg")!=0
@@ -2834,11 +2834,11 @@
28342834
}else{
28352835
@ <p>Your message has been sent to the repository administrator.
28362836
@ Thank you for your input.</p>
28372837
}
28382838
alert_sender_free(pSender);
2839
- style_body_and_footer("alerts");
2839
+ style_finish_page("alerts");
28402840
return;
28412841
}
28422842
if( captcha_needed() ){
28432843
uSeed = captcha_seed();
28442844
zDecoded = captcha_decode(uSeed);
@@ -2881,11 +2881,11 @@
28812881
@ </pre>
28822882
@ Enter the 8 characters above in the "Security Code" box<br/>
28832883
@ </td></tr></table></div>
28842884
}
28852885
@ </form>
2886
- style_body_and_footer("alerts");
2886
+ style_finish_page("alerts");
28872887
}
28882888
28892889
/*
28902890
** Send an annoucement message described by query parameter.
28912891
** Permission to do this has already been verified.
@@ -2989,11 +2989,11 @@
29892989
@ </pre></blockquote>
29902990
}else{
29912991
@ <p>The announcement has been sent.
29922992
@ <a href="%h(PD("REQUEST_URI","/"))">Send another</a></p>
29932993
}
2994
- style_body_and_footer("alerts");
2994
+ style_finish_page("alerts");
29952995
return;
29962996
} else if( !alert_enabled() ){
29972997
style_header("Cannot Send Announcement");
29982998
@ <p>Either you have no subscribers yet, or email alerts are not yet
29992999
@ <a href="https://fossil-scm.org/fossil/doc/trunk/www/alerts.md">set up</a>
@@ -3043,7 +3043,7 @@
30433043
@ <td><input type="submit" name="submit" value="Send Message">
30443044
}
30453045
@ </tr>
30463046
@ </table>
30473047
@ </form>
3048
- style_body_and_footer("alerts");
3048
+ style_finish_page("alerts");
30493049
}
30503050
--- src/alerts.c
+++ src/alerts.c
@@ -173,11 +173,11 @@
173 */
174 static int alert_webpages_disabled(void){
175 if( alert_tables_exist() ) return 0;
176 style_header("Email Alerts Are Disabled");
177 @ <p>Email alerts are disabled on this server</p>
178 style_body_and_footer("alerts");
179 return 1;
180 }
181
182 /*
183 ** Insert a "Subscriber List" submenu link if the current user
@@ -308,11 +308,11 @@
308 @ <hr>
309
310 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
311 @ </div></form>
312 db_end_transaction(0);
313 style_body_and_footer("alerts");
314 }
315
316 #if 0
317 /*
318 ** Encode pMsg as MIME base64 and append it to pOut
@@ -1435,11 +1435,11 @@
1435 @ <p>An email has been sent to "%h(zEAddr)". That email contains a
1436 @ hyperlink that you must click to activate your
1437 @ subscription.</p>
1438 }
1439 alert_sender_free(pSender);
1440 style_body_and_footer("alerts");
1441 }
1442 return;
1443 }
1444 style_header("Signup For Email Alerts");
1445 if( P("submit")==0 ){
@@ -1552,11 +1552,11 @@
1552 @ Enter the 8 characters above in the "Security Code" box<br/>
1553 @ </td></tr></table></div>
1554 }
1555 @ </form>
1556 fossil_free(zErr);
1557 style_body_and_footer("alerts");
1558 }
1559
1560 /*
1561 ** Either shutdown or completely delete a subscription entry given
1562 ** by the hex value zName. Then paint a webpage that explains that
@@ -1590,11 +1590,11 @@
1590 @ <a href="%R/setup_uedit?id=%d(uid)">edit or delete
1591 @ the corresponding user "%h(zLogin)"</a></p>
1592 }
1593 }
1594 db_finalize(&q);
1595 style_body_and_footer("alerts");
1596 return;
1597 }
1598
1599 /*
1600 ** WEBPAGE: alerts
@@ -1914,11 +1914,11 @@
1914 @ </tr>
1915 @ </table>
1916 @ </form>
1917 fossil_free(zErr);
1918 db_finalize(&q);
1919 style_body_and_footer("alerts");
1920 db_commit_transaction();
1921 return;
1922 }
1923
1924 /* This is the message that gets sent to describe how to change
@@ -2021,11 +2021,11 @@
2021 }else{
2022 @ <p>An email has been sent to "%h(zEAddr)" that explains how to
2023 @ unsubscribe and/or modify your subscription settings</p>
2024 }
2025 alert_sender_free(pSender);
2026 style_body_and_footer("alerts");
2027 return;
2028 }
2029
2030 /* Non-logged-in users have to enter an email address to which is
2031 ** sent a message containing the unsubscribe link.
@@ -2071,11 +2071,11 @@
2071 @ </pre>
2072 @ Enter the 8 characters above in the "Security Code" box<br/>
2073 @ </td></tr></table></div>
2074 @ </form>
2075 fossil_free(zErr);
2076 style_body_and_footer("alerts");
2077 }
2078
2079 /*
2080 ** WEBPAGE: subscribers
2081 **
@@ -2182,11 +2182,11 @@
2182 @ </tr>
2183 }
2184 @ </tbody></table>
2185 db_finalize(&q);
2186 style_table_sorter();
2187 style_body_and_footer("alerts");
2188 }
2189
2190 #if LOCAL_INTERFACE
2191 /*
2192 ** A single event that might appear in an alert is recorded as an
@@ -2802,11 +2802,11 @@
2802
2803 login_check_credentials();
2804 if( zAdminEmail==0 || zAdminEmail[0]==0 ){
2805 style_header("Outbound Email Disabled");
2806 @ <p>Outbound email is disabled on this repository
2807 style_body_and_footer("alerts");
2808 return;
2809 }
2810 if( P("submit")!=0
2811 && P("subject")!=0
2812 && P("msg")!=0
@@ -2834,11 +2834,11 @@
2834 }else{
2835 @ <p>Your message has been sent to the repository administrator.
2836 @ Thank you for your input.</p>
2837 }
2838 alert_sender_free(pSender);
2839 style_body_and_footer("alerts");
2840 return;
2841 }
2842 if( captcha_needed() ){
2843 uSeed = captcha_seed();
2844 zDecoded = captcha_decode(uSeed);
@@ -2881,11 +2881,11 @@
2881 @ </pre>
2882 @ Enter the 8 characters above in the "Security Code" box<br/>
2883 @ </td></tr></table></div>
2884 }
2885 @ </form>
2886 style_body_and_footer("alerts");
2887 }
2888
2889 /*
2890 ** Send an annoucement message described by query parameter.
2891 ** Permission to do this has already been verified.
@@ -2989,11 +2989,11 @@
2989 @ </pre></blockquote>
2990 }else{
2991 @ <p>The announcement has been sent.
2992 @ <a href="%h(PD("REQUEST_URI","/"))">Send another</a></p>
2993 }
2994 style_body_and_footer("alerts");
2995 return;
2996 } else if( !alert_enabled() ){
2997 style_header("Cannot Send Announcement");
2998 @ <p>Either you have no subscribers yet, or email alerts are not yet
2999 @ <a href="https://fossil-scm.org/fossil/doc/trunk/www/alerts.md">set up</a>
@@ -3043,7 +3043,7 @@
3043 @ <td><input type="submit" name="submit" value="Send Message">
3044 }
3045 @ </tr>
3046 @ </table>
3047 @ </form>
3048 style_body_and_footer("alerts");
3049 }
3050
--- src/alerts.c
+++ src/alerts.c
@@ -173,11 +173,11 @@
173 */
174 static int alert_webpages_disabled(void){
175 if( alert_tables_exist() ) return 0;
176 style_header("Email Alerts Are Disabled");
177 @ <p>Email alerts are disabled on this server</p>
178 style_finish_page("alerts");
179 return 1;
180 }
181
182 /*
183 ** Insert a "Subscriber List" submenu link if the current user
@@ -308,11 +308,11 @@
308 @ <hr>
309
310 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
311 @ </div></form>
312 db_end_transaction(0);
313 style_finish_page("alerts");
314 }
315
316 #if 0
317 /*
318 ** Encode pMsg as MIME base64 and append it to pOut
@@ -1435,11 +1435,11 @@
1435 @ <p>An email has been sent to "%h(zEAddr)". That email contains a
1436 @ hyperlink that you must click to activate your
1437 @ subscription.</p>
1438 }
1439 alert_sender_free(pSender);
1440 style_finish_page("alerts");
1441 }
1442 return;
1443 }
1444 style_header("Signup For Email Alerts");
1445 if( P("submit")==0 ){
@@ -1552,11 +1552,11 @@
1552 @ Enter the 8 characters above in the "Security Code" box<br/>
1553 @ </td></tr></table></div>
1554 }
1555 @ </form>
1556 fossil_free(zErr);
1557 style_finish_page("alerts");
1558 }
1559
1560 /*
1561 ** Either shutdown or completely delete a subscription entry given
1562 ** by the hex value zName. Then paint a webpage that explains that
@@ -1590,11 +1590,11 @@
1590 @ <a href="%R/setup_uedit?id=%d(uid)">edit or delete
1591 @ the corresponding user "%h(zLogin)"</a></p>
1592 }
1593 }
1594 db_finalize(&q);
1595 style_finish_page("alerts");
1596 return;
1597 }
1598
1599 /*
1600 ** WEBPAGE: alerts
@@ -1914,11 +1914,11 @@
1914 @ </tr>
1915 @ </table>
1916 @ </form>
1917 fossil_free(zErr);
1918 db_finalize(&q);
1919 style_finish_page("alerts");
1920 db_commit_transaction();
1921 return;
1922 }
1923
1924 /* This is the message that gets sent to describe how to change
@@ -2021,11 +2021,11 @@
2021 }else{
2022 @ <p>An email has been sent to "%h(zEAddr)" that explains how to
2023 @ unsubscribe and/or modify your subscription settings</p>
2024 }
2025 alert_sender_free(pSender);
2026 style_finish_page("alerts");
2027 return;
2028 }
2029
2030 /* Non-logged-in users have to enter an email address to which is
2031 ** sent a message containing the unsubscribe link.
@@ -2071,11 +2071,11 @@
2071 @ </pre>
2072 @ Enter the 8 characters above in the "Security Code" box<br/>
2073 @ </td></tr></table></div>
2074 @ </form>
2075 fossil_free(zErr);
2076 style_finish_page("alerts");
2077 }
2078
2079 /*
2080 ** WEBPAGE: subscribers
2081 **
@@ -2182,11 +2182,11 @@
2182 @ </tr>
2183 }
2184 @ </tbody></table>
2185 db_finalize(&q);
2186 style_table_sorter();
2187 style_finish_page("alerts");
2188 }
2189
2190 #if LOCAL_INTERFACE
2191 /*
2192 ** A single event that might appear in an alert is recorded as an
@@ -2802,11 +2802,11 @@
2802
2803 login_check_credentials();
2804 if( zAdminEmail==0 || zAdminEmail[0]==0 ){
2805 style_header("Outbound Email Disabled");
2806 @ <p>Outbound email is disabled on this repository
2807 style_finish_page("alerts");
2808 return;
2809 }
2810 if( P("submit")!=0
2811 && P("subject")!=0
2812 && P("msg")!=0
@@ -2834,11 +2834,11 @@
2834 }else{
2835 @ <p>Your message has been sent to the repository administrator.
2836 @ Thank you for your input.</p>
2837 }
2838 alert_sender_free(pSender);
2839 style_finish_page("alerts");
2840 return;
2841 }
2842 if( captcha_needed() ){
2843 uSeed = captcha_seed();
2844 zDecoded = captcha_decode(uSeed);
@@ -2881,11 +2881,11 @@
2881 @ </pre>
2882 @ Enter the 8 characters above in the "Security Code" box<br/>
2883 @ </td></tr></table></div>
2884 }
2885 @ </form>
2886 style_finish_page("alerts");
2887 }
2888
2889 /*
2890 ** Send an annoucement message described by query parameter.
2891 ** Permission to do this has already been verified.
@@ -2989,11 +2989,11 @@
2989 @ </pre></blockquote>
2990 }else{
2991 @ <p>The announcement has been sent.
2992 @ <a href="%h(PD("REQUEST_URI","/"))">Send another</a></p>
2993 }
2994 style_finish_page("alerts");
2995 return;
2996 } else if( !alert_enabled() ){
2997 style_header("Cannot Send Announcement");
2998 @ <p>Either you have no subscribers yet, or email alerts are not yet
2999 @ <a href="https://fossil-scm.org/fossil/doc/trunk/www/alerts.md">set up</a>
@@ -3043,7 +3043,7 @@
3043 @ <td><input type="submit" name="submit" value="Send Message">
3044 }
3045 @ </tr>
3046 @ </table>
3047 @ </form>
3048 style_finish_page("alerts");
3049 }
3050
+5 -5
--- src/attach.c
+++ src/attach.c
@@ -145,11 +145,11 @@
145145
hyperlink_to_date(zDate, ".");
146146
free(zUrlTail);
147147
}
148148
db_finalize(&q);
149149
@ </ol>
150
- style_body_and_footer("attach");
150
+ style_finish_page("attach");
151151
return;
152152
}
153153
154154
/*
155155
** WEBPAGE: attachdownload
@@ -205,16 +205,16 @@
205205
);
206206
}
207207
if( zUUID==0 || zUUID[0]==0 ){
208208
style_header("No Such Attachment");
209209
@ No such attachment....
210
- style_body_and_footer("attach");
210
+ style_finish_page("attach");
211211
return;
212212
}else if( zUUID[0]=='x' ){
213213
style_header("Missing");
214214
@ Attachment has been deleted
215
- style_body_and_footer("attach");
215
+ style_finish_page("attach");
216216
return;
217217
}else{
218218
g.perm.Read = 1;
219219
cgi_replace_parameter("name",zUUID);
220220
if( fossil_strcmp(g.zPath,"attachview")==0 ){
@@ -410,11 +410,11 @@
410410
@ <input type="submit" name="ok" value="Add Attachment" />
411411
@ <input type="submit" name="cancel" value="Cancel" />
412412
@ </div>
413413
captcha_generate(0);
414414
@ </form>
415
- style_body_and_footer("attach");
415
+ style_finish_page("attach");
416416
fossil_free(zTargetType);
417417
}
418418
419419
/*
420420
** WEBPAGE: ainfo
@@ -622,11 +622,11 @@
622622
@ <i>(file is %d(sz) bytes of binary data)</i>
623623
}
624624
@ </blockquote>
625625
manifest_destroy(pAttach);
626626
blob_reset(&attach);
627
- style_body_and_footer("attach");
627
+ style_finish_page("attach");
628628
}
629629
630630
/*
631631
** Output HTML to show a list of attachments.
632632
*/
633633
--- src/attach.c
+++ src/attach.c
@@ -145,11 +145,11 @@
145 hyperlink_to_date(zDate, ".");
146 free(zUrlTail);
147 }
148 db_finalize(&q);
149 @ </ol>
150 style_body_and_footer("attach");
151 return;
152 }
153
154 /*
155 ** WEBPAGE: attachdownload
@@ -205,16 +205,16 @@
205 );
206 }
207 if( zUUID==0 || zUUID[0]==0 ){
208 style_header("No Such Attachment");
209 @ No such attachment....
210 style_body_and_footer("attach");
211 return;
212 }else if( zUUID[0]=='x' ){
213 style_header("Missing");
214 @ Attachment has been deleted
215 style_body_and_footer("attach");
216 return;
217 }else{
218 g.perm.Read = 1;
219 cgi_replace_parameter("name",zUUID);
220 if( fossil_strcmp(g.zPath,"attachview")==0 ){
@@ -410,11 +410,11 @@
410 @ <input type="submit" name="ok" value="Add Attachment" />
411 @ <input type="submit" name="cancel" value="Cancel" />
412 @ </div>
413 captcha_generate(0);
414 @ </form>
415 style_body_and_footer("attach");
416 fossil_free(zTargetType);
417 }
418
419 /*
420 ** WEBPAGE: ainfo
@@ -622,11 +622,11 @@
622 @ <i>(file is %d(sz) bytes of binary data)</i>
623 }
624 @ </blockquote>
625 manifest_destroy(pAttach);
626 blob_reset(&attach);
627 style_body_and_footer("attach");
628 }
629
630 /*
631 ** Output HTML to show a list of attachments.
632 */
633
--- src/attach.c
+++ src/attach.c
@@ -145,11 +145,11 @@
145 hyperlink_to_date(zDate, ".");
146 free(zUrlTail);
147 }
148 db_finalize(&q);
149 @ </ol>
150 style_finish_page("attach");
151 return;
152 }
153
154 /*
155 ** WEBPAGE: attachdownload
@@ -205,16 +205,16 @@
205 );
206 }
207 if( zUUID==0 || zUUID[0]==0 ){
208 style_header("No Such Attachment");
209 @ No such attachment....
210 style_finish_page("attach");
211 return;
212 }else if( zUUID[0]=='x' ){
213 style_header("Missing");
214 @ Attachment has been deleted
215 style_finish_page("attach");
216 return;
217 }else{
218 g.perm.Read = 1;
219 cgi_replace_parameter("name",zUUID);
220 if( fossil_strcmp(g.zPath,"attachview")==0 ){
@@ -410,11 +410,11 @@
410 @ <input type="submit" name="ok" value="Add Attachment" />
411 @ <input type="submit" name="cancel" value="Cancel" />
412 @ </div>
413 captcha_generate(0);
414 @ </form>
415 style_finish_page("attach");
416 fossil_free(zTargetType);
417 }
418
419 /*
420 ** WEBPAGE: ainfo
@@ -622,11 +622,11 @@
622 @ <i>(file is %d(sz) bytes of binary data)</i>
623 }
624 @ </blockquote>
625 manifest_destroy(pAttach);
626 blob_reset(&attach);
627 style_finish_page("attach");
628 }
629
630 /*
631 ** Output HTML to show a list of attachments.
632 */
633
+2 -2
--- src/backlink.c
+++ src/backlink.c
@@ -91,11 +91,11 @@
9191
blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
9292
db_prepare(&q, "%s", blob_sql_text(&sql));
9393
www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
9494
0, 0, 0, 0, 0, 0);
9595
db_finalize(&q);
96
- style_body_and_footer("test");
96
+ style_finish_page("test");
9797
}
9898
9999
/*
100100
** WEBPAGE: test-backlinks
101101
**
@@ -152,11 +152,11 @@
152152
@ <td>%h(zMtime)</tr>
153153
}
154154
@ </tbody>
155155
@ </table>
156156
db_finalize(&q);
157
- style_body_and_footer("test");
157
+ style_finish_page("test");
158158
}
159159
160160
/*
161161
** Remove all prior backlinks for the wiki page given. Then
162162
** add new backlinks for the latest version of the wiki page.
163163
--- src/backlink.c
+++ src/backlink.c
@@ -91,11 +91,11 @@
91 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
92 db_prepare(&q, "%s", blob_sql_text(&sql));
93 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
94 0, 0, 0, 0, 0, 0);
95 db_finalize(&q);
96 style_body_and_footer("test");
97 }
98
99 /*
100 ** WEBPAGE: test-backlinks
101 **
@@ -152,11 +152,11 @@
152 @ <td>%h(zMtime)</tr>
153 }
154 @ </tbody>
155 @ </table>
156 db_finalize(&q);
157 style_body_and_footer("test");
158 }
159
160 /*
161 ** Remove all prior backlinks for the wiki page given. Then
162 ** add new backlinks for the latest version of the wiki page.
163
--- src/backlink.c
+++ src/backlink.c
@@ -91,11 +91,11 @@
91 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
92 db_prepare(&q, "%s", blob_sql_text(&sql));
93 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
94 0, 0, 0, 0, 0, 0);
95 db_finalize(&q);
96 style_finish_page("test");
97 }
98
99 /*
100 ** WEBPAGE: test-backlinks
101 **
@@ -152,11 +152,11 @@
152 @ <td>%h(zMtime)</tr>
153 }
154 @ </tbody>
155 @ </table>
156 db_finalize(&q);
157 style_finish_page("test");
158 }
159
160 /*
161 ** Remove all prior backlinks for the wiki page given. Then
162 ** add new backlinks for the latest version of the wiki page.
163
+3 -3
--- src/branch.c
+++ src/branch.c
@@ -514,11 +514,11 @@
514514
@ </tr>
515515
}
516516
@ </tbody></table></div>
517517
db_finalize(&q);
518518
style_table_sorter();
519
- style_body_and_footer("branch");
519
+ style_finish_page("branch");
520520
}
521521
522522
/*
523523
** WEBPAGE: brlist
524524
** Show a list of branches. With no query parameters, a sortable table
@@ -622,11 +622,11 @@
622622
}
623623
if( cnt ){
624624
@ </ul>
625625
}
626626
db_finalize(&q);
627
- style_body_and_footer("branch");
627
+ style_finish_page("branch");
628628
}
629629
630630
/*
631631
** This routine is called while for each check-in that is rendered by
632632
** the timeline of a "brlist" page. Add some additional hyperlinks
@@ -698,7 +698,7 @@
698698
if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH;
699699
if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR;
700700
if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR;
701701
www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, brtimeline_extra);
702702
db_finalize(&q);
703
- style_body_and_footer("branch");
703
+ style_finish_page("branch");
704704
}
705705
--- src/branch.c
+++ src/branch.c
@@ -514,11 +514,11 @@
514 @ </tr>
515 }
516 @ </tbody></table></div>
517 db_finalize(&q);
518 style_table_sorter();
519 style_body_and_footer("branch");
520 }
521
522 /*
523 ** WEBPAGE: brlist
524 ** Show a list of branches. With no query parameters, a sortable table
@@ -622,11 +622,11 @@
622 }
623 if( cnt ){
624 @ </ul>
625 }
626 db_finalize(&q);
627 style_body_and_footer("branch");
628 }
629
630 /*
631 ** This routine is called while for each check-in that is rendered by
632 ** the timeline of a "brlist" page. Add some additional hyperlinks
@@ -698,7 +698,7 @@
698 if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH;
699 if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR;
700 if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR;
701 www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, brtimeline_extra);
702 db_finalize(&q);
703 style_body_and_footer("branch");
704 }
705
--- src/branch.c
+++ src/branch.c
@@ -514,11 +514,11 @@
514 @ </tr>
515 }
516 @ </tbody></table></div>
517 db_finalize(&q);
518 style_table_sorter();
519 style_finish_page("branch");
520 }
521
522 /*
523 ** WEBPAGE: brlist
524 ** Show a list of branches. With no query parameters, a sortable table
@@ -622,11 +622,11 @@
622 }
623 if( cnt ){
624 @ </ul>
625 }
626 db_finalize(&q);
627 style_finish_page("branch");
628 }
629
630 /*
631 ** This routine is called while for each check-in that is rendered by
632 ** the timeline of a "brlist" page. Add some additional hyperlinks
@@ -698,7 +698,7 @@
698 if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH;
699 if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR;
700 if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR;
701 www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, brtimeline_extra);
702 db_finalize(&q);
703 style_finish_page("branch");
704 }
705
+4 -4
--- src/browse.c
+++ src/browse.c
@@ -336,11 +336,11 @@
336336
337337
/* If the "noreadme" query parameter is present, do not try to
338338
** show the content of the README file.
339339
*/
340340
if( P("noreadme")!=0 ){
341
- style_body_and_footer("dir");
341
+ style_finish_page("dir");
342342
return;
343343
}
344344
345345
/* If the directory contains a readme file, then display its content below
346346
** the list of files
@@ -397,11 +397,11 @@
397397
document_emit_js();
398398
}
399399
}
400400
}
401401
db_finalize(&q);
402
- style_body_and_footer("dir");
402
+ style_finish_page("dir");
403403
}
404404
405405
/*
406406
** Objects used by the "tree" webpage.
407407
*/
@@ -913,11 +913,11 @@
913913
}
914914
}
915915
@ </ul>
916916
@ </ul></div>
917917
builtin_request_js("tree.js");
918
- style_body_and_footer("tree");
918
+ style_finish_page("tree");
919919
920920
/* We could free memory used by sTree here if we needed to. But
921921
** the process is about to exit, so doing so would not really accomplish
922922
** anything useful. */
923923
}
@@ -1167,7 +1167,7 @@
11671167
fossil_free(zAge);
11681168
}
11691169
@ </table></div>
11701170
db_finalize(&q1);
11711171
db_finalize(&q2);
1172
- style_body_and_footer("fileage");
1172
+ style_finish_page("fileage");
11731173
}
11741174
--- src/browse.c
+++ src/browse.c
@@ -336,11 +336,11 @@
336
337 /* If the "noreadme" query parameter is present, do not try to
338 ** show the content of the README file.
339 */
340 if( P("noreadme")!=0 ){
341 style_body_and_footer("dir");
342 return;
343 }
344
345 /* If the directory contains a readme file, then display its content below
346 ** the list of files
@@ -397,11 +397,11 @@
397 document_emit_js();
398 }
399 }
400 }
401 db_finalize(&q);
402 style_body_and_footer("dir");
403 }
404
405 /*
406 ** Objects used by the "tree" webpage.
407 */
@@ -913,11 +913,11 @@
913 }
914 }
915 @ </ul>
916 @ </ul></div>
917 builtin_request_js("tree.js");
918 style_body_and_footer("tree");
919
920 /* We could free memory used by sTree here if we needed to. But
921 ** the process is about to exit, so doing so would not really accomplish
922 ** anything useful. */
923 }
@@ -1167,7 +1167,7 @@
1167 fossil_free(zAge);
1168 }
1169 @ </table></div>
1170 db_finalize(&q1);
1171 db_finalize(&q2);
1172 style_body_and_footer("fileage");
1173 }
1174
--- src/browse.c
+++ src/browse.c
@@ -336,11 +336,11 @@
336
337 /* If the "noreadme" query parameter is present, do not try to
338 ** show the content of the README file.
339 */
340 if( P("noreadme")!=0 ){
341 style_finish_page("dir");
342 return;
343 }
344
345 /* If the directory contains a readme file, then display its content below
346 ** the list of files
@@ -397,11 +397,11 @@
397 document_emit_js();
398 }
399 }
400 }
401 db_finalize(&q);
402 style_finish_page("dir");
403 }
404
405 /*
406 ** Objects used by the "tree" webpage.
407 */
@@ -913,11 +913,11 @@
913 }
914 }
915 @ </ul>
916 @ </ul></div>
917 builtin_request_js("tree.js");
918 style_finish_page("tree");
919
920 /* We could free memory used by sTree here if we needed to. But
921 ** the process is about to exit, so doing so would not really accomplish
922 ** anything useful. */
923 }
@@ -1167,7 +1167,7 @@
1167 fossil_free(zAge);
1168 }
1169 @ </table></div>
1170 db_finalize(&q1);
1171 db_finalize(&q2);
1172 style_finish_page("fileage");
1173 }
1174
+1 -1
--- src/builtin.c
+++ src/builtin.c
@@ -103,11 +103,11 @@
103103
char *zUrl = href("%R/builtin?name=%T&id=%.8s&mimetype=text/plain",
104104
z,fossil_exe_id());
105105
@ <li>%z(zUrl)%h(z)</a>
106106
}
107107
@ </ol>
108
- style_body_and_footer("test");
108
+ style_finish_page("test");
109109
}
110110
111111
/*
112112
** COMMAND: test-builtin-get
113113
**
114114
--- src/builtin.c
+++ src/builtin.c
@@ -103,11 +103,11 @@
103 char *zUrl = href("%R/builtin?name=%T&id=%.8s&mimetype=text/plain",
104 z,fossil_exe_id());
105 @ <li>%z(zUrl)%h(z)</a>
106 }
107 @ </ol>
108 style_body_and_footer("test");
109 }
110
111 /*
112 ** COMMAND: test-builtin-get
113 **
114
--- src/builtin.c
+++ src/builtin.c
@@ -103,11 +103,11 @@
103 char *zUrl = href("%R/builtin?name=%T&id=%.8s&mimetype=text/plain",
104 z,fossil_exe_id());
105 @ <li>%z(zUrl)%h(z)</a>
106 }
107 @ </ol>
108 style_finish_page("test");
109 }
110
111 /*
112 ** COMMAND: test-builtin-get
113 **
114
+2 -2
--- src/cache.c
+++ src/cache.c
@@ -384,11 +384,11 @@
384384
@ <p>cache-file name: %h(zDbName)</p>
385385
@ <p>cache-file size: %s(zBuf)</p>
386386
fossil_free(zDbName);
387387
sqlite3_close(db);
388388
}
389
- style_body_and_footer("cache");
389
+ style_finish_page("cache");
390390
}
391391
392392
/*
393393
** WEBPAGE: cacheget
394394
**
@@ -407,11 +407,11 @@
407407
zKey = PD("key","");
408408
blob_zero(&content);
409409
if( cache_read(&content, zKey)==0 ){
410410
style_header("Cache Download Error");
411411
@ The cache does not contain any entry with this key: "%h(zKey)"
412
- style_body_and_footer("cache");
412
+ style_finish_page("cache");
413413
return;
414414
}
415415
cgi_set_content(&content);
416416
cgi_set_content_type("application/x-compressed");
417417
}
418418
--- src/cache.c
+++ src/cache.c
@@ -384,11 +384,11 @@
384 @ <p>cache-file name: %h(zDbName)</p>
385 @ <p>cache-file size: %s(zBuf)</p>
386 fossil_free(zDbName);
387 sqlite3_close(db);
388 }
389 style_body_and_footer("cache");
390 }
391
392 /*
393 ** WEBPAGE: cacheget
394 **
@@ -407,11 +407,11 @@
407 zKey = PD("key","");
408 blob_zero(&content);
409 if( cache_read(&content, zKey)==0 ){
410 style_header("Cache Download Error");
411 @ The cache does not contain any entry with this key: "%h(zKey)"
412 style_body_and_footer("cache");
413 return;
414 }
415 cgi_set_content(&content);
416 cgi_set_content_type("application/x-compressed");
417 }
418
--- src/cache.c
+++ src/cache.c
@@ -384,11 +384,11 @@
384 @ <p>cache-file name: %h(zDbName)</p>
385 @ <p>cache-file size: %s(zBuf)</p>
386 fossil_free(zDbName);
387 sqlite3_close(db);
388 }
389 style_finish_page("cache");
390 }
391
392 /*
393 ** WEBPAGE: cacheget
394 **
@@ -407,11 +407,11 @@
407 zKey = PD("key","");
408 blob_zero(&content);
409 if( cache_read(&content, zKey)==0 ){
410 style_header("Cache Download Error");
411 @ The cache does not contain any entry with this key: "%h(zKey)"
412 style_finish_page("cache");
413 return;
414 }
415 cgi_set_content(&content);
416 cgi_set_content_type("application/x-compressed");
417 }
418
+2 -2
--- src/captcha.c
+++ src/captcha.c
@@ -590,11 +590,11 @@
590590
}
591591
style_header("Captcha Test");
592592
@ <pre>
593593
@ %s(captcha_render(zPw))
594594
@ </pre>
595
- style_body_and_footer("test");
595
+ style_finish_page("test");
596596
}
597597
598598
/*
599599
** Check to see if the current request is coming from an agent that might
600600
** be a spider. If the agent is not a spider, then return 0 without doing
@@ -627,11 +627,11 @@
627627
@ <form method='POST' action='%s(g.zPath)'>
628628
cgi_query_parameters_to_hidden();
629629
@ <p>Please demonstrate that you are human, not a spider or robot</p>
630630
captcha_generate(1);
631631
@ </form>
632
- style_body_and_footer("captcha");
632
+ style_finish_page("captcha");
633633
return 1;
634634
}
635635
636636
/*
637637
** Generate a WAV file that reads aloud the hex digits given by
638638
--- src/captcha.c
+++ src/captcha.c
@@ -590,11 +590,11 @@
590 }
591 style_header("Captcha Test");
592 @ <pre>
593 @ %s(captcha_render(zPw))
594 @ </pre>
595 style_body_and_footer("test");
596 }
597
598 /*
599 ** Check to see if the current request is coming from an agent that might
600 ** be a spider. If the agent is not a spider, then return 0 without doing
@@ -627,11 +627,11 @@
627 @ <form method='POST' action='%s(g.zPath)'>
628 cgi_query_parameters_to_hidden();
629 @ <p>Please demonstrate that you are human, not a spider or robot</p>
630 captcha_generate(1);
631 @ </form>
632 style_body_and_footer("captcha");
633 return 1;
634 }
635
636 /*
637 ** Generate a WAV file that reads aloud the hex digits given by
638
--- src/captcha.c
+++ src/captcha.c
@@ -590,11 +590,11 @@
590 }
591 style_header("Captcha Test");
592 @ <pre>
593 @ %s(captcha_render(zPw))
594 @ </pre>
595 style_finish_page("test");
596 }
597
598 /*
599 ** Check to see if the current request is coming from an agent that might
600 ** be a spider. If the agent is not a spider, then return 0 without doing
@@ -627,11 +627,11 @@
627 @ <form method='POST' action='%s(g.zPath)'>
628 cgi_query_parameters_to_hidden();
629 @ <p>Please demonstrate that you are human, not a spider or robot</p>
630 captcha_generate(1);
631 @ </form>
632 style_finish_page("captcha");
633 return 1;
634 }
635
636 /*
637 ** Generate a WAV file that reads aloud the hex digits given by
638
+1 -1
--- src/clone.c
+++ src/clone.c
@@ -406,7 +406,7 @@
406406
@ <p>Clone the repository using this command:
407407
@ <blockquote><pre>
408408
@ fossil clone %s(g.zBaseURL) %h(zNm).fossil
409409
@ </pre></blockquote>
410410
}
411
- style_body_and_footer("download");
411
+ style_finish_page("download");
412412
}
413413
--- src/clone.c
+++ src/clone.c
@@ -406,7 +406,7 @@
406 @ <p>Clone the repository using this command:
407 @ <blockquote><pre>
408 @ fossil clone %s(g.zBaseURL) %h(zNm).fossil
409 @ </pre></blockquote>
410 }
411 style_body_and_footer("download");
412 }
413
--- src/clone.c
+++ src/clone.c
@@ -406,7 +406,7 @@
406 @ <p>Clone the repository using this command:
407 @ <blockquote><pre>
408 @ fossil clone %s(g.zBaseURL) %h(zNm).fossil
409 @ </pre></blockquote>
410 }
411 style_finish_page("download");
412 }
413
+1 -1
--- src/cookies.c
+++ src/cookies.c
@@ -225,7 +225,7 @@
225225
@ <li>Raw cookie value: "%h(PD("fossil_display_settings",""))"
226226
for(i=0; i<cookies.nParam; i++){
227227
@ <li>%h(cookies.aParam[i].zPName): "%h(cookies.aParam[i].zPValue)"
228228
}
229229
@ </ul>
230
- style_body_and_footer("cookies");
230
+ style_finish_page("cookies");
231231
}
232232
--- src/cookies.c
+++ src/cookies.c
@@ -225,7 +225,7 @@
225 @ <li>Raw cookie value: "%h(PD("fossil_display_settings",""))"
226 for(i=0; i<cookies.nParam; i++){
227 @ <li>%h(cookies.aParam[i].zPName): "%h(cookies.aParam[i].zPValue)"
228 }
229 @ </ul>
230 style_body_and_footer("cookies");
231 }
232
--- src/cookies.c
+++ src/cookies.c
@@ -225,7 +225,7 @@
225 @ <li>Raw cookie value: "%h(PD("fossil_display_settings",""))"
226 for(i=0; i<cookies.nParam; i++){
227 @ <li>%h(cookies.aParam[i].zPName): "%h(cookies.aParam[i].zPValue)"
228 }
229 @ </ul>
230 style_finish_page("cookies");
231 }
232
--- src/descendants.c
+++ src/descendants.c
@@ -613,11 +613,11 @@
613613
if( fBrBg ) tmFlags |= TIMELINE_BRCOLOR;
614614
if( fUBg ) tmFlags |= TIMELINE_UCOLOR;
615615
www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, 0);
616616
db_finalize(&q);
617617
@ <br />
618
- style_body_and_footer("leaves");
618
+ style_finish_page("leaves");
619619
}
620620
621621
#if INTERFACE
622622
/* Flag parameters to compute_uses_file() */
623623
#define USESFILE_DELETE 0x01 /* Include the check-ins where file deleted */
624624
--- src/descendants.c
+++ src/descendants.c
@@ -613,11 +613,11 @@
613 if( fBrBg ) tmFlags |= TIMELINE_BRCOLOR;
614 if( fUBg ) tmFlags |= TIMELINE_UCOLOR;
615 www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, 0);
616 db_finalize(&q);
617 @ <br />
618 style_body_and_footer("leaves");
619 }
620
621 #if INTERFACE
622 /* Flag parameters to compute_uses_file() */
623 #define USESFILE_DELETE 0x01 /* Include the check-ins where file deleted */
624
--- src/descendants.c
+++ src/descendants.c
@@ -613,11 +613,11 @@
613 if( fBrBg ) tmFlags |= TIMELINE_BRCOLOR;
614 if( fUBg ) tmFlags |= TIMELINE_UCOLOR;
615 www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, 0);
616 db_finalize(&q);
617 @ <br />
618 style_finish_page("leaves");
619 }
620
621 #if INTERFACE
622 /* Flag parameters to compute_uses_file() */
623 #define USESFILE_DELETE 0x01 /* Include the check-ins where file deleted */
624
+1 -1
--- src/diff.c
+++ src/diff.c
@@ -2556,11 +2556,11 @@
25562556
}
25572557
@ %s(zPrefix) %h(z)
25582558
25592559
}
25602560
@ </pre>
2561
- style_body_and_footer("annotate");
2561
+ style_finish_page("annotate");
25622562
}
25632563
25642564
/*
25652565
** COMMAND: annotate
25662566
** COMMAND: blame
25672567
--- src/diff.c
+++ src/diff.c
@@ -2556,11 +2556,11 @@
2556 }
2557 @ %s(zPrefix) %h(z)
2558
2559 }
2560 @ </pre>
2561 style_body_and_footer("annotate");
2562 }
2563
2564 /*
2565 ** COMMAND: annotate
2566 ** COMMAND: blame
2567
--- src/diff.c
+++ src/diff.c
@@ -2556,11 +2556,11 @@
2556 }
2557 @ %s(zPrefix) %h(z)
2558
2559 }
2560 @ </pre>
2561 style_finish_page("annotate");
2562 }
2563
2564 /*
2565 ** COMMAND: annotate
2566 ** COMMAND: blame
2567
+2 -2
--- src/dispatch.c
+++ src/dispatch.c
@@ -850,11 +850,11 @@
850850
}
851851
}
852852
@ </ul></div>
853853
854854
}
855
- style_body_and_footer("help");
855
+ style_finish_page("help");
856856
}
857857
858858
/*
859859
** WEBPAGE: test-all-help
860860
**
@@ -901,11 +901,11 @@
901901
help_to_html(aCommand[i].zHelp, cgi_output_blob());
902902
@ </dd>
903903
}
904904
@ </dl>
905905
blob_reset(&buf);
906
- style_body_and_footer("help");
906
+ style_finish_page("help");
907907
}
908908
909909
static void multi_column_list(const char **azWord, int nWord){
910910
int i, j, len;
911911
int mxLen = 0;
912912
--- src/dispatch.c
+++ src/dispatch.c
@@ -850,11 +850,11 @@
850 }
851 }
852 @ </ul></div>
853
854 }
855 style_body_and_footer("help");
856 }
857
858 /*
859 ** WEBPAGE: test-all-help
860 **
@@ -901,11 +901,11 @@
901 help_to_html(aCommand[i].zHelp, cgi_output_blob());
902 @ </dd>
903 }
904 @ </dl>
905 blob_reset(&buf);
906 style_body_and_footer("help");
907 }
908
909 static void multi_column_list(const char **azWord, int nWord){
910 int i, j, len;
911 int mxLen = 0;
912
--- src/dispatch.c
+++ src/dispatch.c
@@ -850,11 +850,11 @@
850 }
851 }
852 @ </ul></div>
853
854 }
855 style_finish_page("help");
856 }
857
858 /*
859 ** WEBPAGE: test-all-help
860 **
@@ -901,11 +901,11 @@
901 help_to_html(aCommand[i].zHelp, cgi_output_blob());
902 @ </dd>
903 }
904 @ </dl>
905 blob_reset(&buf);
906 style_finish_page("help");
907 }
908
909 static void multi_column_list(const char **azWord, int nWord){
910 int i, j, len;
911 int mxLen = 0;
912
+9 -9
--- src/doc.c
+++ src/doc.c
@@ -555,11 +555,11 @@
555555
}
556556
@ <tr><td>%s(zFlag)%h(aMime[i].zSuffix)<td>%h(aMime[i].zMimetype)</tr>
557557
}
558558
@ </tbody></table>
559559
style_table_sorter();
560
- style_body_and_footer("mimetypes");
560
+ style_finish_page("mimetypes");
561561
}
562562
563563
/*
564564
** Check to see if the file in the pContent blob is "embedded HTML". Return
565565
** true if it is, and fill pTitle with the document title.
@@ -770,11 +770,11 @@
770770
}else{
771771
style_header("%s", zDefaultTitle);
772772
wiki_convert(pBody, 0, WIKI_BUTTONS);
773773
}
774774
document_emit_js();
775
- style_body_and_footer("doc");
775
+ style_finish_page("doc");
776776
}else if( fossil_strcmp(zMime, "text/x-markdown")==0 ){
777777
Blob tail = BLOB_INITIALIZER;
778778
markdown_to_html(pBody, &title, &tail);
779779
if( blob_size(&title)>0 ){
780780
style_header("%s", blob_str(&title));
@@ -781,30 +781,30 @@
781781
}else{
782782
style_header("%s", zDefaultTitle);
783783
}
784784
convert_href_and_output(&tail);
785785
document_emit_js();
786
- style_body_and_footer("doc");
786
+ style_finish_page("doc");
787787
}else if( fossil_strcmp(zMime, "text/plain")==0 ){
788788
style_header("%s", zDefaultTitle);
789789
@ <blockquote><pre>
790790
@ %h(blob_str(pBody))
791791
@ </pre></blockquote>
792792
document_emit_js();
793
- style_body_and_footer("doc");
793
+ style_finish_page("doc");
794794
}else if( fossil_strcmp(zMime, "text/html")==0
795795
&& doc_is_embedded_html(pBody, &title) ){
796796
if( blob_size(&title)==0 ) blob_append(&title,zFilename,-1);
797797
style_header("%s", blob_str(&title));
798798
convert_href_and_output(pBody);
799799
document_emit_js();
800
- style_body_and_footer("doc");
800
+ style_finish_page("doc");
801801
}else if( fossil_strcmp(zMime, "text/x-pikchr")==0 ){
802802
style_adunit_config(ADUNIT_RIGHT_OK);
803803
style_header("%s", zDefaultTitle);
804804
wiki_render_by_mimetype(pBody, zMime);
805
- style_body_and_footer("doc");
805
+ style_finish_page("doc");
806806
#ifdef FOSSIL_ENABLE_TH1_DOCS
807807
}else if( Th_AreDocsEnabled() &&
808808
fossil_strcmp(zMime, "application/x-th1")==0 ){
809809
int raw = P("raw")!=0;
810810
if( !raw ){
@@ -821,11 +821,11 @@
821821
}else{
822822
Th_Render(blob_str(pBody));
823823
}
824824
if( !raw ){
825825
document_emit_js();
826
- style_body_and_footer("doc");
826
+ style_finish_page("doc");
827827
}
828828
#endif
829829
}else{
830830
fossil_free(style_csp(1));
831831
cgi_set_content_type(zMime);
@@ -1029,11 +1029,11 @@
10291029
style_header("Not Found");
10301030
@ <p>Document %h(zOrigName) not found
10311031
if( fossil_strcmp(zCheckin,"ckout")!=0 ){
10321032
@ in %z(href("%R/tree?ci=%T",zCheckin))%h(zCheckin)</a>
10331033
}
1034
- style_body_and_footer("doc");
1034
+ style_finish_page("doc");
10351035
return;
10361036
}
10371037
10381038
/*
10391039
** The default logo.
@@ -1202,7 +1202,7 @@
12021202
*/
12031203
void doc_search_page(void){
12041204
login_check_credentials();
12051205
style_header("Document Search");
12061206
search_screen(SRCH_DOC, 0);
1207
- style_body_and_footer("docsrch");
1207
+ style_finish_page("docsrch");
12081208
}
12091209
--- src/doc.c
+++ src/doc.c
@@ -555,11 +555,11 @@
555 }
556 @ <tr><td>%s(zFlag)%h(aMime[i].zSuffix)<td>%h(aMime[i].zMimetype)</tr>
557 }
558 @ </tbody></table>
559 style_table_sorter();
560 style_body_and_footer("mimetypes");
561 }
562
563 /*
564 ** Check to see if the file in the pContent blob is "embedded HTML". Return
565 ** true if it is, and fill pTitle with the document title.
@@ -770,11 +770,11 @@
770 }else{
771 style_header("%s", zDefaultTitle);
772 wiki_convert(pBody, 0, WIKI_BUTTONS);
773 }
774 document_emit_js();
775 style_body_and_footer("doc");
776 }else if( fossil_strcmp(zMime, "text/x-markdown")==0 ){
777 Blob tail = BLOB_INITIALIZER;
778 markdown_to_html(pBody, &title, &tail);
779 if( blob_size(&title)>0 ){
780 style_header("%s", blob_str(&title));
@@ -781,30 +781,30 @@
781 }else{
782 style_header("%s", zDefaultTitle);
783 }
784 convert_href_and_output(&tail);
785 document_emit_js();
786 style_body_and_footer("doc");
787 }else if( fossil_strcmp(zMime, "text/plain")==0 ){
788 style_header("%s", zDefaultTitle);
789 @ <blockquote><pre>
790 @ %h(blob_str(pBody))
791 @ </pre></blockquote>
792 document_emit_js();
793 style_body_and_footer("doc");
794 }else if( fossil_strcmp(zMime, "text/html")==0
795 && doc_is_embedded_html(pBody, &title) ){
796 if( blob_size(&title)==0 ) blob_append(&title,zFilename,-1);
797 style_header("%s", blob_str(&title));
798 convert_href_and_output(pBody);
799 document_emit_js();
800 style_body_and_footer("doc");
801 }else if( fossil_strcmp(zMime, "text/x-pikchr")==0 ){
802 style_adunit_config(ADUNIT_RIGHT_OK);
803 style_header("%s", zDefaultTitle);
804 wiki_render_by_mimetype(pBody, zMime);
805 style_body_and_footer("doc");
806 #ifdef FOSSIL_ENABLE_TH1_DOCS
807 }else if( Th_AreDocsEnabled() &&
808 fossil_strcmp(zMime, "application/x-th1")==0 ){
809 int raw = P("raw")!=0;
810 if( !raw ){
@@ -821,11 +821,11 @@
821 }else{
822 Th_Render(blob_str(pBody));
823 }
824 if( !raw ){
825 document_emit_js();
826 style_body_and_footer("doc");
827 }
828 #endif
829 }else{
830 fossil_free(style_csp(1));
831 cgi_set_content_type(zMime);
@@ -1029,11 +1029,11 @@
1029 style_header("Not Found");
1030 @ <p>Document %h(zOrigName) not found
1031 if( fossil_strcmp(zCheckin,"ckout")!=0 ){
1032 @ in %z(href("%R/tree?ci=%T",zCheckin))%h(zCheckin)</a>
1033 }
1034 style_body_and_footer("doc");
1035 return;
1036 }
1037
1038 /*
1039 ** The default logo.
@@ -1202,7 +1202,7 @@
1202 */
1203 void doc_search_page(void){
1204 login_check_credentials();
1205 style_header("Document Search");
1206 search_screen(SRCH_DOC, 0);
1207 style_body_and_footer("docsrch");
1208 }
1209
--- src/doc.c
+++ src/doc.c
@@ -555,11 +555,11 @@
555 }
556 @ <tr><td>%s(zFlag)%h(aMime[i].zSuffix)<td>%h(aMime[i].zMimetype)</tr>
557 }
558 @ </tbody></table>
559 style_table_sorter();
560 style_finish_page("mimetypes");
561 }
562
563 /*
564 ** Check to see if the file in the pContent blob is "embedded HTML". Return
565 ** true if it is, and fill pTitle with the document title.
@@ -770,11 +770,11 @@
770 }else{
771 style_header("%s", zDefaultTitle);
772 wiki_convert(pBody, 0, WIKI_BUTTONS);
773 }
774 document_emit_js();
775 style_finish_page("doc");
776 }else if( fossil_strcmp(zMime, "text/x-markdown")==0 ){
777 Blob tail = BLOB_INITIALIZER;
778 markdown_to_html(pBody, &title, &tail);
779 if( blob_size(&title)>0 ){
780 style_header("%s", blob_str(&title));
@@ -781,30 +781,30 @@
781 }else{
782 style_header("%s", zDefaultTitle);
783 }
784 convert_href_and_output(&tail);
785 document_emit_js();
786 style_finish_page("doc");
787 }else if( fossil_strcmp(zMime, "text/plain")==0 ){
788 style_header("%s", zDefaultTitle);
789 @ <blockquote><pre>
790 @ %h(blob_str(pBody))
791 @ </pre></blockquote>
792 document_emit_js();
793 style_finish_page("doc");
794 }else if( fossil_strcmp(zMime, "text/html")==0
795 && doc_is_embedded_html(pBody, &title) ){
796 if( blob_size(&title)==0 ) blob_append(&title,zFilename,-1);
797 style_header("%s", blob_str(&title));
798 convert_href_and_output(pBody);
799 document_emit_js();
800 style_finish_page("doc");
801 }else if( fossil_strcmp(zMime, "text/x-pikchr")==0 ){
802 style_adunit_config(ADUNIT_RIGHT_OK);
803 style_header("%s", zDefaultTitle);
804 wiki_render_by_mimetype(pBody, zMime);
805 style_finish_page("doc");
806 #ifdef FOSSIL_ENABLE_TH1_DOCS
807 }else if( Th_AreDocsEnabled() &&
808 fossil_strcmp(zMime, "application/x-th1")==0 ){
809 int raw = P("raw")!=0;
810 if( !raw ){
@@ -821,11 +821,11 @@
821 }else{
822 Th_Render(blob_str(pBody));
823 }
824 if( !raw ){
825 document_emit_js();
826 style_finish_page("doc");
827 }
828 #endif
829 }else{
830 fossil_free(style_csp(1));
831 cgi_set_content_type(zMime);
@@ -1029,11 +1029,11 @@
1029 style_header("Not Found");
1030 @ <p>Document %h(zOrigName) not found
1031 if( fossil_strcmp(zCheckin,"ckout")!=0 ){
1032 @ in %z(href("%R/tree?ci=%T",zCheckin))%h(zCheckin)</a>
1033 }
1034 style_finish_page("doc");
1035 return;
1036 }
1037
1038 /*
1039 ** The default logo.
@@ -1202,7 +1202,7 @@
1202 */
1203 void doc_search_page(void){
1204 login_check_credentials();
1205 style_header("Document Search");
1206 search_screen(SRCH_DOC, 0);
1207 style_finish_page("docsrch");
1208 }
1209
+4 -4
--- src/event.c
+++ src/event.c
@@ -113,11 +113,11 @@
113113
}
114114
db_finalize(&q1);
115115
if( rid==0 || (specRid!=0 && specRid!=rid) ){
116116
style_header("No Such Tech-Note");
117117
@ Cannot locate a technical note called <b>%h(zId)</b>.
118
- style_body_and_footer("event");
118
+ style_finish_page("event");
119119
return;
120120
}
121121
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
122122
zVerbose = P("v");
123123
if( !zVerbose ){
@@ -229,11 +229,11 @@
229229
" FROM tag"
230230
" WHERE tagname GLOB 'event-%q*'",
231231
zId);
232232
attachment_list(zFullId, "<hr /><h2>Attachments:</h2><ul>");
233233
document_emit_js();
234
- style_body_and_footer("event");
234
+ style_finish_page("event");
235235
manifest_destroy(pTNote);
236236
}
237237
238238
/*
239239
** Add or update a new tech note to the repository. rid is id of
@@ -473,11 +473,11 @@
473473
zMimetype, zComment, zTags,
474474
zClrFlag[0] ? zClr : 0) ){
475475
style_header("Error");
476476
@ Internal error: Fossil tried to make an invalid artifact for
477477
@ the edited technote.
478
- style_body_and_footer("event");
478
+ style_finish_page("event");
479479
return;
480480
}
481481
cgi_redirectf("%R/technote?name=%T", zId);
482482
}
483483
if( P("cancel")!=0 ){
@@ -567,11 +567,11 @@
567567
if( P("preview") ){
568568
@ <input type="submit" name="submit" value="Submit" />
569569
}
570570
@ </td></tr></table>
571571
@ </div></form>
572
- style_body_and_footer("event");
572
+ style_finish_page("event");
573573
}
574574
575575
/*
576576
** Add a new tech note to the repository. The timestamp is
577577
** given by the zETime parameter. rid must be zero to create
578578
--- src/event.c
+++ src/event.c
@@ -113,11 +113,11 @@
113 }
114 db_finalize(&q1);
115 if( rid==0 || (specRid!=0 && specRid!=rid) ){
116 style_header("No Such Tech-Note");
117 @ Cannot locate a technical note called <b>%h(zId)</b>.
118 style_body_and_footer("event");
119 return;
120 }
121 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
122 zVerbose = P("v");
123 if( !zVerbose ){
@@ -229,11 +229,11 @@
229 " FROM tag"
230 " WHERE tagname GLOB 'event-%q*'",
231 zId);
232 attachment_list(zFullId, "<hr /><h2>Attachments:</h2><ul>");
233 document_emit_js();
234 style_body_and_footer("event");
235 manifest_destroy(pTNote);
236 }
237
238 /*
239 ** Add or update a new tech note to the repository. rid is id of
@@ -473,11 +473,11 @@
473 zMimetype, zComment, zTags,
474 zClrFlag[0] ? zClr : 0) ){
475 style_header("Error");
476 @ Internal error: Fossil tried to make an invalid artifact for
477 @ the edited technote.
478 style_body_and_footer("event");
479 return;
480 }
481 cgi_redirectf("%R/technote?name=%T", zId);
482 }
483 if( P("cancel")!=0 ){
@@ -567,11 +567,11 @@
567 if( P("preview") ){
568 @ <input type="submit" name="submit" value="Submit" />
569 }
570 @ </td></tr></table>
571 @ </div></form>
572 style_body_and_footer("event");
573 }
574
575 /*
576 ** Add a new tech note to the repository. The timestamp is
577 ** given by the zETime parameter. rid must be zero to create
578
--- src/event.c
+++ src/event.c
@@ -113,11 +113,11 @@
113 }
114 db_finalize(&q1);
115 if( rid==0 || (specRid!=0 && specRid!=rid) ){
116 style_header("No Such Tech-Note");
117 @ Cannot locate a technical note called <b>%h(zId)</b>.
118 style_finish_page("event");
119 return;
120 }
121 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
122 zVerbose = P("v");
123 if( !zVerbose ){
@@ -229,11 +229,11 @@
229 " FROM tag"
230 " WHERE tagname GLOB 'event-%q*'",
231 zId);
232 attachment_list(zFullId, "<hr /><h2>Attachments:</h2><ul>");
233 document_emit_js();
234 style_finish_page("event");
235 manifest_destroy(pTNote);
236 }
237
238 /*
239 ** Add or update a new tech note to the repository. rid is id of
@@ -473,11 +473,11 @@
473 zMimetype, zComment, zTags,
474 zClrFlag[0] ? zClr : 0) ){
475 style_header("Error");
476 @ Internal error: Fossil tried to make an invalid artifact for
477 @ the edited technote.
478 style_finish_page("event");
479 return;
480 }
481 cgi_redirectf("%R/technote?name=%T", zId);
482 }
483 if( P("cancel")!=0 ){
@@ -567,11 +567,11 @@
567 if( P("preview") ){
568 @ <input type="submit" name="submit" value="Submit" />
569 }
570 @ </td></tr></table>
571 @ </div></form>
572 style_finish_page("event");
573 }
574
575 /*
576 ** Add a new tech note to the repository. The timestamp is
577 ** given by the zETime parameter. rid must be zero to create
578
+1 -1
--- src/extcgi.c
+++ src/extcgi.c
@@ -416,7 +416,7 @@
416416
@ </tr>
417417
}
418418
db_finalize(&q);
419419
@ </tbody>
420420
@ </table>
421
- style_body_and_footer("extcgi");
421
+ style_finish_page("extcgi");
422422
}
423423
--- src/extcgi.c
+++ src/extcgi.c
@@ -416,7 +416,7 @@
416 @ </tr>
417 }
418 db_finalize(&q);
419 @ </tbody>
420 @ </table>
421 style_body_and_footer("extcgi");
422 }
423
--- src/extcgi.c
+++ src/extcgi.c
@@ -416,7 +416,7 @@
416 @ </tr>
417 }
418 db_finalize(&q);
419 @ </tbody>
420 @ </table>
421 style_finish_page("extcgi");
422 }
423
+2 -2
--- src/fileedit.c
+++ src/fileedit.c
@@ -1606,11 +1606,11 @@
16061606
"values matching files which may be edited online."
16071607
"</p>\n");
16081608
}else{
16091609
CX("<p>Online editing is disabled for this repository.</p>\n");
16101610
}
1611
- style_body_and_footer("fileedit");
1611
+ style_finish_page("fileedit");
16121612
return;
16131613
}
16141614
16151615
/* Dispatch AJAX methods based tail of the request URI.
16161616
** The AJAX parts do their own permissions/CSRF check and
@@ -2061,7 +2061,7 @@
20612061
style_script_end();
20622062
}
20632063
blob_reset(&err);
20642064
CheckinMiniInfo_cleanup(&cimi);
20652065
db_end_transaction(0);
2066
- style_body_and_footer("fileedit");
2066
+ style_finish_page("fileedit");
20672067
}
20682068
--- src/fileedit.c
+++ src/fileedit.c
@@ -1606,11 +1606,11 @@
1606 "values matching files which may be edited online."
1607 "</p>\n");
1608 }else{
1609 CX("<p>Online editing is disabled for this repository.</p>\n");
1610 }
1611 style_body_and_footer("fileedit");
1612 return;
1613 }
1614
1615 /* Dispatch AJAX methods based tail of the request URI.
1616 ** The AJAX parts do their own permissions/CSRF check and
@@ -2061,7 +2061,7 @@
2061 style_script_end();
2062 }
2063 blob_reset(&err);
2064 CheckinMiniInfo_cleanup(&cimi);
2065 db_end_transaction(0);
2066 style_body_and_footer("fileedit");
2067 }
2068
--- src/fileedit.c
+++ src/fileedit.c
@@ -1606,11 +1606,11 @@
1606 "values matching files which may be edited online."
1607 "</p>\n");
1608 }else{
1609 CX("<p>Online editing is disabled for this repository.</p>\n");
1610 }
1611 style_finish_page("fileedit");
1612 return;
1613 }
1614
1615 /* Dispatch AJAX methods based tail of the request URI.
1616 ** The AJAX parts do their own permissions/CSRF check and
@@ -2061,7 +2061,7 @@
2061 style_script_end();
2062 }
2063 blob_reset(&err);
2064 CheckinMiniInfo_cleanup(&cimi);
2065 db_end_transaction(0);
2066 style_finish_page("fileedit");
2067 }
2068
+3 -3
--- src/finfo.c
+++ src/finfo.c
@@ -367,11 +367,11 @@
367367
ridFrom = name_to_rid_www("from");
368368
zPrevDate[0] = 0;
369369
cookie_render();
370370
if( fnid==0 ){
371371
@ No such file: %h(zFilename)
372
- style_body_and_footer("finfo");
372
+ style_finish_page("finfo");
373373
return;
374374
}
375375
if( g.perm.Admin ){
376376
style_submenu_element("MLink Table", "%R/mlink?name=%t", zFilename);
377377
}
@@ -754,11 +754,11 @@
754754
@ <td></td><td></td><td></td></tr>
755755
}
756756
}
757757
@ </table>
758758
timeline_output_graph_javascript(pGraph, TIMELINE_FILEDIFF, iTableId);
759
- style_body_and_footer("finfo");
759
+ style_finish_page("finfo");
760760
}
761761
762762
/*
763763
** WEBPAGE: mlink
764764
** URL: /mlink?name=FILENAME
@@ -934,7 +934,7 @@
934934
db_finalize(&q);
935935
@ </tbody>
936936
@ </table>
937937
@ </div>
938938
}
939
- style_body_and_footer("finfo");
939
+ style_finish_page("finfo");
940940
}
941941
--- src/finfo.c
+++ src/finfo.c
@@ -367,11 +367,11 @@
367 ridFrom = name_to_rid_www("from");
368 zPrevDate[0] = 0;
369 cookie_render();
370 if( fnid==0 ){
371 @ No such file: %h(zFilename)
372 style_body_and_footer("finfo");
373 return;
374 }
375 if( g.perm.Admin ){
376 style_submenu_element("MLink Table", "%R/mlink?name=%t", zFilename);
377 }
@@ -754,11 +754,11 @@
754 @ <td></td><td></td><td></td></tr>
755 }
756 }
757 @ </table>
758 timeline_output_graph_javascript(pGraph, TIMELINE_FILEDIFF, iTableId);
759 style_body_and_footer("finfo");
760 }
761
762 /*
763 ** WEBPAGE: mlink
764 ** URL: /mlink?name=FILENAME
@@ -934,7 +934,7 @@
934 db_finalize(&q);
935 @ </tbody>
936 @ </table>
937 @ </div>
938 }
939 style_body_and_footer("finfo");
940 }
941
--- src/finfo.c
+++ src/finfo.c
@@ -367,11 +367,11 @@
367 ridFrom = name_to_rid_www("from");
368 zPrevDate[0] = 0;
369 cookie_render();
370 if( fnid==0 ){
371 @ No such file: %h(zFilename)
372 style_finish_page("finfo");
373 return;
374 }
375 if( g.perm.Admin ){
376 style_submenu_element("MLink Table", "%R/mlink?name=%t", zFilename);
377 }
@@ -754,11 +754,11 @@
754 @ <td></td><td></td><td></td></tr>
755 }
756 }
757 @ </table>
758 timeline_output_graph_javascript(pGraph, TIMELINE_FILEDIFF, iTableId);
759 style_finish_page("finfo");
760 }
761
762 /*
763 ** WEBPAGE: mlink
764 ** URL: /mlink?name=FILENAME
@@ -934,7 +934,7 @@
934 db_finalize(&q);
935 @ </tbody>
936 @ </table>
937 @ </div>
938 }
939 style_finish_page("finfo");
940 }
941
+6 -6
--- src/forum.c
+++ src/forum.c
@@ -878,11 +878,11 @@
878878
/* Emit Forum Javascript. */
879879
builtin_request_js("forum.js");
880880
forum_emit_js();
881881
882882
/* Emit the page style. */
883
- style_body_and_footer("forum");
883
+ style_finish_page("forum");
884884
}
885885
886886
/*
887887
** Return true if a forum post should be moderated.
888888
*/
@@ -1074,11 +1074,11 @@
10741074
@ <input type="submit" value="Login">
10751075
@ </form>
10761076
@ <td>Log into an existing account
10771077
@ </table>
10781078
forum_emit_js();
1079
- style_body_and_footer("forum");
1079
+ style_finish_page("forum");
10801080
fossil_free(zGoto);
10811081
}
10821082
10831083
/*
10841084
** Write the "From: USER" line on the webpage.
@@ -1135,11 +1135,11 @@
11351135
@ Show query parameters</label>
11361136
@ </div>
11371137
}
11381138
@ </form>
11391139
forum_emit_js();
1140
- style_body_and_footer("forum");
1140
+ style_finish_page("forum");
11411141
}
11421142
11431143
/*
11441144
** WEBPAGE: forume2
11451145
**
@@ -1315,11 +1315,11 @@
13151315
@ Show query parameters</label>
13161316
@ </div>
13171317
}
13181318
@ </form>
13191319
forum_emit_js();
1320
- style_body_and_footer("forum");
1320
+ style_finish_page("forum");
13211321
}
13221322
13231323
/*
13241324
** WEBPAGE: forummain
13251325
** WEBPAGE: forum
@@ -1357,11 +1357,11 @@
13571357
style_submenu_element("Moderation Requests", "%R/modreq");
13581358
}
13591359
if( (srchFlags & SRCH_FORUM)!=0 ){
13601360
if( search_screen(SRCH_FORUM, 0) ){
13611361
style_submenu_element("Recent Threads","%R/forum");
1362
- style_body_and_footer("forum");
1362
+ style_finish_page("forum");
13631363
return;
13641364
}
13651365
}
13661366
iLimit = atoi(PD("n","25"));
13671367
iOfst = atoi(PD("x","0"));
@@ -1450,7 +1450,7 @@
14501450
if( iCnt>0 ){
14511451
@ </table></div>
14521452
}else{
14531453
@ <h1>No forum posts found</h1>
14541454
}
1455
- style_body_and_footer("forum");
1455
+ style_finish_page("forum");
14561456
}
14571457
--- src/forum.c
+++ src/forum.c
@@ -878,11 +878,11 @@
878 /* Emit Forum Javascript. */
879 builtin_request_js("forum.js");
880 forum_emit_js();
881
882 /* Emit the page style. */
883 style_body_and_footer("forum");
884 }
885
886 /*
887 ** Return true if a forum post should be moderated.
888 */
@@ -1074,11 +1074,11 @@
1074 @ <input type="submit" value="Login">
1075 @ </form>
1076 @ <td>Log into an existing account
1077 @ </table>
1078 forum_emit_js();
1079 style_body_and_footer("forum");
1080 fossil_free(zGoto);
1081 }
1082
1083 /*
1084 ** Write the "From: USER" line on the webpage.
@@ -1135,11 +1135,11 @@
1135 @ Show query parameters</label>
1136 @ </div>
1137 }
1138 @ </form>
1139 forum_emit_js();
1140 style_body_and_footer("forum");
1141 }
1142
1143 /*
1144 ** WEBPAGE: forume2
1145 **
@@ -1315,11 +1315,11 @@
1315 @ Show query parameters</label>
1316 @ </div>
1317 }
1318 @ </form>
1319 forum_emit_js();
1320 style_body_and_footer("forum");
1321 }
1322
1323 /*
1324 ** WEBPAGE: forummain
1325 ** WEBPAGE: forum
@@ -1357,11 +1357,11 @@
1357 style_submenu_element("Moderation Requests", "%R/modreq");
1358 }
1359 if( (srchFlags & SRCH_FORUM)!=0 ){
1360 if( search_screen(SRCH_FORUM, 0) ){
1361 style_submenu_element("Recent Threads","%R/forum");
1362 style_body_and_footer("forum");
1363 return;
1364 }
1365 }
1366 iLimit = atoi(PD("n","25"));
1367 iOfst = atoi(PD("x","0"));
@@ -1450,7 +1450,7 @@
1450 if( iCnt>0 ){
1451 @ </table></div>
1452 }else{
1453 @ <h1>No forum posts found</h1>
1454 }
1455 style_body_and_footer("forum");
1456 }
1457
--- src/forum.c
+++ src/forum.c
@@ -878,11 +878,11 @@
878 /* Emit Forum Javascript. */
879 builtin_request_js("forum.js");
880 forum_emit_js();
881
882 /* Emit the page style. */
883 style_finish_page("forum");
884 }
885
886 /*
887 ** Return true if a forum post should be moderated.
888 */
@@ -1074,11 +1074,11 @@
1074 @ <input type="submit" value="Login">
1075 @ </form>
1076 @ <td>Log into an existing account
1077 @ </table>
1078 forum_emit_js();
1079 style_finish_page("forum");
1080 fossil_free(zGoto);
1081 }
1082
1083 /*
1084 ** Write the "From: USER" line on the webpage.
@@ -1135,11 +1135,11 @@
1135 @ Show query parameters</label>
1136 @ </div>
1137 }
1138 @ </form>
1139 forum_emit_js();
1140 style_finish_page("forum");
1141 }
1142
1143 /*
1144 ** WEBPAGE: forume2
1145 **
@@ -1315,11 +1315,11 @@
1315 @ Show query parameters</label>
1316 @ </div>
1317 }
1318 @ </form>
1319 forum_emit_js();
1320 style_finish_page("forum");
1321 }
1322
1323 /*
1324 ** WEBPAGE: forummain
1325 ** WEBPAGE: forum
@@ -1357,11 +1357,11 @@
1357 style_submenu_element("Moderation Requests", "%R/modreq");
1358 }
1359 if( (srchFlags & SRCH_FORUM)!=0 ){
1360 if( search_screen(SRCH_FORUM, 0) ){
1361 style_submenu_element("Recent Threads","%R/forum");
1362 style_finish_page("forum");
1363 return;
1364 }
1365 }
1366 iLimit = atoi(PD("n","25"));
1367 iOfst = atoi(PD("x","0"));
@@ -1450,7 +1450,7 @@
1450 if( iCnt>0 ){
1451 @ </table></div>
1452 }else{
1453 @ <h1>No forum posts found</h1>
1454 }
1455 style_finish_page("forum");
1456 }
1457
+16 -16
--- src/info.c
+++ src/info.c
@@ -503,11 +503,11 @@
503503
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
504504
rid = name_to_rid_www("name");
505505
if( rid==0 ){
506506
style_header("Check-in Information Error");
507507
@ No such object: %h(g.argv[2])
508
- style_body_and_footer("ci_tags");
508
+ style_finish_page("ci_tags");
509509
return;
510510
}
511511
zHash = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
512512
style_header("Tags and Properties");
513513
@ <h1>Tags and Properties for Check-In \
@@ -595,11 +595,11 @@
595595
blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
596596
db_prepare(&q, "%s", blob_sql_text(&sql));
597597
www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
598598
0, 0, 0, rid, 0, 0);
599599
db_finalize(&q);
600
- style_body_and_footer("ci_tags");
600
+ style_finish_page("ci_tags");
601601
}
602602
603603
/*
604604
** WEBPAGE: vinfo
605605
** WEBPAGE: ci
@@ -634,11 +634,11 @@
634634
zName = P("name");
635635
rid = name_to_rid_www("name");
636636
if( rid==0 ){
637637
style_header("Check-in Information Error");
638638
@ No such object: %h(g.argv[2])
639
- style_body_and_footer("vinfo");
639
+ style_finish_page("vinfo");
640640
return;
641641
}
642642
zRe = P("regex");
643643
if( zRe ) re_compile(&pRe, zRe, 0);
644644
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
@@ -940,11 +940,11 @@
940940
diffFlags,pRe,mperm);
941941
}
942942
db_finalize(&q3);
943943
append_diff_javascript(diffType==2);
944944
cookie_render();
945
- style_body_and_footer("vinfo");
945
+ style_finish_page("vinfo");
946946
}
947947
948948
/*
949949
** WEBPAGE: winfo
950950
** URL: /winfo?name=HASH
@@ -966,11 +966,11 @@
966966
if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
967967
rid = name_to_rid_www("name");
968968
if( rid==0 || (pWiki = manifest_get(rid, CFTYPE_WIKI, 0))==0 ){
969969
style_header("Wiki Page Information Error");
970970
@ No such object: %h(P("name"))
971
- style_body_and_footer("winfo");
971
+ style_finish_page("winfo");
972972
return;
973973
}
974974
if( g.perm.ModWiki && (zModAction = P("modaction"))!=0 ){
975975
if( strcmp(zModAction,"delete")==0 ){
976976
moderation_disapprove(rid);
@@ -1054,11 +1054,11 @@
10541054
safe_html_context(DOCSRC_WIKI);
10551055
wiki_render_by_mimetype(&wiki, pWiki->zMimetype);
10561056
blob_reset(&wiki);
10571057
manifest_destroy(pWiki);
10581058
document_emit_js();
1059
- style_body_and_footer("winfo");
1059
+ style_finish_page("winfo");
10601060
}
10611061
10621062
/*
10631063
** Find an check-in based on query parameter zParam and parse its
10641064
** manifest. Return the number of errors.
@@ -1327,11 +1327,11 @@
13271327
}
13281328
}
13291329
manifest_destroy(pFrom);
13301330
manifest_destroy(pTo);
13311331
append_diff_javascript(diffType==2);
1332
- style_body_and_footer("vdiff");
1332
+ style_finish_page("vdiff");
13331333
}
13341334
13351335
#if INTERFACE
13361336
/*
13371337
** Possible return values from object_description()
@@ -1761,11 +1761,11 @@
17611761
@ are shown.</b>
17621762
}
17631763
@ <hr />
17641764
append_diff(zV1, zV2, diffFlags, pRe);
17651765
append_diff_javascript(diffType);
1766
- style_body_and_footer("fdiff");
1766
+ style_finish_page("fdiff");
17671767
}
17681768
17691769
/*
17701770
** WEBPAGE: raw
17711771
** URL: /raw/ARTIFACTID
@@ -1965,11 +1965,11 @@
19651965
@ <hr />
19661966
content_get(rid, &content);
19671967
@ <blockquote><pre>
19681968
hexdump(&content);
19691969
@ </pre></blockquote>
1970
- style_body_and_footer("hexdump");
1970
+ style_finish_page("hexdump");
19711971
}
19721972
19731973
/*
19741974
** Look for "ci" and "filename" query parameters. If found, try to
19751975
** use them to extract the record ID of an artifact for the file.
@@ -2263,11 +2263,11 @@
22632263
page_tree();
22642264
return;
22652265
}
22662266
style_header("Missing name= query parameter");
22672267
@ The name= query parameter is missing
2268
- style_body_and_footer("artifact");
2268
+ style_finish_page("artifact");
22692269
return;
22702270
}
22712271
22722272
url_initialize(&url, g.zPath);
22732273
url_add_parameter(&url, "name", zName);
@@ -2324,11 +2324,11 @@
23242324
}else{
23252325
style_header("No such artifact");
23262326
@ Artifact '%h(zName)' does not exist in this repository.
23272327
}
23282328
if( rid==0 ){
2329
- style_body_and_footer("artifact");
2329
+ style_finish_page("artifact");
23302330
return;
23312331
}
23322332
}
23332333
23342334
if( descOnly || P("verbose")!=0 ){
@@ -2529,11 +2529,11 @@
25292529
@ <i>(file is %d(blob_size(&content)) bytes of binary data)</i>
25302530
}
25312531
@ </blockquote>
25322532
}
25332533
}
2534
- style_body_and_footer("artifact");
2534
+ style_finish_page("artifact");
25352535
}
25362536
25372537
/*
25382538
** WEBPAGE: tinfo
25392539
** URL: /tinfo?name=ARTIFACTID
@@ -2636,11 +2636,11 @@
26362636
26372637
@ <div class="section">Changes</div>
26382638
@ <p>
26392639
ticket_output_change_artifact(pTktChng, 0, 1);
26402640
manifest_destroy(pTktChng);
2641
- style_body_and_footer("tinfo");
2641
+ style_finish_page("tinfo");
26422642
}
26432643
26442644
26452645
/*
26462646
** WEBPAGE: info
@@ -2687,11 +2687,11 @@
26872687
@ <p>No such object: %h(zName)</p>
26882688
if( nLen<4 ){
26892689
@ <p>Object name should be no less than 4 characters. Ten or more
26902690
@ characters are recommended.</p>
26912691
}
2692
- style_body_and_footer("info");
2692
+ style_finish_page("info");
26932693
return;
26942694
}else if( rc==2 ){
26952695
cgi_set_parameter("src","info");
26962696
ambiguous_page();
26972697
return;
@@ -2699,11 +2699,11 @@
26992699
zName = blob_str(&uuid);
27002700
rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zName);
27012701
if( rid==0 ){
27022702
style_header("Broken Link");
27032703
@ <p>No such object: %h(zName)</p>
2704
- style_body_and_footer("info");
2704
+ style_finish_page("info");
27052705
return;
27062706
}
27072707
if( db_exists("SELECT 1 FROM mlink WHERE mid=%d", rid) ){
27082708
ci_page();
27092709
}else
@@ -3224,11 +3224,11 @@
32243224
}
32253225
@ </td></tr>
32263226
@ </table>
32273227
@ </div></form>
32283228
builtin_request_js("ci_edit.js");
3229
- style_body_and_footer("ci_edit");
3229
+ style_finish_page("ci_edit");
32303230
}
32313231
32323232
/*
32333233
** Prepare an ammended commit comment. Let the user modify it using the
32343234
** editor specified in the global_config table or either
32353235
--- src/info.c
+++ src/info.c
@@ -503,11 +503,11 @@
503 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
504 rid = name_to_rid_www("name");
505 if( rid==0 ){
506 style_header("Check-in Information Error");
507 @ No such object: %h(g.argv[2])
508 style_body_and_footer("ci_tags");
509 return;
510 }
511 zHash = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
512 style_header("Tags and Properties");
513 @ <h1>Tags and Properties for Check-In \
@@ -595,11 +595,11 @@
595 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
596 db_prepare(&q, "%s", blob_sql_text(&sql));
597 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
598 0, 0, 0, rid, 0, 0);
599 db_finalize(&q);
600 style_body_and_footer("ci_tags");
601 }
602
603 /*
604 ** WEBPAGE: vinfo
605 ** WEBPAGE: ci
@@ -634,11 +634,11 @@
634 zName = P("name");
635 rid = name_to_rid_www("name");
636 if( rid==0 ){
637 style_header("Check-in Information Error");
638 @ No such object: %h(g.argv[2])
639 style_body_and_footer("vinfo");
640 return;
641 }
642 zRe = P("regex");
643 if( zRe ) re_compile(&pRe, zRe, 0);
644 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
@@ -940,11 +940,11 @@
940 diffFlags,pRe,mperm);
941 }
942 db_finalize(&q3);
943 append_diff_javascript(diffType==2);
944 cookie_render();
945 style_body_and_footer("vinfo");
946 }
947
948 /*
949 ** WEBPAGE: winfo
950 ** URL: /winfo?name=HASH
@@ -966,11 +966,11 @@
966 if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
967 rid = name_to_rid_www("name");
968 if( rid==0 || (pWiki = manifest_get(rid, CFTYPE_WIKI, 0))==0 ){
969 style_header("Wiki Page Information Error");
970 @ No such object: %h(P("name"))
971 style_body_and_footer("winfo");
972 return;
973 }
974 if( g.perm.ModWiki && (zModAction = P("modaction"))!=0 ){
975 if( strcmp(zModAction,"delete")==0 ){
976 moderation_disapprove(rid);
@@ -1054,11 +1054,11 @@
1054 safe_html_context(DOCSRC_WIKI);
1055 wiki_render_by_mimetype(&wiki, pWiki->zMimetype);
1056 blob_reset(&wiki);
1057 manifest_destroy(pWiki);
1058 document_emit_js();
1059 style_body_and_footer("winfo");
1060 }
1061
1062 /*
1063 ** Find an check-in based on query parameter zParam and parse its
1064 ** manifest. Return the number of errors.
@@ -1327,11 +1327,11 @@
1327 }
1328 }
1329 manifest_destroy(pFrom);
1330 manifest_destroy(pTo);
1331 append_diff_javascript(diffType==2);
1332 style_body_and_footer("vdiff");
1333 }
1334
1335 #if INTERFACE
1336 /*
1337 ** Possible return values from object_description()
@@ -1761,11 +1761,11 @@
1761 @ are shown.</b>
1762 }
1763 @ <hr />
1764 append_diff(zV1, zV2, diffFlags, pRe);
1765 append_diff_javascript(diffType);
1766 style_body_and_footer("fdiff");
1767 }
1768
1769 /*
1770 ** WEBPAGE: raw
1771 ** URL: /raw/ARTIFACTID
@@ -1965,11 +1965,11 @@
1965 @ <hr />
1966 content_get(rid, &content);
1967 @ <blockquote><pre>
1968 hexdump(&content);
1969 @ </pre></blockquote>
1970 style_body_and_footer("hexdump");
1971 }
1972
1973 /*
1974 ** Look for "ci" and "filename" query parameters. If found, try to
1975 ** use them to extract the record ID of an artifact for the file.
@@ -2263,11 +2263,11 @@
2263 page_tree();
2264 return;
2265 }
2266 style_header("Missing name= query parameter");
2267 @ The name= query parameter is missing
2268 style_body_and_footer("artifact");
2269 return;
2270 }
2271
2272 url_initialize(&url, g.zPath);
2273 url_add_parameter(&url, "name", zName);
@@ -2324,11 +2324,11 @@
2324 }else{
2325 style_header("No such artifact");
2326 @ Artifact '%h(zName)' does not exist in this repository.
2327 }
2328 if( rid==0 ){
2329 style_body_and_footer("artifact");
2330 return;
2331 }
2332 }
2333
2334 if( descOnly || P("verbose")!=0 ){
@@ -2529,11 +2529,11 @@
2529 @ <i>(file is %d(blob_size(&content)) bytes of binary data)</i>
2530 }
2531 @ </blockquote>
2532 }
2533 }
2534 style_body_and_footer("artifact");
2535 }
2536
2537 /*
2538 ** WEBPAGE: tinfo
2539 ** URL: /tinfo?name=ARTIFACTID
@@ -2636,11 +2636,11 @@
2636
2637 @ <div class="section">Changes</div>
2638 @ <p>
2639 ticket_output_change_artifact(pTktChng, 0, 1);
2640 manifest_destroy(pTktChng);
2641 style_body_and_footer("tinfo");
2642 }
2643
2644
2645 /*
2646 ** WEBPAGE: info
@@ -2687,11 +2687,11 @@
2687 @ <p>No such object: %h(zName)</p>
2688 if( nLen<4 ){
2689 @ <p>Object name should be no less than 4 characters. Ten or more
2690 @ characters are recommended.</p>
2691 }
2692 style_body_and_footer("info");
2693 return;
2694 }else if( rc==2 ){
2695 cgi_set_parameter("src","info");
2696 ambiguous_page();
2697 return;
@@ -2699,11 +2699,11 @@
2699 zName = blob_str(&uuid);
2700 rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zName);
2701 if( rid==0 ){
2702 style_header("Broken Link");
2703 @ <p>No such object: %h(zName)</p>
2704 style_body_and_footer("info");
2705 return;
2706 }
2707 if( db_exists("SELECT 1 FROM mlink WHERE mid=%d", rid) ){
2708 ci_page();
2709 }else
@@ -3224,11 +3224,11 @@
3224 }
3225 @ </td></tr>
3226 @ </table>
3227 @ </div></form>
3228 builtin_request_js("ci_edit.js");
3229 style_body_and_footer("ci_edit");
3230 }
3231
3232 /*
3233 ** Prepare an ammended commit comment. Let the user modify it using the
3234 ** editor specified in the global_config table or either
3235
--- src/info.c
+++ src/info.c
@@ -503,11 +503,11 @@
503 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
504 rid = name_to_rid_www("name");
505 if( rid==0 ){
506 style_header("Check-in Information Error");
507 @ No such object: %h(g.argv[2])
508 style_finish_page("ci_tags");
509 return;
510 }
511 zHash = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
512 style_header("Tags and Properties");
513 @ <h1>Tags and Properties for Check-In \
@@ -595,11 +595,11 @@
595 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
596 db_prepare(&q, "%s", blob_sql_text(&sql));
597 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
598 0, 0, 0, rid, 0, 0);
599 db_finalize(&q);
600 style_finish_page("ci_tags");
601 }
602
603 /*
604 ** WEBPAGE: vinfo
605 ** WEBPAGE: ci
@@ -634,11 +634,11 @@
634 zName = P("name");
635 rid = name_to_rid_www("name");
636 if( rid==0 ){
637 style_header("Check-in Information Error");
638 @ No such object: %h(g.argv[2])
639 style_finish_page("vinfo");
640 return;
641 }
642 zRe = P("regex");
643 if( zRe ) re_compile(&pRe, zRe, 0);
644 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
@@ -940,11 +940,11 @@
940 diffFlags,pRe,mperm);
941 }
942 db_finalize(&q3);
943 append_diff_javascript(diffType==2);
944 cookie_render();
945 style_finish_page("vinfo");
946 }
947
948 /*
949 ** WEBPAGE: winfo
950 ** URL: /winfo?name=HASH
@@ -966,11 +966,11 @@
966 if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
967 rid = name_to_rid_www("name");
968 if( rid==0 || (pWiki = manifest_get(rid, CFTYPE_WIKI, 0))==0 ){
969 style_header("Wiki Page Information Error");
970 @ No such object: %h(P("name"))
971 style_finish_page("winfo");
972 return;
973 }
974 if( g.perm.ModWiki && (zModAction = P("modaction"))!=0 ){
975 if( strcmp(zModAction,"delete")==0 ){
976 moderation_disapprove(rid);
@@ -1054,11 +1054,11 @@
1054 safe_html_context(DOCSRC_WIKI);
1055 wiki_render_by_mimetype(&wiki, pWiki->zMimetype);
1056 blob_reset(&wiki);
1057 manifest_destroy(pWiki);
1058 document_emit_js();
1059 style_finish_page("winfo");
1060 }
1061
1062 /*
1063 ** Find an check-in based on query parameter zParam and parse its
1064 ** manifest. Return the number of errors.
@@ -1327,11 +1327,11 @@
1327 }
1328 }
1329 manifest_destroy(pFrom);
1330 manifest_destroy(pTo);
1331 append_diff_javascript(diffType==2);
1332 style_finish_page("vdiff");
1333 }
1334
1335 #if INTERFACE
1336 /*
1337 ** Possible return values from object_description()
@@ -1761,11 +1761,11 @@
1761 @ are shown.</b>
1762 }
1763 @ <hr />
1764 append_diff(zV1, zV2, diffFlags, pRe);
1765 append_diff_javascript(diffType);
1766 style_finish_page("fdiff");
1767 }
1768
1769 /*
1770 ** WEBPAGE: raw
1771 ** URL: /raw/ARTIFACTID
@@ -1965,11 +1965,11 @@
1965 @ <hr />
1966 content_get(rid, &content);
1967 @ <blockquote><pre>
1968 hexdump(&content);
1969 @ </pre></blockquote>
1970 style_finish_page("hexdump");
1971 }
1972
1973 /*
1974 ** Look for "ci" and "filename" query parameters. If found, try to
1975 ** use them to extract the record ID of an artifact for the file.
@@ -2263,11 +2263,11 @@
2263 page_tree();
2264 return;
2265 }
2266 style_header("Missing name= query parameter");
2267 @ The name= query parameter is missing
2268 style_finish_page("artifact");
2269 return;
2270 }
2271
2272 url_initialize(&url, g.zPath);
2273 url_add_parameter(&url, "name", zName);
@@ -2324,11 +2324,11 @@
2324 }else{
2325 style_header("No such artifact");
2326 @ Artifact '%h(zName)' does not exist in this repository.
2327 }
2328 if( rid==0 ){
2329 style_finish_page("artifact");
2330 return;
2331 }
2332 }
2333
2334 if( descOnly || P("verbose")!=0 ){
@@ -2529,11 +2529,11 @@
2529 @ <i>(file is %d(blob_size(&content)) bytes of binary data)</i>
2530 }
2531 @ </blockquote>
2532 }
2533 }
2534 style_finish_page("artifact");
2535 }
2536
2537 /*
2538 ** WEBPAGE: tinfo
2539 ** URL: /tinfo?name=ARTIFACTID
@@ -2636,11 +2636,11 @@
2636
2637 @ <div class="section">Changes</div>
2638 @ <p>
2639 ticket_output_change_artifact(pTktChng, 0, 1);
2640 manifest_destroy(pTktChng);
2641 style_finish_page("tinfo");
2642 }
2643
2644
2645 /*
2646 ** WEBPAGE: info
@@ -2687,11 +2687,11 @@
2687 @ <p>No such object: %h(zName)</p>
2688 if( nLen<4 ){
2689 @ <p>Object name should be no less than 4 characters. Ten or more
2690 @ characters are recommended.</p>
2691 }
2692 style_finish_page("info");
2693 return;
2694 }else if( rc==2 ){
2695 cgi_set_parameter("src","info");
2696 ambiguous_page();
2697 return;
@@ -2699,11 +2699,11 @@
2699 zName = blob_str(&uuid);
2700 rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zName);
2701 if( rid==0 ){
2702 style_header("Broken Link");
2703 @ <p>No such object: %h(zName)</p>
2704 style_finish_page("info");
2705 return;
2706 }
2707 if( db_exists("SELECT 1 FROM mlink WHERE mid=%d", rid) ){
2708 ci_page();
2709 }else
@@ -3224,11 +3224,11 @@
3224 }
3225 @ </td></tr>
3226 @ </table>
3227 @ </div></form>
3228 builtin_request_js("ci_edit.js");
3229 style_finish_page("ci_edit");
3230 }
3231
3232 /*
3233 ** Prepare an ammended commit comment. Let the user modify it using the
3234 ** editor specified in the global_config table or either
3235
+2 -2
--- src/interwiki.c
+++ src/interwiki.c
@@ -384,11 +384,11 @@
384384
@ No mappings are currently defined.
385385
}
386386
387387
if( !g.perm.Setup ){
388388
/* Do not show intermap editing fields to non-setup users */
389
- style_body_and_footer("interwiki");
389
+ style_finish_page("interwiki");
390390
return;
391391
}
392392
393393
@ <p>To add a new mapping, fill out the form below providing a unique name
394394
@ for the tag. To edit an exist mapping, fill out the form and use the
@@ -417,7 +417,7 @@
417417
@ <tr><td></td>
418418
@ <td><input type="submit" name="submit" value="Apply Changes"></td></tr>
419419
@ </table>
420420
@ </form>
421421
422
- style_body_and_footer("interwiki");
422
+ style_finish_page("interwiki");
423423
}
424424
--- src/interwiki.c
+++ src/interwiki.c
@@ -384,11 +384,11 @@
384 @ No mappings are currently defined.
385 }
386
387 if( !g.perm.Setup ){
388 /* Do not show intermap editing fields to non-setup users */
389 style_body_and_footer("interwiki");
390 return;
391 }
392
393 @ <p>To add a new mapping, fill out the form below providing a unique name
394 @ for the tag. To edit an exist mapping, fill out the form and use the
@@ -417,7 +417,7 @@
417 @ <tr><td></td>
418 @ <td><input type="submit" name="submit" value="Apply Changes"></td></tr>
419 @ </table>
420 @ </form>
421
422 style_body_and_footer("interwiki");
423 }
424
--- src/interwiki.c
+++ src/interwiki.c
@@ -384,11 +384,11 @@
384 @ No mappings are currently defined.
385 }
386
387 if( !g.perm.Setup ){
388 /* Do not show intermap editing fields to non-setup users */
389 style_finish_page("interwiki");
390 return;
391 }
392
393 @ <p>To add a new mapping, fill out the form below providing a unique name
394 @ for the tag. To edit an exist mapping, fill out the form and use the
@@ -417,7 +417,7 @@
417 @ <tr><td></td>
418 @ <td><input type="submit" name="submit" value="Apply Changes"></td></tr>
419 @ </table>
420 @ </form>
421
422 style_finish_page("interwiki");
423 }
424
+1 -1
--- src/loadctrl.c
+++ src/loadctrl.c
@@ -57,10 +57,10 @@
5757
style_header("Server Overload");
5858
@ <h2>The server load is currently too high.
5959
@ Please try again later.</h2>
6060
@ <p>Current load average: %f(load_average()).<br />
6161
@ Load average limit: %f(mxLoad)</p>
62
- style_body_and_footer("test");
62
+ style_finish_page("test");
6363
cgi_set_status(503,"Server Overload");
6464
cgi_reply();
6565
exit(0);
6666
}
6767
--- src/loadctrl.c
+++ src/loadctrl.c
@@ -57,10 +57,10 @@
57 style_header("Server Overload");
58 @ <h2>The server load is currently too high.
59 @ Please try again later.</h2>
60 @ <p>Current load average: %f(load_average()).<br />
61 @ Load average limit: %f(mxLoad)</p>
62 style_body_and_footer("test");
63 cgi_set_status(503,"Server Overload");
64 cgi_reply();
65 exit(0);
66 }
67
--- src/loadctrl.c
+++ src/loadctrl.c
@@ -57,10 +57,10 @@
57 style_header("Server Overload");
58 @ <h2>The server load is currently too high.
59 @ Please try again later.</h2>
60 @ <p>Current load average: %f(load_average()).<br />
61 @ Load average limit: %f(mxLoad)</p>
62 style_finish_page("test");
63 cgi_set_status(503,"Server Overload");
64 cgi_reply();
65 exit(0);
66 }
67
+4 -4
--- src/login.c
+++ src/login.c
@@ -794,11 +794,11 @@
794794
@ <td><input type="submit" value="Change Password" /></td></tr>
795795
@ </table>
796796
@ </form>
797797
}
798798
}
799
- style_body_and_footer("login");
799
+ style_finish_page("login");
800800
}
801801
802802
/*
803803
** Attempt to find login credentials for user zLogin on a peer repository
804804
** with project code zCode. Transfer those credentials to the local
@@ -1544,11 +1544,11 @@
15441544
int doAlerts = 0; /* True if subscription is wanted too */
15451545
if( !db_get_boolean("self-register", 0) ){
15461546
style_header("Registration not possible");
15471547
@ <p>This project does not allow user self-registration. Please contact the
15481548
@ project administrator to obtain an account.</p>
1549
- style_body_and_footer("register");
1549
+ style_finish_page("register");
15501550
return;
15511551
}
15521552
zPerms = db_get("default-perms", "u");
15531553
15541554
/* Prompt the user for email alerts if this repository is configured for
@@ -1703,11 +1703,11 @@
17031703
}
17041704
alert_sender_free(pSender);
17051705
if( zGoto ){
17061706
@ <p><a href='%h(zGoto)'>Continue</a>
17071707
}
1708
- style_body_and_footer("register");
1708
+ style_finish_page("register");
17091709
return;
17101710
}
17111711
redirect_to_g();
17121712
}
17131713
@@ -1795,11 +1795,11 @@
17951795
@ %h(zCaptcha)
17961796
@ </pre>
17971797
@ Enter this 8-letter code in the "Captcha" box above.
17981798
@ </td></tr></table></div>
17991799
@ </form>
1800
- style_body_and_footer("register");
1800
+ style_finish_page("register");
18011801
18021802
free(zCaptcha);
18031803
}
18041804
18051805
/*
18061806
--- src/login.c
+++ src/login.c
@@ -794,11 +794,11 @@
794 @ <td><input type="submit" value="Change Password" /></td></tr>
795 @ </table>
796 @ </form>
797 }
798 }
799 style_body_and_footer("login");
800 }
801
802 /*
803 ** Attempt to find login credentials for user zLogin on a peer repository
804 ** with project code zCode. Transfer those credentials to the local
@@ -1544,11 +1544,11 @@
1544 int doAlerts = 0; /* True if subscription is wanted too */
1545 if( !db_get_boolean("self-register", 0) ){
1546 style_header("Registration not possible");
1547 @ <p>This project does not allow user self-registration. Please contact the
1548 @ project administrator to obtain an account.</p>
1549 style_body_and_footer("register");
1550 return;
1551 }
1552 zPerms = db_get("default-perms", "u");
1553
1554 /* Prompt the user for email alerts if this repository is configured for
@@ -1703,11 +1703,11 @@
1703 }
1704 alert_sender_free(pSender);
1705 if( zGoto ){
1706 @ <p><a href='%h(zGoto)'>Continue</a>
1707 }
1708 style_body_and_footer("register");
1709 return;
1710 }
1711 redirect_to_g();
1712 }
1713
@@ -1795,11 +1795,11 @@
1795 @ %h(zCaptcha)
1796 @ </pre>
1797 @ Enter this 8-letter code in the "Captcha" box above.
1798 @ </td></tr></table></div>
1799 @ </form>
1800 style_body_and_footer("register");
1801
1802 free(zCaptcha);
1803 }
1804
1805 /*
1806
--- src/login.c
+++ src/login.c
@@ -794,11 +794,11 @@
794 @ <td><input type="submit" value="Change Password" /></td></tr>
795 @ </table>
796 @ </form>
797 }
798 }
799 style_finish_page("login");
800 }
801
802 /*
803 ** Attempt to find login credentials for user zLogin on a peer repository
804 ** with project code zCode. Transfer those credentials to the local
@@ -1544,11 +1544,11 @@
1544 int doAlerts = 0; /* True if subscription is wanted too */
1545 if( !db_get_boolean("self-register", 0) ){
1546 style_header("Registration not possible");
1547 @ <p>This project does not allow user self-registration. Please contact the
1548 @ project administrator to obtain an account.</p>
1549 style_finish_page("register");
1550 return;
1551 }
1552 zPerms = db_get("default-perms", "u");
1553
1554 /* Prompt the user for email alerts if this repository is configured for
@@ -1703,11 +1703,11 @@
1703 }
1704 alert_sender_free(pSender);
1705 if( zGoto ){
1706 @ <p><a href='%h(zGoto)'>Continue</a>
1707 }
1708 style_finish_page("register");
1709 return;
1710 }
1711 redirect_to_g();
1712 }
1713
@@ -1795,11 +1795,11 @@
1795 @ %h(zCaptcha)
1796 @ </pre>
1797 @ Enter this 8-letter code in the "Captcha" box above.
1798 @ </td></tr></table></div>
1799 @ </form>
1800 style_finish_page("register");
1801
1802 free(zCaptcha);
1803 }
1804
1805 /*
1806
+2 -2
--- src/main.c
+++ src/main.c
@@ -1308,11 +1308,11 @@
13081308
style_submenu_element("Stat", "stat");
13091309
fossil_version_blob(&versionInfo, verboseFlag);
13101310
@ <pre>
13111311
@ %h(blob_str(&versionInfo))
13121312
@ </pre>
1313
- style_body_and_footer("version");
1313
+ style_finish_page("version");
13141314
}
13151315
13161316
13171317
/*
13181318
** Set the g.zBaseURL value to the full URL for the toplevel of
@@ -3095,7 +3095,7 @@
30953095
cgi_reset_content();
30963096
webpage_error("Case 7 from /test-warning");
30973097
}
30983098
@ </ol>
30993099
@ <p>End of test</p>
3100
- style_body_and_footer("test");
3100
+ style_finish_page("test");
31013101
}
31023102
--- src/main.c
+++ src/main.c
@@ -1308,11 +1308,11 @@
1308 style_submenu_element("Stat", "stat");
1309 fossil_version_blob(&versionInfo, verboseFlag);
1310 @ <pre>
1311 @ %h(blob_str(&versionInfo))
1312 @ </pre>
1313 style_body_and_footer("version");
1314 }
1315
1316
1317 /*
1318 ** Set the g.zBaseURL value to the full URL for the toplevel of
@@ -3095,7 +3095,7 @@
3095 cgi_reset_content();
3096 webpage_error("Case 7 from /test-warning");
3097 }
3098 @ </ol>
3099 @ <p>End of test</p>
3100 style_body_and_footer("test");
3101 }
3102
--- src/main.c
+++ src/main.c
@@ -1308,11 +1308,11 @@
1308 style_submenu_element("Stat", "stat");
1309 fossil_version_blob(&versionInfo, verboseFlag);
1310 @ <pre>
1311 @ %h(blob_str(&versionInfo))
1312 @ </pre>
1313 style_finish_page("version");
1314 }
1315
1316
1317 /*
1318 ** Set the g.zBaseURL value to the full URL for the toplevel of
@@ -3095,7 +3095,7 @@
3095 cgi_reset_content();
3096 webpage_error("Case 7 from /test-warning");
3097 }
3098 @ </ol>
3099 @ <p>End of test</p>
3100 style_finish_page("test");
3101 }
3102
+1 -1
--- src/moderate.c
+++ src/moderate.c
@@ -189,11 +189,11 @@
189189
);
190190
db_prepare(&q, "%s", blob_sql_text(&sql));
191191
www_print_timeline(&q, 0, 0, 0, 0, 0, 0, 0);
192192
db_finalize(&q);
193193
}
194
- style_body_and_footer("modreq");
194
+ style_finish_page("modreq");
195195
}
196196
197197
/*
198198
** Disapproves any entries in the modreq table which belong to any
199199
** user whose name is no longer found in the user table. This is only
200200
--- src/moderate.c
+++ src/moderate.c
@@ -189,11 +189,11 @@
189 );
190 db_prepare(&q, "%s", blob_sql_text(&sql));
191 www_print_timeline(&q, 0, 0, 0, 0, 0, 0, 0);
192 db_finalize(&q);
193 }
194 style_body_and_footer("modreq");
195 }
196
197 /*
198 ** Disapproves any entries in the modreq table which belong to any
199 ** user whose name is no longer found in the user table. This is only
200
--- src/moderate.c
+++ src/moderate.c
@@ -189,11 +189,11 @@
189 );
190 db_prepare(&q, "%s", blob_sql_text(&sql));
191 www_print_timeline(&q, 0, 0, 0, 0, 0, 0, 0);
192 db_finalize(&q);
193 }
194 style_finish_page("modreq");
195 }
196
197 /*
198 ** Disapproves any entries in the modreq table which belong to any
199 ** user whose name is no longer found in the user table. This is only
200
+6 -6
--- src/name.c
+++ src/name.c
@@ -668,11 +668,11 @@
668668
@ </li></ul>
669669
@ </p></li>
670670
}
671671
@ </ol>
672672
db_finalize(&q);
673
- style_body_and_footer("ambiguous");
673
+ style_finish_page("ambiguous");
674674
}
675675
676676
/*
677677
** Convert the name in CGI parameter zParamName into a rid and return that
678678
** rid. If the CGI parameter is missing or is not a valid artifact tag,
@@ -1328,11 +1328,11 @@
13281328
for(i=1; i<=mx; i+=n){
13291329
@ <li> %z(href("%R/bloblist?s=%d&n=%d",i,n))
13301330
@ %d(i)..%d(i+n-1<mx?i+n-1:mx)</a>
13311331
}
13321332
@ </ul>
1333
- style_body_and_footer("bloblist");
1333
+ style_finish_page("bloblist");
13341334
return;
13351335
}
13361336
if( phantomOnly || privOnly || mx>n ){
13371337
style_submenu_element("Index", "bloblist");
13381338
}
@@ -1407,11 +1407,11 @@
14071407
}
14081408
@ </tr>
14091409
}
14101410
@ </table>
14111411
db_finalize(&q);
1412
- style_body_and_footer("bloblist");
1412
+ style_finish_page("bloblist");
14131413
}
14141414
14151415
/*
14161416
** Output HTML that shows a table of all public phantoms.
14171417
*/
@@ -1477,11 +1477,11 @@
14771477
}
14781478
if( g.perm.Write ){
14791479
style_submenu_element("Artifact Stats", "artifact_stats");
14801480
}
14811481
table_of_public_phantoms();
1482
- style_body_and_footer("phantoms");
1482
+ style_finish_page("phantoms");
14831483
}
14841484
14851485
/*
14861486
** WEBPAGE: bigbloblist
14871487
**
@@ -1541,11 +1541,11 @@
15411541
@ </tr>
15421542
}
15431543
@ </tbody></table>
15441544
db_finalize(&q);
15451545
style_table_sorter();
1546
- style_body_and_footer("bigbloblist");
1546
+ style_finish_page("bigbloblist");
15471547
}
15481548
15491549
/*
15501550
** COMMAND: test-unsent
15511551
**
@@ -1665,7 +1665,7 @@
16651665
collision_report("SELECT (SELECT uuid FROM blob WHERE rid=objid)"
16661666
" FROM event WHERE event.type='ci'"
16671667
" ORDER BY 1");
16681668
@ <h1>Hash Prefix Collisions on All Artifacts</h1>
16691669
collision_report("SELECT uuid FROM blob ORDER BY 1");
1670
- style_body_and_footer("hash-collisions");
1670
+ style_finish_page("hash-collisions");
16711671
}
16721672
--- src/name.c
+++ src/name.c
@@ -668,11 +668,11 @@
668 @ </li></ul>
669 @ </p></li>
670 }
671 @ </ol>
672 db_finalize(&q);
673 style_body_and_footer("ambiguous");
674 }
675
676 /*
677 ** Convert the name in CGI parameter zParamName into a rid and return that
678 ** rid. If the CGI parameter is missing or is not a valid artifact tag,
@@ -1328,11 +1328,11 @@
1328 for(i=1; i<=mx; i+=n){
1329 @ <li> %z(href("%R/bloblist?s=%d&n=%d",i,n))
1330 @ %d(i)..%d(i+n-1<mx?i+n-1:mx)</a>
1331 }
1332 @ </ul>
1333 style_body_and_footer("bloblist");
1334 return;
1335 }
1336 if( phantomOnly || privOnly || mx>n ){
1337 style_submenu_element("Index", "bloblist");
1338 }
@@ -1407,11 +1407,11 @@
1407 }
1408 @ </tr>
1409 }
1410 @ </table>
1411 db_finalize(&q);
1412 style_body_and_footer("bloblist");
1413 }
1414
1415 /*
1416 ** Output HTML that shows a table of all public phantoms.
1417 */
@@ -1477,11 +1477,11 @@
1477 }
1478 if( g.perm.Write ){
1479 style_submenu_element("Artifact Stats", "artifact_stats");
1480 }
1481 table_of_public_phantoms();
1482 style_body_and_footer("phantoms");
1483 }
1484
1485 /*
1486 ** WEBPAGE: bigbloblist
1487 **
@@ -1541,11 +1541,11 @@
1541 @ </tr>
1542 }
1543 @ </tbody></table>
1544 db_finalize(&q);
1545 style_table_sorter();
1546 style_body_and_footer("bigbloblist");
1547 }
1548
1549 /*
1550 ** COMMAND: test-unsent
1551 **
@@ -1665,7 +1665,7 @@
1665 collision_report("SELECT (SELECT uuid FROM blob WHERE rid=objid)"
1666 " FROM event WHERE event.type='ci'"
1667 " ORDER BY 1");
1668 @ <h1>Hash Prefix Collisions on All Artifacts</h1>
1669 collision_report("SELECT uuid FROM blob ORDER BY 1");
1670 style_body_and_footer("hash-collisions");
1671 }
1672
--- src/name.c
+++ src/name.c
@@ -668,11 +668,11 @@
668 @ </li></ul>
669 @ </p></li>
670 }
671 @ </ol>
672 db_finalize(&q);
673 style_finish_page("ambiguous");
674 }
675
676 /*
677 ** Convert the name in CGI parameter zParamName into a rid and return that
678 ** rid. If the CGI parameter is missing or is not a valid artifact tag,
@@ -1328,11 +1328,11 @@
1328 for(i=1; i<=mx; i+=n){
1329 @ <li> %z(href("%R/bloblist?s=%d&n=%d",i,n))
1330 @ %d(i)..%d(i+n-1<mx?i+n-1:mx)</a>
1331 }
1332 @ </ul>
1333 style_finish_page("bloblist");
1334 return;
1335 }
1336 if( phantomOnly || privOnly || mx>n ){
1337 style_submenu_element("Index", "bloblist");
1338 }
@@ -1407,11 +1407,11 @@
1407 }
1408 @ </tr>
1409 }
1410 @ </table>
1411 db_finalize(&q);
1412 style_finish_page("bloblist");
1413 }
1414
1415 /*
1416 ** Output HTML that shows a table of all public phantoms.
1417 */
@@ -1477,11 +1477,11 @@
1477 }
1478 if( g.perm.Write ){
1479 style_submenu_element("Artifact Stats", "artifact_stats");
1480 }
1481 table_of_public_phantoms();
1482 style_finish_page("phantoms");
1483 }
1484
1485 /*
1486 ** WEBPAGE: bigbloblist
1487 **
@@ -1541,11 +1541,11 @@
1541 @ </tr>
1542 }
1543 @ </tbody></table>
1544 db_finalize(&q);
1545 style_table_sorter();
1546 style_finish_page("bigbloblist");
1547 }
1548
1549 /*
1550 ** COMMAND: test-unsent
1551 **
@@ -1665,7 +1665,7 @@
1665 collision_report("SELECT (SELECT uuid FROM blob WHERE rid=objid)"
1666 " FROM event WHERE event.type='ci'"
1667 " ORDER BY 1");
1668 @ <h1>Hash Prefix Collisions on All Artifacts</h1>
1669 collision_report("SELECT uuid FROM blob ORDER BY 1");
1670 style_finish_page("hash-collisions");
1671 }
1672
+1 -1
--- src/path.c
+++ src/path.c
@@ -651,7 +651,7 @@
651651
@ <td>%z(href("%R/info/%!S",zUuid))%S(zUuid)</a></td></tr>
652652
}
653653
@ </tbody></table>
654654
db_finalize(&q);
655655
style_table_sorter();
656
- style_body_and_footer("test");
656
+ style_finish_page("test");
657657
}
658658
--- src/path.c
+++ src/path.c
@@ -651,7 +651,7 @@
651 @ <td>%z(href("%R/info/%!S",zUuid))%S(zUuid)</a></td></tr>
652 }
653 @ </tbody></table>
654 db_finalize(&q);
655 style_table_sorter();
656 style_body_and_footer("test");
657 }
658
--- src/path.c
+++ src/path.c
@@ -651,7 +651,7 @@
651 @ <td>%z(href("%R/info/%!S",zUuid))%S(zUuid)</a></td></tr>
652 }
653 @ </tbody></table>
654 db_finalize(&q);
655 style_table_sorter();
656 style_finish_page("test");
657 }
658
+1 -1
--- src/piechart.c
+++ src/piechart.c
@@ -328,7 +328,7 @@
328328
@ <li> <a href='test-piechart?data=2,2,2,2,2,44,44,2,2,2,2,2'>Case 2</a>
329329
@ <li> <a href='test-piechart?data=20,2,2,2,2,2,2,2,2,2,2,80'>Case 3</a>
330330
@ <li> <a href='test-piechart?data=80,2,2,2,2,2,2,2,2,2,2,20'>Case 4</a>
331331
@ <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>
332332
@ </ul>
333
- style_body_and_footer("test");
333
+ style_finish_page("test");
334334
}
335335
--- src/piechart.c
+++ src/piechart.c
@@ -328,7 +328,7 @@
328 @ <li> <a href='test-piechart?data=2,2,2,2,2,44,44,2,2,2,2,2'>Case 2</a>
329 @ <li> <a href='test-piechart?data=20,2,2,2,2,2,2,2,2,2,2,80'>Case 3</a>
330 @ <li> <a href='test-piechart?data=80,2,2,2,2,2,2,2,2,2,2,20'>Case 4</a>
331 @ <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>
332 @ </ul>
333 style_body_and_footer("test");
334 }
335
--- src/piechart.c
+++ src/piechart.c
@@ -328,7 +328,7 @@
328 @ <li> <a href='test-piechart?data=2,2,2,2,2,44,44,2,2,2,2,2'>Case 2</a>
329 @ <li> <a href='test-piechart?data=20,2,2,2,2,2,2,2,2,2,2,80'>Case 3</a>
330 @ <li> <a href='test-piechart?data=80,2,2,2,2,2,2,2,2,2,2,20'>Case 4</a>
331 @ <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>
332 @ </ul>
333 style_finish_page("test");
334 }
335
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -373,11 +373,11 @@
373373
} CX("</div>"/*sbs-wrapper*/);
374374
builtin_fossil_js_bundle_or("fetch", "copybutton", "popupwidget",
375375
"storage", "pikchr", 0);
376376
builtin_request_js("fossil.page.pikchrshow.js");
377377
builtin_fulfill_js_requests();
378
- style_body_and_footer("pikchrshow");
378
+ style_finish_page("pikchrshow");
379379
}
380380
381381
/*
382382
** COMMAND: pikchr*
383383
**
384384
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -373,11 +373,11 @@
373 } CX("</div>"/*sbs-wrapper*/);
374 builtin_fossil_js_bundle_or("fetch", "copybutton", "popupwidget",
375 "storage", "pikchr", 0);
376 builtin_request_js("fossil.page.pikchrshow.js");
377 builtin_fulfill_js_requests();
378 style_body_and_footer("pikchrshow");
379 }
380
381 /*
382 ** COMMAND: pikchr*
383 **
384
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -373,11 +373,11 @@
373 } CX("</div>"/*sbs-wrapper*/);
374 builtin_fossil_js_bundle_or("fetch", "copybutton", "popupwidget",
375 "storage", "pikchr", 0);
376 builtin_request_js("fossil.page.pikchrshow.js");
377 builtin_fulfill_js_requests();
378 style_finish_page("pikchrshow");
379 }
380
381 /*
382 ** COMMAND: pikchr*
383 **
384
+1 -1
--- src/printf.c
+++ src/printf.c
@@ -1101,11 +1101,11 @@
11011101
cgi_set_content_type("text/html");
11021102
style_header("Bad Request");
11031103
etag_cancel();
11041104
@ <p class="generalError">%h(z)</p>
11051105
cgi_set_status(400, "Bad Request");
1106
- style_body_and_footer("error");
1106
+ style_finish_page("error");
11071107
cgi_reply();
11081108
}else if( !g.fQuiet ){
11091109
fossil_force_newline();
11101110
fossil_trace("%s\n", z);
11111111
}
11121112
--- src/printf.c
+++ src/printf.c
@@ -1101,11 +1101,11 @@
1101 cgi_set_content_type("text/html");
1102 style_header("Bad Request");
1103 etag_cancel();
1104 @ <p class="generalError">%h(z)</p>
1105 cgi_set_status(400, "Bad Request");
1106 style_body_and_footer("error");
1107 cgi_reply();
1108 }else if( !g.fQuiet ){
1109 fossil_force_newline();
1110 fossil_trace("%s\n", z);
1111 }
1112
--- src/printf.c
+++ src/printf.c
@@ -1101,11 +1101,11 @@
1101 cgi_set_content_type("text/html");
1102 style_header("Bad Request");
1103 etag_cancel();
1104 @ <p class="generalError">%h(z)</p>
1105 cgi_set_status(400, "Bad Request");
1106 style_finish_page("error");
1107 cgi_reply();
1108 }else if( !g.fQuiet ){
1109 fossil_force_newline();
1110 fossil_trace("%s\n", z);
1111 }
1112
+1 -1
--- src/repolist.c
+++ src/repolist.c
@@ -248,11 +248,11 @@
248248
** for display. */
249249
login_check_credentials();
250250
style_header("Repository List");
251251
@ %s(blob_str(&html))
252252
style_table_sorter();
253
- style_body_and_footer("repolist");
253
+ style_finish_page("repolist");
254254
}else{
255255
/* If no repositories were found that had the "repolist_skin"
256256
** property set, then use a default skin */
257257
@ <html>
258258
@ <head>
259259
--- src/repolist.c
+++ src/repolist.c
@@ -248,11 +248,11 @@
248 ** for display. */
249 login_check_credentials();
250 style_header("Repository List");
251 @ %s(blob_str(&html))
252 style_table_sorter();
253 style_body_and_footer("repolist");
254 }else{
255 /* If no repositories were found that had the "repolist_skin"
256 ** property set, then use a default skin */
257 @ <html>
258 @ <head>
259
--- src/repolist.c
+++ src/repolist.c
@@ -248,11 +248,11 @@
248 ** for display. */
249 login_check_credentials();
250 style_header("Repository List");
251 @ %s(blob_str(&html))
252 style_table_sorter();
253 style_finish_page("repolist");
254 }else{
255 /* If no repositories were found that had the "repolist_skin"
256 ** property set, then use a default skin */
257 @ <html>
258 @ <head>
259
+7 -7
--- src/report.c
+++ src/report.c
@@ -97,11 +97,11 @@
9797
Th_Render(zScript);
9898
9999
blob_reset(&ril);
100100
if( g.thTrace ) Th_Trace("END_REPORTLIST<br />\n", -1);
101101
102
- style_body_and_footer("reportlist");
102
+ style_finish_page("reportlist");
103103
}
104104
105105
/*
106106
** Remove whitespace from both ends of a string.
107107
*/
@@ -319,11 +319,11 @@
319319
db_prepare(&q, "SELECT title, sqlcode, owner, cols "
320320
"FROM reportfmt WHERE rn=%d",rn);
321321
style_header("SQL For Report Format Number %d", rn);
322322
if( db_step(&q)!=SQLITE_ROW ){
323323
@ <p>Unknown report number: %d(rn)</p>
324
- style_body_and_footer("report");
324
+ style_finish_page("report");
325325
db_finalize(&q);
326326
return;
327327
}
328328
zTitle = db_column_text(&q, 0);
329329
zSQL = db_column_text(&q, 1);
@@ -341,11 +341,11 @@
341341
@ <td width=15></td><td valign="top">
342342
output_color_key(zClrKey, 0, "border=0 cellspacing=0 cellpadding=3");
343343
@ </td>
344344
@ </tr></table>
345345
report_format_hints();
346
- style_body_and_footer("report");
346
+ style_finish_page("report");
347347
db_finalize(&q);
348348
}
349349
350350
/*
351351
** WEBPAGE: rptnew
@@ -401,11 +401,11 @@
401401
@ <input type="hidden" name="rn" value="%d(rn)">
402402
login_insert_csrf_secret();
403403
@ <input type="submit" name="del2" value="Delete The Report">
404404
@ <input type="submit" name="can" value="Cancel">
405405
@ </form>
406
- style_body_and_footer("report");
406
+ style_finish_page("report");
407407
return;
408408
}else if( P("can") ){
409409
/* user cancelled */
410410
cgi_redirect("reportlist");
411411
return;
@@ -493,20 +493,20 @@
493493
if( !g.perm.Admin && fossil_strcmp(zOwner,g.zLogin)!=0 ){
494494
@ <p>This report format is owned by %h(zOwner). You are not allowed
495495
@ to change it.</p>
496496
@ </form>
497497
report_format_hints();
498
- style_body_and_footer("report");
498
+ style_finish_page("report");
499499
return;
500500
}
501501
@ <input type="submit" value="Apply Changes" />
502502
if( rn>0 ){
503503
@ <input type="submit" value="Delete This Report" name="del1" />
504504
}
505505
@ </div></form>
506506
report_format_hints();
507
- style_body_and_footer("report");
507
+ style_finish_page("report");
508508
}
509509
510510
/*
511511
** Output a bunch of text that provides information about report
512512
** formats
@@ -1048,11 +1048,11 @@
10481048
@ <p class="reportError">Error: %h(zErr1)</p>
10491049
}else if( zErr2 ){
10501050
@ <p class="reportError">Error: %h(zErr2)</p>
10511051
}
10521052
style_table_sorter();
1053
- style_body_and_footer("report");
1053
+ style_finish_page("report");
10541054
}else{
10551055
report_restrict_sql(&zErr1);
10561056
db_exec_readonly(g.db, zSql, output_tab_separated, &count, &zErr2);
10571057
report_unrestrict_sql();
10581058
cgi_set_content_type("text/plain");
10591059
--- src/report.c
+++ src/report.c
@@ -97,11 +97,11 @@
97 Th_Render(zScript);
98
99 blob_reset(&ril);
100 if( g.thTrace ) Th_Trace("END_REPORTLIST<br />\n", -1);
101
102 style_body_and_footer("reportlist");
103 }
104
105 /*
106 ** Remove whitespace from both ends of a string.
107 */
@@ -319,11 +319,11 @@
319 db_prepare(&q, "SELECT title, sqlcode, owner, cols "
320 "FROM reportfmt WHERE rn=%d",rn);
321 style_header("SQL For Report Format Number %d", rn);
322 if( db_step(&q)!=SQLITE_ROW ){
323 @ <p>Unknown report number: %d(rn)</p>
324 style_body_and_footer("report");
325 db_finalize(&q);
326 return;
327 }
328 zTitle = db_column_text(&q, 0);
329 zSQL = db_column_text(&q, 1);
@@ -341,11 +341,11 @@
341 @ <td width=15></td><td valign="top">
342 output_color_key(zClrKey, 0, "border=0 cellspacing=0 cellpadding=3");
343 @ </td>
344 @ </tr></table>
345 report_format_hints();
346 style_body_and_footer("report");
347 db_finalize(&q);
348 }
349
350 /*
351 ** WEBPAGE: rptnew
@@ -401,11 +401,11 @@
401 @ <input type="hidden" name="rn" value="%d(rn)">
402 login_insert_csrf_secret();
403 @ <input type="submit" name="del2" value="Delete The Report">
404 @ <input type="submit" name="can" value="Cancel">
405 @ </form>
406 style_body_and_footer("report");
407 return;
408 }else if( P("can") ){
409 /* user cancelled */
410 cgi_redirect("reportlist");
411 return;
@@ -493,20 +493,20 @@
493 if( !g.perm.Admin && fossil_strcmp(zOwner,g.zLogin)!=0 ){
494 @ <p>This report format is owned by %h(zOwner). You are not allowed
495 @ to change it.</p>
496 @ </form>
497 report_format_hints();
498 style_body_and_footer("report");
499 return;
500 }
501 @ <input type="submit" value="Apply Changes" />
502 if( rn>0 ){
503 @ <input type="submit" value="Delete This Report" name="del1" />
504 }
505 @ </div></form>
506 report_format_hints();
507 style_body_and_footer("report");
508 }
509
510 /*
511 ** Output a bunch of text that provides information about report
512 ** formats
@@ -1048,11 +1048,11 @@
1048 @ <p class="reportError">Error: %h(zErr1)</p>
1049 }else if( zErr2 ){
1050 @ <p class="reportError">Error: %h(zErr2)</p>
1051 }
1052 style_table_sorter();
1053 style_body_and_footer("report");
1054 }else{
1055 report_restrict_sql(&zErr1);
1056 db_exec_readonly(g.db, zSql, output_tab_separated, &count, &zErr2);
1057 report_unrestrict_sql();
1058 cgi_set_content_type("text/plain");
1059
--- src/report.c
+++ src/report.c
@@ -97,11 +97,11 @@
97 Th_Render(zScript);
98
99 blob_reset(&ril);
100 if( g.thTrace ) Th_Trace("END_REPORTLIST<br />\n", -1);
101
102 style_finish_page("reportlist");
103 }
104
105 /*
106 ** Remove whitespace from both ends of a string.
107 */
@@ -319,11 +319,11 @@
319 db_prepare(&q, "SELECT title, sqlcode, owner, cols "
320 "FROM reportfmt WHERE rn=%d",rn);
321 style_header("SQL For Report Format Number %d", rn);
322 if( db_step(&q)!=SQLITE_ROW ){
323 @ <p>Unknown report number: %d(rn)</p>
324 style_finish_page("report");
325 db_finalize(&q);
326 return;
327 }
328 zTitle = db_column_text(&q, 0);
329 zSQL = db_column_text(&q, 1);
@@ -341,11 +341,11 @@
341 @ <td width=15></td><td valign="top">
342 output_color_key(zClrKey, 0, "border=0 cellspacing=0 cellpadding=3");
343 @ </td>
344 @ </tr></table>
345 report_format_hints();
346 style_finish_page("report");
347 db_finalize(&q);
348 }
349
350 /*
351 ** WEBPAGE: rptnew
@@ -401,11 +401,11 @@
401 @ <input type="hidden" name="rn" value="%d(rn)">
402 login_insert_csrf_secret();
403 @ <input type="submit" name="del2" value="Delete The Report">
404 @ <input type="submit" name="can" value="Cancel">
405 @ </form>
406 style_finish_page("report");
407 return;
408 }else if( P("can") ){
409 /* user cancelled */
410 cgi_redirect("reportlist");
411 return;
@@ -493,20 +493,20 @@
493 if( !g.perm.Admin && fossil_strcmp(zOwner,g.zLogin)!=0 ){
494 @ <p>This report format is owned by %h(zOwner). You are not allowed
495 @ to change it.</p>
496 @ </form>
497 report_format_hints();
498 style_finish_page("report");
499 return;
500 }
501 @ <input type="submit" value="Apply Changes" />
502 if( rn>0 ){
503 @ <input type="submit" value="Delete This Report" name="del1" />
504 }
505 @ </div></form>
506 report_format_hints();
507 style_finish_page("report");
508 }
509
510 /*
511 ** Output a bunch of text that provides information about report
512 ** formats
@@ -1048,11 +1048,11 @@
1048 @ <p class="reportError">Error: %h(zErr1)</p>
1049 }else if( zErr2 ){
1050 @ <p class="reportError">Error: %h(zErr2)</p>
1051 }
1052 style_table_sorter();
1053 style_finish_page("report");
1054 }else{
1055 report_restrict_sql(&zErr1);
1056 db_exec_readonly(g.db, zSql, output_tab_separated, &count, &zErr2);
1057 report_unrestrict_sql();
1058 cgi_set_content_type("text/plain");
1059
+5 -5
--- src/search.c
+++ src/search.c
@@ -1212,11 +1212,11 @@
12121212
*/
12131213
void search_page(void){
12141214
login_check_credentials();
12151215
style_header("Search");
12161216
search_screen(SRCH_ALL, 1);
1217
- style_body_and_footer("search");
1217
+ style_finish_page("search");
12181218
}
12191219
12201220
12211221
/*
12221222
** This is a helper function for search_stext(). Writing into pOut
@@ -1981,11 +1981,11 @@
19811981
int cnt1 = 0, cnt2 = 0, cnt3 = 0;
19821982
login_check_credentials();
19831983
if( !g.perm.Admin ){ login_needed(0); return; }
19841984
if( !search_index_exists() ){
19851985
@ <p>Indexed search is disabled
1986
- style_body_and_footer("report");
1986
+ style_finish_page("report");
19871987
return;
19881988
}
19891989
search_sql_setup(g.db);
19901990
style_submenu_element("Setup","%R/srchsetup");
19911991
if( zId!=0 && (id = atoi(zId))>0 ){
@@ -2025,11 +2025,11 @@
20252025
style_submenu_element(zName,"%R/test-ftsdocs?y=%c&ixed=1",zDocId[0]);
20262026
zName = mprintf("Unindexed '%c' docs",zDocId[0]);
20272027
style_submenu_element(zName,"%R/test-ftsdocs?y=%c&ixed=0",zDocId[0]);
20282028
}
20292029
db_finalize(&q);
2030
- style_body_and_footer("test");
2030
+ style_finish_page("test");
20312031
return;
20322032
}
20332033
if( zType!=0 && zType[0]!=0 && zType[1]==0 &&
20342034
zIdxed!=0 && (zIdxed[0]=='1' || zIdxed[0]=='0') && zIdxed[1]==0
20352035
){
@@ -2055,11 +2055,11 @@
20552055
@ <li> <a href='test-ftsdocs?id=%d(db_column_int(&q,0))'>
20562056
@ %h(db_column_text(&q,1))</a>
20572057
}
20582058
@ </ul>
20592059
db_finalize(&q);
2060
- style_body_and_footer("test");
2060
+ style_finish_page("test");
20612061
return;
20622062
}
20632063
style_header("Summary of ftsdocs");
20642064
db_prepare(&q,
20652065
"SELECT type, sum(idxed IS TRUE), sum(idxed IS FALSE), count(*)"
@@ -2099,7 +2099,7 @@
20992099
@ </tbody><tfooter>
21002100
@ <tr><th>Total<th align="right">%d(cnt1)<th align="right">%d(cnt2)
21012101
@ <th align="right">%d(cnt3)
21022102
@ </tfooter>
21032103
@ </table>
2104
- style_body_and_footer("test");
2104
+ style_finish_page("test");
21052105
}
21062106
--- src/search.c
+++ src/search.c
@@ -1212,11 +1212,11 @@
1212 */
1213 void search_page(void){
1214 login_check_credentials();
1215 style_header("Search");
1216 search_screen(SRCH_ALL, 1);
1217 style_body_and_footer("search");
1218 }
1219
1220
1221 /*
1222 ** This is a helper function for search_stext(). Writing into pOut
@@ -1981,11 +1981,11 @@
1981 int cnt1 = 0, cnt2 = 0, cnt3 = 0;
1982 login_check_credentials();
1983 if( !g.perm.Admin ){ login_needed(0); return; }
1984 if( !search_index_exists() ){
1985 @ <p>Indexed search is disabled
1986 style_body_and_footer("report");
1987 return;
1988 }
1989 search_sql_setup(g.db);
1990 style_submenu_element("Setup","%R/srchsetup");
1991 if( zId!=0 && (id = atoi(zId))>0 ){
@@ -2025,11 +2025,11 @@
2025 style_submenu_element(zName,"%R/test-ftsdocs?y=%c&ixed=1",zDocId[0]);
2026 zName = mprintf("Unindexed '%c' docs",zDocId[0]);
2027 style_submenu_element(zName,"%R/test-ftsdocs?y=%c&ixed=0",zDocId[0]);
2028 }
2029 db_finalize(&q);
2030 style_body_and_footer("test");
2031 return;
2032 }
2033 if( zType!=0 && zType[0]!=0 && zType[1]==0 &&
2034 zIdxed!=0 && (zIdxed[0]=='1' || zIdxed[0]=='0') && zIdxed[1]==0
2035 ){
@@ -2055,11 +2055,11 @@
2055 @ <li> <a href='test-ftsdocs?id=%d(db_column_int(&q,0))'>
2056 @ %h(db_column_text(&q,1))</a>
2057 }
2058 @ </ul>
2059 db_finalize(&q);
2060 style_body_and_footer("test");
2061 return;
2062 }
2063 style_header("Summary of ftsdocs");
2064 db_prepare(&q,
2065 "SELECT type, sum(idxed IS TRUE), sum(idxed IS FALSE), count(*)"
@@ -2099,7 +2099,7 @@
2099 @ </tbody><tfooter>
2100 @ <tr><th>Total<th align="right">%d(cnt1)<th align="right">%d(cnt2)
2101 @ <th align="right">%d(cnt3)
2102 @ </tfooter>
2103 @ </table>
2104 style_body_and_footer("test");
2105 }
2106
--- src/search.c
+++ src/search.c
@@ -1212,11 +1212,11 @@
1212 */
1213 void search_page(void){
1214 login_check_credentials();
1215 style_header("Search");
1216 search_screen(SRCH_ALL, 1);
1217 style_finish_page("search");
1218 }
1219
1220
1221 /*
1222 ** This is a helper function for search_stext(). Writing into pOut
@@ -1981,11 +1981,11 @@
1981 int cnt1 = 0, cnt2 = 0, cnt3 = 0;
1982 login_check_credentials();
1983 if( !g.perm.Admin ){ login_needed(0); return; }
1984 if( !search_index_exists() ){
1985 @ <p>Indexed search is disabled
1986 style_finish_page("report");
1987 return;
1988 }
1989 search_sql_setup(g.db);
1990 style_submenu_element("Setup","%R/srchsetup");
1991 if( zId!=0 && (id = atoi(zId))>0 ){
@@ -2025,11 +2025,11 @@
2025 style_submenu_element(zName,"%R/test-ftsdocs?y=%c&ixed=1",zDocId[0]);
2026 zName = mprintf("Unindexed '%c' docs",zDocId[0]);
2027 style_submenu_element(zName,"%R/test-ftsdocs?y=%c&ixed=0",zDocId[0]);
2028 }
2029 db_finalize(&q);
2030 style_finish_page("test");
2031 return;
2032 }
2033 if( zType!=0 && zType[0]!=0 && zType[1]==0 &&
2034 zIdxed!=0 && (zIdxed[0]=='1' || zIdxed[0]=='0') && zIdxed[1]==0
2035 ){
@@ -2055,11 +2055,11 @@
2055 @ <li> <a href='test-ftsdocs?id=%d(db_column_int(&q,0))'>
2056 @ %h(db_column_text(&q,1))</a>
2057 }
2058 @ </ul>
2059 db_finalize(&q);
2060 style_finish_page("test");
2061 return;
2062 }
2063 style_header("Summary of ftsdocs");
2064 db_prepare(&q,
2065 "SELECT type, sum(idxed IS TRUE), sum(idxed IS FALSE), count(*)"
@@ -2099,7 +2099,7 @@
2099 @ </tbody><tfooter>
2100 @ <tr><th>Total<th align="right">%d(cnt1)<th align="right">%d(cnt2)
2101 @ <th align="right">%d(cnt3)
2102 @ </tfooter>
2103 @ </table>
2104 style_finish_page("test");
2105 }
2106
--- src/security_audit.c
+++ src/security_audit.c
@@ -585,11 +585,11 @@
585585
table_of_public_phantoms();
586586
@ </li>
587587
}
588588
589589
@ </ol>
590
- style_body_and_footer("secaudit");
590
+ style_finish_page("secaudit");
591591
}
592592
593593
/*
594594
** WEBPAGE: takeitprivate
595595
**
@@ -627,11 +627,11 @@
627627
@ <form action="%s(g.zPath)" method="post">
628628
@ <input type="submit" name="apply" value="Make It Private">
629629
@ <input type="submit" name="cancel" value="Cancel">
630630
@ </form>
631631
632
- style_body_and_footer("takeitprivate");
632
+ style_finish_page("takeitprivate");
633633
}
634634
635635
/*
636636
** The maximum number of bytes of log to show
637637
*/
@@ -668,11 +668,11 @@
668668
@ If the server is running using one of
669669
@ the "fossil http" or "fossil server" commands then add
670670
@ a command-line option "--errorlog <i>FILENAME</i>" to that
671671
@ command.
672672
@ </ol>
673
- style_body_and_footer("errorlog");
673
+ style_finish_page("errorlog");
674674
return;
675675
}
676676
if( P("truncate1") && cgi_csrf_safe(1) ){
677677
fclose(fopen(g.zErrlog,"w"));
678678
}
@@ -688,20 +688,20 @@
688688
@ <form action="%R/errorlog" method="POST">
689689
@ <p>Confirm that you want to truncate the %,lld(szFile)-byte error log:
690690
@ <input type="submit" name="truncate1" value="Confirm">
691691
@ <input type="submit" name="cancel" value="Cancel">
692692
@ </form>
693
- style_body_and_footer("errorlog");
693
+ style_finish_page("errorlog");
694694
return;
695695
}
696696
@ <p>The server error log at "%h(g.zErrlog)" is %,lld(szFile) bytes in size.
697697
style_submenu_element("Download", "%R/errorlog?download");
698698
style_submenu_element("Truncate", "%R/errorlog?truncate");
699699
in = fossil_fopen(g.zErrlog, "rb");
700700
if( in==0 ){
701701
@ <p class='generalError'>Unable to open that file for reading!</p>
702
- style_body_and_footer("errorlog");
702
+ style_finish_page("errorlog");
703703
return;
704704
}
705705
if( szFile>MXSHOWLOG && P("all")==0 ){
706706
@ <form action="%R/errorlog" method="POST">
707707
@ <p>Only the last %,d(MXSHOWLOG) bytes are shown.
@@ -714,7 +714,7 @@
714714
while( fgets(z, sizeof(z), in) ){
715715
@ %h(z)\
716716
}
717717
fclose(in);
718718
@ </pre>
719
- style_body_and_footer("errorlog");
719
+ style_finish_page("errorlog");
720720
}
721721
--- src/security_audit.c
+++ src/security_audit.c
@@ -585,11 +585,11 @@
585 table_of_public_phantoms();
586 @ </li>
587 }
588
589 @ </ol>
590 style_body_and_footer("secaudit");
591 }
592
593 /*
594 ** WEBPAGE: takeitprivate
595 **
@@ -627,11 +627,11 @@
627 @ <form action="%s(g.zPath)" method="post">
628 @ <input type="submit" name="apply" value="Make It Private">
629 @ <input type="submit" name="cancel" value="Cancel">
630 @ </form>
631
632 style_body_and_footer("takeitprivate");
633 }
634
635 /*
636 ** The maximum number of bytes of log to show
637 */
@@ -668,11 +668,11 @@
668 @ If the server is running using one of
669 @ the "fossil http" or "fossil server" commands then add
670 @ a command-line option "--errorlog <i>FILENAME</i>" to that
671 @ command.
672 @ </ol>
673 style_body_and_footer("errorlog");
674 return;
675 }
676 if( P("truncate1") && cgi_csrf_safe(1) ){
677 fclose(fopen(g.zErrlog,"w"));
678 }
@@ -688,20 +688,20 @@
688 @ <form action="%R/errorlog" method="POST">
689 @ <p>Confirm that you want to truncate the %,lld(szFile)-byte error log:
690 @ <input type="submit" name="truncate1" value="Confirm">
691 @ <input type="submit" name="cancel" value="Cancel">
692 @ </form>
693 style_body_and_footer("errorlog");
694 return;
695 }
696 @ <p>The server error log at "%h(g.zErrlog)" is %,lld(szFile) bytes in size.
697 style_submenu_element("Download", "%R/errorlog?download");
698 style_submenu_element("Truncate", "%R/errorlog?truncate");
699 in = fossil_fopen(g.zErrlog, "rb");
700 if( in==0 ){
701 @ <p class='generalError'>Unable to open that file for reading!</p>
702 style_body_and_footer("errorlog");
703 return;
704 }
705 if( szFile>MXSHOWLOG && P("all")==0 ){
706 @ <form action="%R/errorlog" method="POST">
707 @ <p>Only the last %,d(MXSHOWLOG) bytes are shown.
@@ -714,7 +714,7 @@
714 while( fgets(z, sizeof(z), in) ){
715 @ %h(z)\
716 }
717 fclose(in);
718 @ </pre>
719 style_body_and_footer("errorlog");
720 }
721
--- src/security_audit.c
+++ src/security_audit.c
@@ -585,11 +585,11 @@
585 table_of_public_phantoms();
586 @ </li>
587 }
588
589 @ </ol>
590 style_finish_page("secaudit");
591 }
592
593 /*
594 ** WEBPAGE: takeitprivate
595 **
@@ -627,11 +627,11 @@
627 @ <form action="%s(g.zPath)" method="post">
628 @ <input type="submit" name="apply" value="Make It Private">
629 @ <input type="submit" name="cancel" value="Cancel">
630 @ </form>
631
632 style_finish_page("takeitprivate");
633 }
634
635 /*
636 ** The maximum number of bytes of log to show
637 */
@@ -668,11 +668,11 @@
668 @ If the server is running using one of
669 @ the "fossil http" or "fossil server" commands then add
670 @ a command-line option "--errorlog <i>FILENAME</i>" to that
671 @ command.
672 @ </ol>
673 style_finish_page("errorlog");
674 return;
675 }
676 if( P("truncate1") && cgi_csrf_safe(1) ){
677 fclose(fopen(g.zErrlog,"w"));
678 }
@@ -688,20 +688,20 @@
688 @ <form action="%R/errorlog" method="POST">
689 @ <p>Confirm that you want to truncate the %,lld(szFile)-byte error log:
690 @ <input type="submit" name="truncate1" value="Confirm">
691 @ <input type="submit" name="cancel" value="Cancel">
692 @ </form>
693 style_finish_page("errorlog");
694 return;
695 }
696 @ <p>The server error log at "%h(g.zErrlog)" is %,lld(szFile) bytes in size.
697 style_submenu_element("Download", "%R/errorlog?download");
698 style_submenu_element("Truncate", "%R/errorlog?truncate");
699 in = fossil_fopen(g.zErrlog, "rb");
700 if( in==0 ){
701 @ <p class='generalError'>Unable to open that file for reading!</p>
702 style_finish_page("errorlog");
703 return;
704 }
705 if( szFile>MXSHOWLOG && P("all")==0 ){
706 @ <form action="%R/errorlog" method="POST">
707 @ <p>Only the last %,d(MXSHOWLOG) bytes are shown.
@@ -714,7 +714,7 @@
714 while( fgets(z, sizeof(z), in) ){
715 @ %h(z)\
716 }
717 fclose(in);
718 @ </pre>
719 style_finish_page("errorlog");
720 }
721
+15 -15
--- src/setup.c
+++ src/setup.c
@@ -175,11 +175,11 @@
175175
setup_menu_entry("TH1", "admin_th1",
176176
"Enter raw TH1 commands");
177177
}
178178
@ </table>
179179
180
- style_body_and_footer("setup");
180
+ style_finish_page("setup");
181181
}
182182
183183
/*
184184
** Generate a checkbox for an attribute.
185185
*/
@@ -576,11 +576,11 @@
576576
577577
@ <hr />
578578
@ <p><input type="submit" name="submit" value="Apply Changes" /></p>
579579
@ </div></form>
580580
db_end_transaction(0);
581
- style_body_and_footer("setup");
581
+ style_finish_page("setup");
582582
}
583583
584584
/*
585585
** WEBPAGE: setup_login_group
586586
**
@@ -704,11 +704,11 @@
704704
}
705705
db_finalize(&q);
706706
@ </tbody></table>
707707
style_table_sorter();
708708
}
709
- style_body_and_footer("setup");
709
+ style_finish_page("setup");
710710
}
711711
712712
/*
713713
** WEBPAGE: setup_timeline
714714
**
@@ -843,11 +843,11 @@
843843
844844
@ <hr />
845845
@ <p><input type="submit" name="submit" value="Apply Changes" /></p>
846846
@ </div></form>
847847
db_end_transaction(0);
848
- style_body_and_footer("setup");
848
+ style_finish_page("setup");
849849
}
850850
851851
/*
852852
** WEBPAGE: setup_settings
853853
**
@@ -936,11 +936,11 @@
936936
}
937937
}
938938
@ </td></tr></table>
939939
@ </div></form>
940940
db_end_transaction(0);
941
- style_body_and_footer("setup");
941
+ style_finish_page("setup");
942942
}
943943
944944
/*
945945
** WEBPAGE: setup_config
946946
**
@@ -1032,11 +1032,11 @@
10321032
@ (Property: sitemap-contact)
10331033
@ <hr />
10341034
@ <p><input type="submit" name="submit" value="Apply Changes" /></p>
10351035
@ </div></form>
10361036
db_end_transaction(0);
1037
- style_body_and_footer("setup");
1037
+ style_finish_page("setup");
10381038
}
10391039
10401040
/*
10411041
** WEBPAGE: setup_wiki
10421042
**
@@ -1108,11 +1108,11 @@
11081108
@ (Property: "wiki-use-html")
11091109
@ <hr />
11101110
@ <p><input type="submit" name="submit" value="Apply Changes" /></p>
11111111
@ </div></form>
11121112
db_end_transaction(0);
1113
- style_body_and_footer("setup");
1113
+ style_finish_page("setup");
11141114
}
11151115
11161116
/*
11171117
** WEBPAGE: setup_modreq
11181118
**
@@ -1154,11 +1154,11 @@
11541154
11551155
@ <hr />
11561156
@ <p><input type="submit" name="submit" value="Apply Changes" /></p>
11571157
@ </div></form>
11581158
db_end_transaction(0);
1159
- style_body_and_footer("setup");
1159
+ style_finish_page("setup");
11601160
11611161
}
11621162
11631163
/*
11641164
** WEBPAGE: setup_adunit
@@ -1235,11 +1235,11 @@
12351235
@ border: 1px solid #f11;
12361236
@ background-color: #fcc;
12371237
@ '&gt;Demo Ad&lt;/div&gt;
12381238
@ </pre></blockquote>
12391239
@ </li>
1240
- style_body_and_footer("setup");
1240
+ style_finish_page("setup");
12411241
db_end_transaction(0);
12421242
}
12431243
12441244
/*
12451245
** WEBPAGE: setup_logo
@@ -1437,11 +1437,11 @@
14371437
@ <hr />
14381438
@
14391439
@ <p><span class="note">Note:</span> Your browser has probably cached these
14401440
@ images, so you may need to press the Reload button before changes will
14411441
@ take effect. </p>
1442
- style_body_and_footer("setup");
1442
+ style_finish_page("setup");
14431443
db_end_transaction(0);
14441444
}
14451445
14461446
/*
14471447
** Prevent the RAW SQL feature from being used to ATTACH a different
@@ -1599,11 +1599,11 @@
15991599
}
16001600
sqlite3_finalize(pStmt);
16011601
@ </table>
16021602
}
16031603
}
1604
- style_body_and_footer("setup");
1604
+ style_finish_page("setup");
16051605
}
16061606
16071607
16081608
/*
16091609
** WEBPAGE: admin_th1
@@ -1643,11 +1643,11 @@
16431643
@ <pre class="th1result">%h(zR)</pre>
16441644
}else{
16451645
@ <pre class="th1error">%h(zR)</pre>
16461646
}
16471647
}
1648
- style_body_and_footer("setup");
1648
+ style_finish_page("setup");
16491649
}
16501650
16511651
/*
16521652
** WEBPAGE: admin_log
16531653
**
@@ -1710,11 +1710,11 @@
17101710
db_finalize(&stLog);
17111711
@ </tbody></table>
17121712
if( counter>ofst+limit ){
17131713
@ <p><a href="admin_log?n=%d(limit)&x=%d(limit+ofst)">[Older]</a></p>
17141714
}
1715
- style_body_and_footer("setup");
1715
+ style_finish_page("setup");
17161716
}
17171717
17181718
/*
17191719
** WEBPAGE: srchsetup
17201720
**
@@ -1790,11 +1790,11 @@
17901790
@ larger repositories.</p>
17911791
onoff_attribute("Use Porter Stemmer","search-stemmer","ss",0,0);
17921792
@ <p><input type="submit" name="fts1" value="Create A Full-Text Index">
17931793
}
17941794
@ </div></form>
1795
- style_body_and_footer("setup");
1795
+ style_finish_page("setup");
17961796
}
17971797
17981798
/*
17991799
** A URL Alias originally called zOldName is now zNewName/zValue.
18001800
** Write SQL to make this change into pSql.
@@ -1948,7 +1948,7 @@
19481948
@ <p>To delete an entry from the alias table, change its name or value to an
19491949
@ empty string and press "Apply Changes".
19501950
@
19511951
@ <p>To add a new alias, fill in the name and value in the bottom row
19521952
@ of the table above and press "Apply Changes".
1953
- style_body_and_footer("setup");
1953
+ style_finish_page("setup");
19541954
}
19551955
--- src/setup.c
+++ src/setup.c
@@ -175,11 +175,11 @@
175 setup_menu_entry("TH1", "admin_th1",
176 "Enter raw TH1 commands");
177 }
178 @ </table>
179
180 style_body_and_footer("setup");
181 }
182
183 /*
184 ** Generate a checkbox for an attribute.
185 */
@@ -576,11 +576,11 @@
576
577 @ <hr />
578 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
579 @ </div></form>
580 db_end_transaction(0);
581 style_body_and_footer("setup");
582 }
583
584 /*
585 ** WEBPAGE: setup_login_group
586 **
@@ -704,11 +704,11 @@
704 }
705 db_finalize(&q);
706 @ </tbody></table>
707 style_table_sorter();
708 }
709 style_body_and_footer("setup");
710 }
711
712 /*
713 ** WEBPAGE: setup_timeline
714 **
@@ -843,11 +843,11 @@
843
844 @ <hr />
845 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
846 @ </div></form>
847 db_end_transaction(0);
848 style_body_and_footer("setup");
849 }
850
851 /*
852 ** WEBPAGE: setup_settings
853 **
@@ -936,11 +936,11 @@
936 }
937 }
938 @ </td></tr></table>
939 @ </div></form>
940 db_end_transaction(0);
941 style_body_and_footer("setup");
942 }
943
944 /*
945 ** WEBPAGE: setup_config
946 **
@@ -1032,11 +1032,11 @@
1032 @ (Property: sitemap-contact)
1033 @ <hr />
1034 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
1035 @ </div></form>
1036 db_end_transaction(0);
1037 style_body_and_footer("setup");
1038 }
1039
1040 /*
1041 ** WEBPAGE: setup_wiki
1042 **
@@ -1108,11 +1108,11 @@
1108 @ (Property: "wiki-use-html")
1109 @ <hr />
1110 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
1111 @ </div></form>
1112 db_end_transaction(0);
1113 style_body_and_footer("setup");
1114 }
1115
1116 /*
1117 ** WEBPAGE: setup_modreq
1118 **
@@ -1154,11 +1154,11 @@
1154
1155 @ <hr />
1156 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
1157 @ </div></form>
1158 db_end_transaction(0);
1159 style_body_and_footer("setup");
1160
1161 }
1162
1163 /*
1164 ** WEBPAGE: setup_adunit
@@ -1235,11 +1235,11 @@
1235 @ border: 1px solid #f11;
1236 @ background-color: #fcc;
1237 @ '&gt;Demo Ad&lt;/div&gt;
1238 @ </pre></blockquote>
1239 @ </li>
1240 style_body_and_footer("setup");
1241 db_end_transaction(0);
1242 }
1243
1244 /*
1245 ** WEBPAGE: setup_logo
@@ -1437,11 +1437,11 @@
1437 @ <hr />
1438 @
1439 @ <p><span class="note">Note:</span> Your browser has probably cached these
1440 @ images, so you may need to press the Reload button before changes will
1441 @ take effect. </p>
1442 style_body_and_footer("setup");
1443 db_end_transaction(0);
1444 }
1445
1446 /*
1447 ** Prevent the RAW SQL feature from being used to ATTACH a different
@@ -1599,11 +1599,11 @@
1599 }
1600 sqlite3_finalize(pStmt);
1601 @ </table>
1602 }
1603 }
1604 style_body_and_footer("setup");
1605 }
1606
1607
1608 /*
1609 ** WEBPAGE: admin_th1
@@ -1643,11 +1643,11 @@
1643 @ <pre class="th1result">%h(zR)</pre>
1644 }else{
1645 @ <pre class="th1error">%h(zR)</pre>
1646 }
1647 }
1648 style_body_and_footer("setup");
1649 }
1650
1651 /*
1652 ** WEBPAGE: admin_log
1653 **
@@ -1710,11 +1710,11 @@
1710 db_finalize(&stLog);
1711 @ </tbody></table>
1712 if( counter>ofst+limit ){
1713 @ <p><a href="admin_log?n=%d(limit)&x=%d(limit+ofst)">[Older]</a></p>
1714 }
1715 style_body_and_footer("setup");
1716 }
1717
1718 /*
1719 ** WEBPAGE: srchsetup
1720 **
@@ -1790,11 +1790,11 @@
1790 @ larger repositories.</p>
1791 onoff_attribute("Use Porter Stemmer","search-stemmer","ss",0,0);
1792 @ <p><input type="submit" name="fts1" value="Create A Full-Text Index">
1793 }
1794 @ </div></form>
1795 style_body_and_footer("setup");
1796 }
1797
1798 /*
1799 ** A URL Alias originally called zOldName is now zNewName/zValue.
1800 ** Write SQL to make this change into pSql.
@@ -1948,7 +1948,7 @@
1948 @ <p>To delete an entry from the alias table, change its name or value to an
1949 @ empty string and press "Apply Changes".
1950 @
1951 @ <p>To add a new alias, fill in the name and value in the bottom row
1952 @ of the table above and press "Apply Changes".
1953 style_body_and_footer("setup");
1954 }
1955
--- src/setup.c
+++ src/setup.c
@@ -175,11 +175,11 @@
175 setup_menu_entry("TH1", "admin_th1",
176 "Enter raw TH1 commands");
177 }
178 @ </table>
179
180 style_finish_page("setup");
181 }
182
183 /*
184 ** Generate a checkbox for an attribute.
185 */
@@ -576,11 +576,11 @@
576
577 @ <hr />
578 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
579 @ </div></form>
580 db_end_transaction(0);
581 style_finish_page("setup");
582 }
583
584 /*
585 ** WEBPAGE: setup_login_group
586 **
@@ -704,11 +704,11 @@
704 }
705 db_finalize(&q);
706 @ </tbody></table>
707 style_table_sorter();
708 }
709 style_finish_page("setup");
710 }
711
712 /*
713 ** WEBPAGE: setup_timeline
714 **
@@ -843,11 +843,11 @@
843
844 @ <hr />
845 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
846 @ </div></form>
847 db_end_transaction(0);
848 style_finish_page("setup");
849 }
850
851 /*
852 ** WEBPAGE: setup_settings
853 **
@@ -936,11 +936,11 @@
936 }
937 }
938 @ </td></tr></table>
939 @ </div></form>
940 db_end_transaction(0);
941 style_finish_page("setup");
942 }
943
944 /*
945 ** WEBPAGE: setup_config
946 **
@@ -1032,11 +1032,11 @@
1032 @ (Property: sitemap-contact)
1033 @ <hr />
1034 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
1035 @ </div></form>
1036 db_end_transaction(0);
1037 style_finish_page("setup");
1038 }
1039
1040 /*
1041 ** WEBPAGE: setup_wiki
1042 **
@@ -1108,11 +1108,11 @@
1108 @ (Property: "wiki-use-html")
1109 @ <hr />
1110 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
1111 @ </div></form>
1112 db_end_transaction(0);
1113 style_finish_page("setup");
1114 }
1115
1116 /*
1117 ** WEBPAGE: setup_modreq
1118 **
@@ -1154,11 +1154,11 @@
1154
1155 @ <hr />
1156 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
1157 @ </div></form>
1158 db_end_transaction(0);
1159 style_finish_page("setup");
1160
1161 }
1162
1163 /*
1164 ** WEBPAGE: setup_adunit
@@ -1235,11 +1235,11 @@
1235 @ border: 1px solid #f11;
1236 @ background-color: #fcc;
1237 @ '&gt;Demo Ad&lt;/div&gt;
1238 @ </pre></blockquote>
1239 @ </li>
1240 style_finish_page("setup");
1241 db_end_transaction(0);
1242 }
1243
1244 /*
1245 ** WEBPAGE: setup_logo
@@ -1437,11 +1437,11 @@
1437 @ <hr />
1438 @
1439 @ <p><span class="note">Note:</span> Your browser has probably cached these
1440 @ images, so you may need to press the Reload button before changes will
1441 @ take effect. </p>
1442 style_finish_page("setup");
1443 db_end_transaction(0);
1444 }
1445
1446 /*
1447 ** Prevent the RAW SQL feature from being used to ATTACH a different
@@ -1599,11 +1599,11 @@
1599 }
1600 sqlite3_finalize(pStmt);
1601 @ </table>
1602 }
1603 }
1604 style_finish_page("setup");
1605 }
1606
1607
1608 /*
1609 ** WEBPAGE: admin_th1
@@ -1643,11 +1643,11 @@
1643 @ <pre class="th1result">%h(zR)</pre>
1644 }else{
1645 @ <pre class="th1error">%h(zR)</pre>
1646 }
1647 }
1648 style_finish_page("setup");
1649 }
1650
1651 /*
1652 ** WEBPAGE: admin_log
1653 **
@@ -1710,11 +1710,11 @@
1710 db_finalize(&stLog);
1711 @ </tbody></table>
1712 if( counter>ofst+limit ){
1713 @ <p><a href="admin_log?n=%d(limit)&x=%d(limit+ofst)">[Older]</a></p>
1714 }
1715 style_finish_page("setup");
1716 }
1717
1718 /*
1719 ** WEBPAGE: srchsetup
1720 **
@@ -1790,11 +1790,11 @@
1790 @ larger repositories.</p>
1791 onoff_attribute("Use Porter Stemmer","search-stemmer","ss",0,0);
1792 @ <p><input type="submit" name="fts1" value="Create A Full-Text Index">
1793 }
1794 @ </div></form>
1795 style_finish_page("setup");
1796 }
1797
1798 /*
1799 ** A URL Alias originally called zOldName is now zNewName/zValue.
1800 ** Write SQL to make this change into pSql.
@@ -1948,7 +1948,7 @@
1948 @ <p>To delete an entry from the alias table, change its name or value to an
1949 @ empty string and press "Apply Changes".
1950 @
1951 @ <p>To add a new alias, fill in the name and value in the bottom row
1952 @ of the table above and press "Apply Changes".
1953 style_finish_page("setup");
1954 }
1955
+7 -7
--- src/setupuser.c
+++ src/setupuser.c
@@ -180,11 +180,11 @@
180180
fossil_free(zAge);
181181
}
182182
@ </tbody></table>
183183
db_finalize(&s);
184184
style_table_sorter();
185
- style_body_and_footer("setupuser");
185
+ style_finish_page("setupuser");
186186
}
187187
188188
/*
189189
** WEBPAGE: setup_ulist_notes
190190
**
@@ -226,11 +226,11 @@
226226
@
227227
@ <li><p>The permission flags are as follows:</p>
228228
capabilities_table(CAPCLASS_ALL);
229229
@ </li>
230230
@ </ol>
231
- style_body_and_footer("setupuser");
231
+ style_finish_page("setupuser");
232232
}
233233
234234
/*
235235
** WEBPAGE: setup_ucap_list
236236
**
@@ -253,11 +253,11 @@
253253
capabilities_table(CAPCLASS_WIKI);
254254
@ <h1>Administrative capabilities</h1>
255255
capabilities_table(CAPCLASS_SUPER);
256256
@ <h1>Miscellaneous capabilities</h1>
257257
capabilities_table(CAPCLASS_OTHER);
258
- style_body_and_footer("setupuser");
258
+ style_finish_page("setupuser");
259259
}
260260
261261
/*
262262
** Return true if zPw is a valid password string. A valid
263263
** password string is:
@@ -387,11 +387,11 @@
387387
style_header("User Creation Error");
388388
@ <span class="loginError">Empty login not allowed.</span>
389389
@
390390
@ <p><a href="setup_uedit?id=%d(uid)&referer=%T(zRef)">
391391
@ [Bummer]</a></p>
392
- style_body_and_footer("setupuser");
392
+ style_finish_page("setupuser");
393393
return;
394394
}
395395
if( isValidPwString(zPw) ){
396396
zPw = sha1_shared_secret(zPw, zLogin, 0);
397397
}else{
@@ -404,11 +404,11 @@
404404
@ <span class="loginError">Login "%h(zLogin)" is already used by
405405
@ a different user.</span>
406406
@
407407
@ <p><a href="setup_uedit?id=%d(uid)&referer=%T(zRef)">
408408
@ [Bummer]</a></p>
409
- style_body_and_footer("setupuser");
409
+ style_finish_page("setupuser");
410410
return;
411411
}
412412
login_verify_csrf_secret();
413413
db_unprotect(PROTECT_USER);
414414
db_multi_exec(
@@ -456,11 +456,11 @@
456456
admin_log( "Error updating user '%q': %s'.", zLogin, zErr );
457457
@ <span class="loginError">%h(zErr)</span>
458458
@
459459
@ <p><a href="setup_uedit?id=%d(uid)&referer=%T(zRef)">
460460
@ [Bummer]</a></p>
461
- style_body_and_footer("setupuser");
461
+ style_finish_page("setupuser");
462462
return;
463463
}
464464
}
465465
cgi_redirect(cgi_referer("setup_ulist"));
466466
return;
@@ -874,7 +874,7 @@
874874
@ template for users who are allowed more access than
875875
@ <span class="usertype">anonymous</span>,
876876
@ but less than a <span class="usertype">developer</span>.
877877
@ </p></li>
878878
@ </ul>
879
- style_body_and_footer("setupuser");
879
+ style_finish_page("setupuser");
880880
}
881881
--- src/setupuser.c
+++ src/setupuser.c
@@ -180,11 +180,11 @@
180 fossil_free(zAge);
181 }
182 @ </tbody></table>
183 db_finalize(&s);
184 style_table_sorter();
185 style_body_and_footer("setupuser");
186 }
187
188 /*
189 ** WEBPAGE: setup_ulist_notes
190 **
@@ -226,11 +226,11 @@
226 @
227 @ <li><p>The permission flags are as follows:</p>
228 capabilities_table(CAPCLASS_ALL);
229 @ </li>
230 @ </ol>
231 style_body_and_footer("setupuser");
232 }
233
234 /*
235 ** WEBPAGE: setup_ucap_list
236 **
@@ -253,11 +253,11 @@
253 capabilities_table(CAPCLASS_WIKI);
254 @ <h1>Administrative capabilities</h1>
255 capabilities_table(CAPCLASS_SUPER);
256 @ <h1>Miscellaneous capabilities</h1>
257 capabilities_table(CAPCLASS_OTHER);
258 style_body_and_footer("setupuser");
259 }
260
261 /*
262 ** Return true if zPw is a valid password string. A valid
263 ** password string is:
@@ -387,11 +387,11 @@
387 style_header("User Creation Error");
388 @ <span class="loginError">Empty login not allowed.</span>
389 @
390 @ <p><a href="setup_uedit?id=%d(uid)&referer=%T(zRef)">
391 @ [Bummer]</a></p>
392 style_body_and_footer("setupuser");
393 return;
394 }
395 if( isValidPwString(zPw) ){
396 zPw = sha1_shared_secret(zPw, zLogin, 0);
397 }else{
@@ -404,11 +404,11 @@
404 @ <span class="loginError">Login "%h(zLogin)" is already used by
405 @ a different user.</span>
406 @
407 @ <p><a href="setup_uedit?id=%d(uid)&referer=%T(zRef)">
408 @ [Bummer]</a></p>
409 style_body_and_footer("setupuser");
410 return;
411 }
412 login_verify_csrf_secret();
413 db_unprotect(PROTECT_USER);
414 db_multi_exec(
@@ -456,11 +456,11 @@
456 admin_log( "Error updating user '%q': %s'.", zLogin, zErr );
457 @ <span class="loginError">%h(zErr)</span>
458 @
459 @ <p><a href="setup_uedit?id=%d(uid)&referer=%T(zRef)">
460 @ [Bummer]</a></p>
461 style_body_and_footer("setupuser");
462 return;
463 }
464 }
465 cgi_redirect(cgi_referer("setup_ulist"));
466 return;
@@ -874,7 +874,7 @@
874 @ template for users who are allowed more access than
875 @ <span class="usertype">anonymous</span>,
876 @ but less than a <span class="usertype">developer</span>.
877 @ </p></li>
878 @ </ul>
879 style_body_and_footer("setupuser");
880 }
881
--- src/setupuser.c
+++ src/setupuser.c
@@ -180,11 +180,11 @@
180 fossil_free(zAge);
181 }
182 @ </tbody></table>
183 db_finalize(&s);
184 style_table_sorter();
185 style_finish_page("setupuser");
186 }
187
188 /*
189 ** WEBPAGE: setup_ulist_notes
190 **
@@ -226,11 +226,11 @@
226 @
227 @ <li><p>The permission flags are as follows:</p>
228 capabilities_table(CAPCLASS_ALL);
229 @ </li>
230 @ </ol>
231 style_finish_page("setupuser");
232 }
233
234 /*
235 ** WEBPAGE: setup_ucap_list
236 **
@@ -253,11 +253,11 @@
253 capabilities_table(CAPCLASS_WIKI);
254 @ <h1>Administrative capabilities</h1>
255 capabilities_table(CAPCLASS_SUPER);
256 @ <h1>Miscellaneous capabilities</h1>
257 capabilities_table(CAPCLASS_OTHER);
258 style_finish_page("setupuser");
259 }
260
261 /*
262 ** Return true if zPw is a valid password string. A valid
263 ** password string is:
@@ -387,11 +387,11 @@
387 style_header("User Creation Error");
388 @ <span class="loginError">Empty login not allowed.</span>
389 @
390 @ <p><a href="setup_uedit?id=%d(uid)&referer=%T(zRef)">
391 @ [Bummer]</a></p>
392 style_finish_page("setupuser");
393 return;
394 }
395 if( isValidPwString(zPw) ){
396 zPw = sha1_shared_secret(zPw, zLogin, 0);
397 }else{
@@ -404,11 +404,11 @@
404 @ <span class="loginError">Login "%h(zLogin)" is already used by
405 @ a different user.</span>
406 @
407 @ <p><a href="setup_uedit?id=%d(uid)&referer=%T(zRef)">
408 @ [Bummer]</a></p>
409 style_finish_page("setupuser");
410 return;
411 }
412 login_verify_csrf_secret();
413 db_unprotect(PROTECT_USER);
414 db_multi_exec(
@@ -456,11 +456,11 @@
456 admin_log( "Error updating user '%q': %s'.", zLogin, zErr );
457 @ <span class="loginError">%h(zErr)</span>
458 @
459 @ <p><a href="setup_uedit?id=%d(uid)&referer=%T(zRef)">
460 @ [Bummer]</a></p>
461 style_finish_page("setupuser");
462 return;
463 }
464 }
465 cgi_redirect(cgi_referer("setup_ulist"));
466 return;
@@ -874,7 +874,7 @@
874 @ template for users who are allowed more access than
875 @ <span class="usertype">anonymous</span>,
876 @ but less than a <span class="usertype">developer</span>.
877 @ </p></li>
878 @ </ul>
879 style_finish_page("setupuser");
880 }
881
+3 -3
--- src/shun.c
+++ src/shun.c
@@ -263,11 +263,11 @@
263263
if( cnt==0 ){
264264
@ <i>no artifacts are shunned on this server</i>
265265
}
266266
db_finalize(&q);
267267
@ </p></blockquote>
268
- style_body_and_footer("shun");
268
+ style_finish_page("shun");
269269
fossil_free(zCanonical);
270270
}
271271
272272
/*
273273
** Remove from the BLOB table all artifacts that are in the SHUN table.
@@ -403,11 +403,11 @@
403403
@ </tr>
404404
}
405405
}
406406
db_finalize(&q);
407407
@ </table>
408
- style_body_and_footer("rcvfromlist");
408
+ style_finish_page("rcvfromlist");
409409
}
410410
411411
/*
412412
** WEBPAGE: rcvfrom
413413
**
@@ -549,7 +549,7 @@
549549
@ </td></tr>
550550
}
551551
}
552552
@ </table>
553553
db_finalize(&q);
554
- style_body_and_footer("rcvfrom");
554
+ style_finish_page("rcvfrom");
555555
}
556556
--- src/shun.c
+++ src/shun.c
@@ -263,11 +263,11 @@
263 if( cnt==0 ){
264 @ <i>no artifacts are shunned on this server</i>
265 }
266 db_finalize(&q);
267 @ </p></blockquote>
268 style_body_and_footer("shun");
269 fossil_free(zCanonical);
270 }
271
272 /*
273 ** Remove from the BLOB table all artifacts that are in the SHUN table.
@@ -403,11 +403,11 @@
403 @ </tr>
404 }
405 }
406 db_finalize(&q);
407 @ </table>
408 style_body_and_footer("rcvfromlist");
409 }
410
411 /*
412 ** WEBPAGE: rcvfrom
413 **
@@ -549,7 +549,7 @@
549 @ </td></tr>
550 }
551 }
552 @ </table>
553 db_finalize(&q);
554 style_body_and_footer("rcvfrom");
555 }
556
--- src/shun.c
+++ src/shun.c
@@ -263,11 +263,11 @@
263 if( cnt==0 ){
264 @ <i>no artifacts are shunned on this server</i>
265 }
266 db_finalize(&q);
267 @ </p></blockquote>
268 style_finish_page("shun");
269 fossil_free(zCanonical);
270 }
271
272 /*
273 ** Remove from the BLOB table all artifacts that are in the SHUN table.
@@ -403,11 +403,11 @@
403 @ </tr>
404 }
405 }
406 db_finalize(&q);
407 @ </table>
408 style_finish_page("rcvfromlist");
409 }
410
411 /*
412 ** WEBPAGE: rcvfrom
413 **
@@ -549,7 +549,7 @@
549 @ </td></tr>
550 }
551 }
552 @ </table>
553 db_finalize(&q);
554 style_finish_page("rcvfrom");
555 }
556
+1 -1
--- src/sitemap.c
+++ src/sitemap.c
@@ -233,8 +233,8 @@
233233
@ colors assigned to branch names</a>
234234
@ <li>%z(href("%R/test-captcha"))Random ASCII-art Captcha image</a></li>
235235
@ </ul></li>
236236
@ </ul>
237237
if( !isPopup ){
238
- style_body_and_footer("sitemap");
238
+ style_finish_page("sitemap");
239239
}
240240
}
241241
--- src/sitemap.c
+++ src/sitemap.c
@@ -233,8 +233,8 @@
233 @ colors assigned to branch names</a>
234 @ <li>%z(href("%R/test-captcha"))Random ASCII-art Captcha image</a></li>
235 @ </ul></li>
236 @ </ul>
237 if( !isPopup ){
238 style_body_and_footer("sitemap");
239 }
240 }
241
--- src/sitemap.c
+++ src/sitemap.c
@@ -233,8 +233,8 @@
233 @ colors assigned to branch names</a>
234 @ <li>%z(href("%R/test-captcha"))Random ASCII-art Captcha image</a></li>
235 @ </ul></li>
236 @ </ul>
237 if( !isPopup ){
238 style_finish_page("sitemap");
239 }
240 }
241
+6 -6
--- src/skins.c
+++ src/skins.c
@@ -401,11 +401,11 @@
401401
@ <input type="submit" name="rename" value="Rename">
402402
@ <input type="submit" name="canren" value="Cancel">
403403
@ </table>
404404
login_insert_csrf_secret();
405405
@ </div></form>
406
- style_body_and_footer("skins");
406
+ style_finish_page("skins");
407407
return 1;
408408
}
409409
db_unprotect(PROTECT_CONFIG);
410410
db_multi_exec(
411411
"UPDATE config SET name='skin:%q' WHERE name='skin:%q';",
@@ -441,11 +441,11 @@
441441
@ <input type="submit" name="save" value="Save">
442442
@ <input type="submit" name="cansave" value="Cancel">
443443
@ </table>
444444
login_insert_csrf_secret();
445445
@ </div></form>
446
- style_body_and_footer("skins");
446
+ style_finish_page("skins");
447447
return 1;
448448
}
449449
db_unprotect(PROTECT_CONFIG);
450450
db_multi_exec(
451451
"INSERT OR IGNORE INTO config(name, value, mtime)"
@@ -492,11 +492,11 @@
492492
@ <input type="hidden" name="sn" value="%h(P("sn"))" />
493493
@ <input type="submit" name="del2" value="Confirm - Delete The Skin" />
494494
@ <input type="submit" name="cancel" value="Cancel - Do Not Delete" />
495495
login_insert_csrf_secret();
496496
@ </div></form>
497
- style_body_and_footer("skins");
497
+ style_finish_page("skins");
498498
db_end_transaction(1);
499499
return;
500500
}
501501
if( P("del2")!=0 && (zName = skinVarName(P("sn"), 1))!=0 ){
502502
db_unprotect(PROTECT_CONFIG);
@@ -645,11 +645,11 @@
645645
@ </form></tr>
646646
}
647647
db_finalize(&q);
648648
649649
@ </table>
650
- style_body_and_footer("skins");
650
+ style_finish_page("skins");
651651
db_end_transaction(0);
652652
}
653653
654654
/*
655655
** Generate HTML for a <select> that lists all the available skin names,
@@ -842,11 +842,11 @@
842842
blob_reset(&from);
843843
blob_reset(&to);
844844
blob_reset(&out);
845845
}
846846
@ </div></form>
847
- style_body_and_footer("skins");
847
+ style_finish_page("skins");
848848
db_end_transaction(0);
849849
}
850850
851851
/*
852852
** Try to initialize draft skin iSkin to the built-in or preexisting
@@ -1120,7 +1120,7 @@
11201120
}else{
11211121
@ <p>Visit the <a href='%R/setup_skin_admin'>Skin Admin</a> page
11221122
@ for cleanup and recovery actions.
11231123
}
11241124
builtin_request_js("skin.js");
1125
- style_body_and_footer("skins");
1125
+ style_finish_page("skins");
11261126
}
11271127
--- src/skins.c
+++ src/skins.c
@@ -401,11 +401,11 @@
401 @ <input type="submit" name="rename" value="Rename">
402 @ <input type="submit" name="canren" value="Cancel">
403 @ </table>
404 login_insert_csrf_secret();
405 @ </div></form>
406 style_body_and_footer("skins");
407 return 1;
408 }
409 db_unprotect(PROTECT_CONFIG);
410 db_multi_exec(
411 "UPDATE config SET name='skin:%q' WHERE name='skin:%q';",
@@ -441,11 +441,11 @@
441 @ <input type="submit" name="save" value="Save">
442 @ <input type="submit" name="cansave" value="Cancel">
443 @ </table>
444 login_insert_csrf_secret();
445 @ </div></form>
446 style_body_and_footer("skins");
447 return 1;
448 }
449 db_unprotect(PROTECT_CONFIG);
450 db_multi_exec(
451 "INSERT OR IGNORE INTO config(name, value, mtime)"
@@ -492,11 +492,11 @@
492 @ <input type="hidden" name="sn" value="%h(P("sn"))" />
493 @ <input type="submit" name="del2" value="Confirm - Delete The Skin" />
494 @ <input type="submit" name="cancel" value="Cancel - Do Not Delete" />
495 login_insert_csrf_secret();
496 @ </div></form>
497 style_body_and_footer("skins");
498 db_end_transaction(1);
499 return;
500 }
501 if( P("del2")!=0 && (zName = skinVarName(P("sn"), 1))!=0 ){
502 db_unprotect(PROTECT_CONFIG);
@@ -645,11 +645,11 @@
645 @ </form></tr>
646 }
647 db_finalize(&q);
648
649 @ </table>
650 style_body_and_footer("skins");
651 db_end_transaction(0);
652 }
653
654 /*
655 ** Generate HTML for a <select> that lists all the available skin names,
@@ -842,11 +842,11 @@
842 blob_reset(&from);
843 blob_reset(&to);
844 blob_reset(&out);
845 }
846 @ </div></form>
847 style_body_and_footer("skins");
848 db_end_transaction(0);
849 }
850
851 /*
852 ** Try to initialize draft skin iSkin to the built-in or preexisting
@@ -1120,7 +1120,7 @@
1120 }else{
1121 @ <p>Visit the <a href='%R/setup_skin_admin'>Skin Admin</a> page
1122 @ for cleanup and recovery actions.
1123 }
1124 builtin_request_js("skin.js");
1125 style_body_and_footer("skins");
1126 }
1127
--- src/skins.c
+++ src/skins.c
@@ -401,11 +401,11 @@
401 @ <input type="submit" name="rename" value="Rename">
402 @ <input type="submit" name="canren" value="Cancel">
403 @ </table>
404 login_insert_csrf_secret();
405 @ </div></form>
406 style_finish_page("skins");
407 return 1;
408 }
409 db_unprotect(PROTECT_CONFIG);
410 db_multi_exec(
411 "UPDATE config SET name='skin:%q' WHERE name='skin:%q';",
@@ -441,11 +441,11 @@
441 @ <input type="submit" name="save" value="Save">
442 @ <input type="submit" name="cansave" value="Cancel">
443 @ </table>
444 login_insert_csrf_secret();
445 @ </div></form>
446 style_finish_page("skins");
447 return 1;
448 }
449 db_unprotect(PROTECT_CONFIG);
450 db_multi_exec(
451 "INSERT OR IGNORE INTO config(name, value, mtime)"
@@ -492,11 +492,11 @@
492 @ <input type="hidden" name="sn" value="%h(P("sn"))" />
493 @ <input type="submit" name="del2" value="Confirm - Delete The Skin" />
494 @ <input type="submit" name="cancel" value="Cancel - Do Not Delete" />
495 login_insert_csrf_secret();
496 @ </div></form>
497 style_finish_page("skins");
498 db_end_transaction(1);
499 return;
500 }
501 if( P("del2")!=0 && (zName = skinVarName(P("sn"), 1))!=0 ){
502 db_unprotect(PROTECT_CONFIG);
@@ -645,11 +645,11 @@
645 @ </form></tr>
646 }
647 db_finalize(&q);
648
649 @ </table>
650 style_finish_page("skins");
651 db_end_transaction(0);
652 }
653
654 /*
655 ** Generate HTML for a <select> that lists all the available skin names,
@@ -842,11 +842,11 @@
842 blob_reset(&from);
843 blob_reset(&to);
844 blob_reset(&out);
845 }
846 @ </div></form>
847 style_finish_page("skins");
848 db_end_transaction(0);
849 }
850
851 /*
852 ** Try to initialize draft skin iSkin to the built-in or preexisting
@@ -1120,7 +1120,7 @@
1120 }else{
1121 @ <p>Visit the <a href='%R/setup_skin_admin'>Skin Admin</a> page
1122 @ for cleanup and recovery actions.
1123 }
1124 builtin_request_js("skin.js");
1125 style_finish_page("skins");
1126 }
1127
+2 -2
--- src/smtp.c
+++ src/smtp.c
@@ -805,11 +805,11 @@
805805
@ <form method="POST" action="%R/setup_smtp_route">
806806
@ <input type="submit" value="New">
807807
@ &larr; Add a new email address
808808
@ </form>
809809
@ </table>
810
- style_body_and_footer("smtp");
810
+ style_finish_page("smtp");
811811
db_end_transaction(0);
812812
}
813813
814814
/*
815815
** WEBPAGE: setup_smtp_route
@@ -924,11 +924,11 @@
924924
@ with USER.LOGIN=<i>login-name</i>.
925925
@ </ul>
926926
@
927927
@ <p>To delete a route &rarr; erase all text from the "Routing" field then
928928
@ press the "Apply" button.
929
- style_body_and_footer("smtp");
929
+ style_finish_page("smtp");
930930
}
931931
932932
#if LOCAL_INTERFACE
933933
/*
934934
** State information for the server
935935
--- src/smtp.c
+++ src/smtp.c
@@ -805,11 +805,11 @@
805 @ <form method="POST" action="%R/setup_smtp_route">
806 @ <input type="submit" value="New">
807 @ &larr; Add a new email address
808 @ </form>
809 @ </table>
810 style_body_and_footer("smtp");
811 db_end_transaction(0);
812 }
813
814 /*
815 ** WEBPAGE: setup_smtp_route
@@ -924,11 +924,11 @@
924 @ with USER.LOGIN=<i>login-name</i>.
925 @ </ul>
926 @
927 @ <p>To delete a route &rarr; erase all text from the "Routing" field then
928 @ press the "Apply" button.
929 style_body_and_footer("smtp");
930 }
931
932 #if LOCAL_INTERFACE
933 /*
934 ** State information for the server
935
--- src/smtp.c
+++ src/smtp.c
@@ -805,11 +805,11 @@
805 @ <form method="POST" action="%R/setup_smtp_route">
806 @ <input type="submit" value="New">
807 @ &larr; Add a new email address
808 @ </form>
809 @ </table>
810 style_finish_page("smtp");
811 db_end_transaction(0);
812 }
813
814 /*
815 ** WEBPAGE: setup_smtp_route
@@ -924,11 +924,11 @@
924 @ with USER.LOGIN=<i>login-name</i>.
925 @ </ul>
926 @
927 @ <p>To delete a route &rarr; erase all text from the "Routing" field then
928 @ press the "Apply" button.
929 style_finish_page("smtp");
930 }
931
932 #if LOCAL_INTERFACE
933 /*
934 ** State information for the server
935
+7 -7
--- src/stat.c
+++ src/stat.c
@@ -288,11 +288,11 @@
288288
if( g.perm.Admin && alert_enabled() ){
289289
stats_for_email();
290290
}
291291
292292
@ </table>
293
- style_body_and_footer("stat");
293
+ style_finish_page("stat");
294294
}
295295
296296
/*
297297
** COMMAND: dbstat
298298
**
@@ -507,11 +507,11 @@
507507
}else{
508508
@ <p>%h(zRemote)</p>
509509
}
510510
@ </div>
511511
}
512
- style_body_and_footer("stat");
512
+ style_finish_page("stat");
513513
}
514514
515515
/*
516516
** WEBPAGE: repo_schema
517517
**
@@ -565,11 +565,11 @@
565565
db_finalize(&q);
566566
}else{
567567
style_submenu_element("Stat1","repo_stat1");
568568
}
569569
}
570
- style_body_and_footer("stat");
570
+ style_finish_page("stat");
571571
}
572572
573573
/*
574574
** WEBPAGE: repo_stat1
575575
**
@@ -597,11 +597,11 @@
597597
@ INSERT INTO sqlite_stat1 VALUES('%z(zUrl)%h(zTab)</a>','%h(zIdx)','%h(zStat)');
598598
}
599599
@ </pre>
600600
db_finalize(&q);
601601
}
602
- style_body_and_footer("stat");
602
+ style_finish_page("stat");
603603
}
604604
605605
/*
606606
** WEBPAGE: repo-tabsize
607607
**
@@ -669,11 +669,11 @@
669669
@ <h2>%h(file_tail(g.zLocalDbName)) Size: %s(zBuf)</h2>
670670
@ <center><svg width='800' height='500'>
671671
piechart_render(800,500,PIE_OTHER|PIE_PERCENT);
672672
@ </svg></center>
673673
}
674
- style_body_and_footer("stat");
674
+ style_finish_page("stat");
675675
}
676676
677677
/*
678678
** Gather statistics on artifact types, counts, and sizes.
679679
**
@@ -810,11 +810,11 @@
810810
sumCmpr = db_column_int64(&q, 4);
811811
sumExp = db_column_int64(&q, 5);
812812
db_finalize(&q);
813813
if( nTotal==0 ){
814814
@ No artifacts in this repository!
815
- style_body_and_footer("stat");
815
+ style_finish_page("stat");
816816
return;
817817
}
818818
avgCmpr = (double)sumCmpr/nTotal;
819819
avgExp = (double)sumExp/nTotal;
820820
@@ -955,7 +955,7 @@
955955
}
956956
@ </tbody></table></div>
957957
db_finalize(&q);
958958
}
959959
style_table_sorter();
960
- style_body_and_footer("stat");
960
+ style_finish_page("stat");
961961
}
962962
--- src/stat.c
+++ src/stat.c
@@ -288,11 +288,11 @@
288 if( g.perm.Admin && alert_enabled() ){
289 stats_for_email();
290 }
291
292 @ </table>
293 style_body_and_footer("stat");
294 }
295
296 /*
297 ** COMMAND: dbstat
298 **
@@ -507,11 +507,11 @@
507 }else{
508 @ <p>%h(zRemote)</p>
509 }
510 @ </div>
511 }
512 style_body_and_footer("stat");
513 }
514
515 /*
516 ** WEBPAGE: repo_schema
517 **
@@ -565,11 +565,11 @@
565 db_finalize(&q);
566 }else{
567 style_submenu_element("Stat1","repo_stat1");
568 }
569 }
570 style_body_and_footer("stat");
571 }
572
573 /*
574 ** WEBPAGE: repo_stat1
575 **
@@ -597,11 +597,11 @@
597 @ INSERT INTO sqlite_stat1 VALUES('%z(zUrl)%h(zTab)</a>','%h(zIdx)','%h(zStat)');
598 }
599 @ </pre>
600 db_finalize(&q);
601 }
602 style_body_and_footer("stat");
603 }
604
605 /*
606 ** WEBPAGE: repo-tabsize
607 **
@@ -669,11 +669,11 @@
669 @ <h2>%h(file_tail(g.zLocalDbName)) Size: %s(zBuf)</h2>
670 @ <center><svg width='800' height='500'>
671 piechart_render(800,500,PIE_OTHER|PIE_PERCENT);
672 @ </svg></center>
673 }
674 style_body_and_footer("stat");
675 }
676
677 /*
678 ** Gather statistics on artifact types, counts, and sizes.
679 **
@@ -810,11 +810,11 @@
810 sumCmpr = db_column_int64(&q, 4);
811 sumExp = db_column_int64(&q, 5);
812 db_finalize(&q);
813 if( nTotal==0 ){
814 @ No artifacts in this repository!
815 style_body_and_footer("stat");
816 return;
817 }
818 avgCmpr = (double)sumCmpr/nTotal;
819 avgExp = (double)sumExp/nTotal;
820
@@ -955,7 +955,7 @@
955 }
956 @ </tbody></table></div>
957 db_finalize(&q);
958 }
959 style_table_sorter();
960 style_body_and_footer("stat");
961 }
962
--- src/stat.c
+++ src/stat.c
@@ -288,11 +288,11 @@
288 if( g.perm.Admin && alert_enabled() ){
289 stats_for_email();
290 }
291
292 @ </table>
293 style_finish_page("stat");
294 }
295
296 /*
297 ** COMMAND: dbstat
298 **
@@ -507,11 +507,11 @@
507 }else{
508 @ <p>%h(zRemote)</p>
509 }
510 @ </div>
511 }
512 style_finish_page("stat");
513 }
514
515 /*
516 ** WEBPAGE: repo_schema
517 **
@@ -565,11 +565,11 @@
565 db_finalize(&q);
566 }else{
567 style_submenu_element("Stat1","repo_stat1");
568 }
569 }
570 style_finish_page("stat");
571 }
572
573 /*
574 ** WEBPAGE: repo_stat1
575 **
@@ -597,11 +597,11 @@
597 @ INSERT INTO sqlite_stat1 VALUES('%z(zUrl)%h(zTab)</a>','%h(zIdx)','%h(zStat)');
598 }
599 @ </pre>
600 db_finalize(&q);
601 }
602 style_finish_page("stat");
603 }
604
605 /*
606 ** WEBPAGE: repo-tabsize
607 **
@@ -669,11 +669,11 @@
669 @ <h2>%h(file_tail(g.zLocalDbName)) Size: %s(zBuf)</h2>
670 @ <center><svg width='800' height='500'>
671 piechart_render(800,500,PIE_OTHER|PIE_PERCENT);
672 @ </svg></center>
673 }
674 style_finish_page("stat");
675 }
676
677 /*
678 ** Gather statistics on artifact types, counts, and sizes.
679 **
@@ -810,11 +810,11 @@
810 sumCmpr = db_column_int64(&q, 4);
811 sumExp = db_column_int64(&q, 5);
812 db_finalize(&q);
813 if( nTotal==0 ){
814 @ No artifacts in this repository!
815 style_finish_page("stat");
816 return;
817 }
818 avgCmpr = (double)sumCmpr/nTotal;
819 avgExp = (double)sumExp/nTotal;
820
@@ -955,7 +955,7 @@
955 }
956 @ </tbody></table></div>
957 db_finalize(&q);
958 }
959 style_table_sorter();
960 style_finish_page("stat");
961 }
962
+1 -1
--- src/statrep.c
+++ src/statrep.c
@@ -825,7 +825,7 @@
825825
break;
826826
case RPT_LASTCHNG:
827827
stats_report_last_change();
828828
break;
829829
}
830
- style_body_and_footer("reports");
830
+ style_finish_page("reports");
831831
}
832832
--- src/statrep.c
+++ src/statrep.c
@@ -825,7 +825,7 @@
825 break;
826 case RPT_LASTCHNG:
827 stats_report_last_change();
828 break;
829 }
830 style_body_and_footer("reports");
831 }
832
--- src/statrep.c
+++ src/statrep.c
@@ -825,7 +825,7 @@
825 break;
826 case RPT_LASTCHNG:
827 stats_report_last_change();
828 break;
829 }
830 style_finish_page("reports");
831 }
832
+18 -3
--- src/style.c
+++ src/style.c
@@ -736,13 +736,28 @@
736736
@ </script>
737737
builtin_fulfill_js_requests();
738738
}
739739
740740
/*
741
-** Emit the page body and footer HTML.
741
+** Invoke this routine after all of the content for a webpage has been
742
+** generated. This routine should be called once for every webpage, at
743
+** or near the end of page generation. This routine does the following:
744
+**
745
+** * Populates the header of the page, including setting up appropriate
746
+** submenu elements. The header generation is deferred until this point
747
+** so that we know that all style_submenu_element() and similar have
748
+** been received.
749
+**
750
+** * Finalizes the page content.
751
+**
752
+** * Appends the footer.
753
+**
754
+** The zPageType argument is a class name inserted in the <div> that
755
+** surrounds the page content. CSS can use this to have different styles
756
+** according to the page type.
742757
*/
743
-void style_body_and_footer(const char* zPageType){
758
+void style_finish_page(const char* zPageType){
744759
const char *zFooter;
745760
const char *zAd = 0;
746761
unsigned int mAdFlags = 0;
747762
748763
if( !headerHasBeenGenerated ) return;
@@ -1189,11 +1204,11 @@
11891204
@ <pre>
11901205
@ %h(blob_str(&g.httpHeader))
11911206
@ </pre>
11921207
}
11931208
}
1194
- style_body_and_footer("error");
1209
+ style_finish_page("error");
11951210
if( zErr ){
11961211
cgi_reply();
11971212
fossil_exit(1);
11981213
}
11991214
}
12001215
--- src/style.c
+++ src/style.c
@@ -736,13 +736,28 @@
736 @ </script>
737 builtin_fulfill_js_requests();
738 }
739
740 /*
741 ** Emit the page body and footer HTML.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
742 */
743 void style_body_and_footer(const char* zPageType){
744 const char *zFooter;
745 const char *zAd = 0;
746 unsigned int mAdFlags = 0;
747
748 if( !headerHasBeenGenerated ) return;
@@ -1189,11 +1204,11 @@
1189 @ <pre>
1190 @ %h(blob_str(&g.httpHeader))
1191 @ </pre>
1192 }
1193 }
1194 style_body_and_footer("error");
1195 if( zErr ){
1196 cgi_reply();
1197 fossil_exit(1);
1198 }
1199 }
1200
--- src/style.c
+++ src/style.c
@@ -736,13 +736,28 @@
736 @ </script>
737 builtin_fulfill_js_requests();
738 }
739
740 /*
741 ** Invoke this routine after all of the content for a webpage has been
742 ** generated. This routine should be called once for every webpage, at
743 ** or near the end of page generation. This routine does the following:
744 **
745 ** * Populates the header of the page, including setting up appropriate
746 ** submenu elements. The header generation is deferred until this point
747 ** so that we know that all style_submenu_element() and similar have
748 ** been received.
749 **
750 ** * Finalizes the page content.
751 **
752 ** * Appends the footer.
753 **
754 ** The zPageType argument is a class name inserted in the <div> that
755 ** surrounds the page content. CSS can use this to have different styles
756 ** according to the page type.
757 */
758 void style_finish_page(const char* zPageType){
759 const char *zFooter;
760 const char *zAd = 0;
761 unsigned int mAdFlags = 0;
762
763 if( !headerHasBeenGenerated ) return;
@@ -1189,11 +1204,11 @@
1204 @ <pre>
1205 @ %h(blob_str(&g.httpHeader))
1206 @ </pre>
1207 }
1208 }
1209 style_finish_page("error");
1210 if( zErr ){
1211 cgi_reply();
1212 fossil_exit(1);
1213 }
1214 }
1215
+2 -2
--- src/tag.c
+++ src/tag.c
@@ -724,11 +724,11 @@
724724
@ <li><span class="tagDsp">%h(zName)</span></li>
725725
}
726726
}
727727
@ </ul>
728728
db_finalize(&q);
729
- style_body_and_footer("taglist");
729
+ style_finish_page("taglist");
730730
}
731731
732732
/*
733733
** WEBPAGE: /tagtimeline
734734
**
@@ -781,7 +781,7 @@
781781
if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR;
782782
if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR;
783783
www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, 0);
784784
db_finalize(&q);
785785
@ <br />
786
- style_body_and_footer("tagtimeline");
786
+ style_finish_page("tagtimeline");
787787
}
788788
--- src/tag.c
+++ src/tag.c
@@ -724,11 +724,11 @@
724 @ <li><span class="tagDsp">%h(zName)</span></li>
725 }
726 }
727 @ </ul>
728 db_finalize(&q);
729 style_body_and_footer("taglist");
730 }
731
732 /*
733 ** WEBPAGE: /tagtimeline
734 **
@@ -781,7 +781,7 @@
781 if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR;
782 if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR;
783 www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, 0);
784 db_finalize(&q);
785 @ <br />
786 style_body_and_footer("tagtimeline");
787 }
788
--- src/tag.c
+++ src/tag.c
@@ -724,11 +724,11 @@
724 @ <li><span class="tagDsp">%h(zName)</span></li>
725 }
726 }
727 @ </ul>
728 db_finalize(&q);
729 style_finish_page("taglist");
730 }
731
732 /*
733 ** WEBPAGE: /tagtimeline
734 **
@@ -781,7 +781,7 @@
781 if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR;
782 if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR;
783 www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, 0);
784 db_finalize(&q);
785 @ <br />
786 style_finish_page("tagtimeline");
787 }
788
+2 -2
--- src/tar.c
+++ src/tar.c
@@ -785,11 +785,11 @@
785785
}
786786
if( zExclude ){
787787
@ zExclude = "%h(zExclude)"<br />
788788
}
789789
@ zKey = "%h(zKey)"
790
- style_body_and_footer("tarball");
790
+ style_finish_page("tarball");
791791
return;
792792
}
793793
if( referred_from_login() ){
794794
style_header("Tarball Download");
795795
@ <form action='%R/tarball/%h(zName).tar.gz'>
@@ -796,11 +796,11 @@
796796
cgi_query_parameters_to_hidden();
797797
@ <p>Tarball named <b>%h(zName).tar.gz</b> holding the content
798798
@ of check-in <b>%h(zRid)</b>:
799799
@ <input type="submit" value="Download" />
800800
@ </form>
801
- style_body_and_footer("tarball");
801
+ style_finish_page("tarball");
802802
return;
803803
}
804804
blob_zero(&tarball);
805805
if( cache_read(&tarball, zKey)==0 ){
806806
tarball_of_checkin(rid, &tarball, zName, pInclude, pExclude);
807807
--- src/tar.c
+++ src/tar.c
@@ -785,11 +785,11 @@
785 }
786 if( zExclude ){
787 @ zExclude = "%h(zExclude)"<br />
788 }
789 @ zKey = "%h(zKey)"
790 style_body_and_footer("tarball");
791 return;
792 }
793 if( referred_from_login() ){
794 style_header("Tarball Download");
795 @ <form action='%R/tarball/%h(zName).tar.gz'>
@@ -796,11 +796,11 @@
796 cgi_query_parameters_to_hidden();
797 @ <p>Tarball named <b>%h(zName).tar.gz</b> holding the content
798 @ of check-in <b>%h(zRid)</b>:
799 @ <input type="submit" value="Download" />
800 @ </form>
801 style_body_and_footer("tarball");
802 return;
803 }
804 blob_zero(&tarball);
805 if( cache_read(&tarball, zKey)==0 ){
806 tarball_of_checkin(rid, &tarball, zName, pInclude, pExclude);
807
--- src/tar.c
+++ src/tar.c
@@ -785,11 +785,11 @@
785 }
786 if( zExclude ){
787 @ zExclude = "%h(zExclude)"<br />
788 }
789 @ zKey = "%h(zKey)"
790 style_finish_page("tarball");
791 return;
792 }
793 if( referred_from_login() ){
794 style_header("Tarball Download");
795 @ <form action='%R/tarball/%h(zName).tar.gz'>
@@ -796,11 +796,11 @@
796 cgi_query_parameters_to_hidden();
797 @ <p>Tarball named <b>%h(zName).tar.gz</b> holding the content
798 @ of check-in <b>%h(zRid)</b>:
799 @ <input type="submit" value="Download" />
800 @ </form>
801 style_finish_page("tarball");
802 return;
803 }
804 blob_zero(&tarball);
805 if( cache_read(&tarball, zKey)==0 ){
806 tarball_of_checkin(rid, &tarball, zName, pInclude, pExclude);
807
+1 -1
--- src/th_main.c
+++ src/th_main.c
@@ -1478,11 +1478,11 @@
14781478
){
14791479
if( argc!=1 ){
14801480
return Th_WrongNumArgs(interp, "styleFooter");
14811481
}
14821482
if( Th_IsRepositoryOpen() ){
1483
- style_body_and_footer("th1"); /* TODO: add optional parameter to pass along? */
1483
+ style_finish_page("th1"); /* TODO: add optional parameter to pass along? */
14841484
Th_SetResult(interp, 0, 0);
14851485
return TH_OK;
14861486
}else{
14871487
Th_SetResult(interp, "repository unavailable", -1);
14881488
return TH_ERROR;
14891489
--- src/th_main.c
+++ src/th_main.c
@@ -1478,11 +1478,11 @@
1478 ){
1479 if( argc!=1 ){
1480 return Th_WrongNumArgs(interp, "styleFooter");
1481 }
1482 if( Th_IsRepositoryOpen() ){
1483 style_body_and_footer("th1"); /* TODO: add optional parameter to pass along? */
1484 Th_SetResult(interp, 0, 0);
1485 return TH_OK;
1486 }else{
1487 Th_SetResult(interp, "repository unavailable", -1);
1488 return TH_ERROR;
1489
--- src/th_main.c
+++ src/th_main.c
@@ -1478,11 +1478,11 @@
1478 ){
1479 if( argc!=1 ){
1480 return Th_WrongNumArgs(interp, "styleFooter");
1481 }
1482 if( Th_IsRepositoryOpen() ){
1483 style_finish_page("th1"); /* TODO: add optional parameter to pass along? */
1484 Th_SetResult(interp, 0, 0);
1485 return TH_OK;
1486 }else{
1487 Th_SetResult(interp, "repository unavailable", -1);
1488 return TH_ERROR;
1489
+4 -4
--- src/timeline.c
+++ src/timeline.c
@@ -214,11 +214,11 @@
214214
zBr = P(zNm);
215215
@ <input type="text" size="30" name='%s(zNm)' value='%h(PD(zNm,""))'><br />
216216
}
217217
@ <input type="submit">
218218
@ </form>
219
- style_body_and_footer("test");
219
+ style_finish_page("test");
220220
}
221221
222222
/*
223223
** Return a new timelineTable id.
224224
*/
@@ -2625,11 +2625,11 @@
26252625
db_finalize(&q);
26262626
if( zOlderButton ){
26272627
@ %z(chref("button","%z",zOlderButton))More&nbsp;&darr;</a>
26282628
}
26292629
document_emit_js(/*handles pikchrs rendered above*/);
2630
- style_body_and_footer("timeline");
2630
+ style_finish_page("timeline");
26312631
}
26322632
26332633
/*
26342634
** The input query q selects various records. Print a human-readable
26352635
** summary of those records.
@@ -3117,11 +3117,11 @@
31173117
@ <small>%z(href("%R/timeline?c=%t",zId))(more context)</a>\
31183118
@ </small></h2>
31193119
www_print_timeline(&q, TIMELINE_GRAPH, 0, 0, 0, 0, 0, 0);
31203120
}
31213121
db_finalize(&q);
3122
- style_body_and_footer("timeline");
3122
+ style_finish_page("timeline");
31233123
}
31243124
31253125
31263126
/*
31273127
** COMMAND: test-timewarp-list
@@ -3223,7 +3223,7 @@
32233223
if( cnt==0 ){
32243224
@ <p>No timewarps in this repository</p>
32253225
}else{
32263226
@ </tbody></table></div>
32273227
}
3228
- style_body_and_footer("timewarps");
3228
+ style_finish_page("timewarps");
32293229
}
32303230
--- src/timeline.c
+++ src/timeline.c
@@ -214,11 +214,11 @@
214 zBr = P(zNm);
215 @ <input type="text" size="30" name='%s(zNm)' value='%h(PD(zNm,""))'><br />
216 }
217 @ <input type="submit">
218 @ </form>
219 style_body_and_footer("test");
220 }
221
222 /*
223 ** Return a new timelineTable id.
224 */
@@ -2625,11 +2625,11 @@
2625 db_finalize(&q);
2626 if( zOlderButton ){
2627 @ %z(chref("button","%z",zOlderButton))More&nbsp;&darr;</a>
2628 }
2629 document_emit_js(/*handles pikchrs rendered above*/);
2630 style_body_and_footer("timeline");
2631 }
2632
2633 /*
2634 ** The input query q selects various records. Print a human-readable
2635 ** summary of those records.
@@ -3117,11 +3117,11 @@
3117 @ <small>%z(href("%R/timeline?c=%t",zId))(more context)</a>\
3118 @ </small></h2>
3119 www_print_timeline(&q, TIMELINE_GRAPH, 0, 0, 0, 0, 0, 0);
3120 }
3121 db_finalize(&q);
3122 style_body_and_footer("timeline");
3123 }
3124
3125
3126 /*
3127 ** COMMAND: test-timewarp-list
@@ -3223,7 +3223,7 @@
3223 if( cnt==0 ){
3224 @ <p>No timewarps in this repository</p>
3225 }else{
3226 @ </tbody></table></div>
3227 }
3228 style_body_and_footer("timewarps");
3229 }
3230
--- src/timeline.c
+++ src/timeline.c
@@ -214,11 +214,11 @@
214 zBr = P(zNm);
215 @ <input type="text" size="30" name='%s(zNm)' value='%h(PD(zNm,""))'><br />
216 }
217 @ <input type="submit">
218 @ </form>
219 style_finish_page("test");
220 }
221
222 /*
223 ** Return a new timelineTable id.
224 */
@@ -2625,11 +2625,11 @@
2625 db_finalize(&q);
2626 if( zOlderButton ){
2627 @ %z(chref("button","%z",zOlderButton))More&nbsp;&darr;</a>
2628 }
2629 document_emit_js(/*handles pikchrs rendered above*/);
2630 style_finish_page("timeline");
2631 }
2632
2633 /*
2634 ** The input query q selects various records. Print a human-readable
2635 ** summary of those records.
@@ -3117,11 +3117,11 @@
3117 @ <small>%z(href("%R/timeline?c=%t",zId))(more context)</a>\
3118 @ </small></h2>
3119 www_print_timeline(&q, TIMELINE_GRAPH, 0, 0, 0, 0, 0, 0);
3120 }
3121 db_finalize(&q);
3122 style_finish_page("timeline");
3123 }
3124
3125
3126 /*
3127 ** COMMAND: test-timewarp-list
@@ -3223,7 +3223,7 @@
3223 if( cnt==0 ){
3224 @ <p>No timewarps in this repository</p>
3225 }else{
3226 @ </tbody></table></div>
3227 }
3228 style_finish_page("timewarps");
3229 }
3230
+11 -11
--- src/tkt.c
+++ src/tkt.c
@@ -617,11 +617,11 @@
617617
" WHERE tkt_uuid GLOB '%q*'", zUuid);
618618
if( zFullName ){
619619
attachment_list(zFullName, "<hr /><h2>Attachments:</h2><ul>");
620620
}
621621
622
- style_body_and_footer("tkt");
622
+ style_finish_page("tkt");
623623
}
624624
625625
/*
626626
** TH1 command: append_field FIELD STRING
627627
**
@@ -840,11 +840,11 @@
840840
return;
841841
}
842842
captcha_generate(0);
843843
@ </form>
844844
if( g.thTrace ) Th_Trace("END_TKTVIEW<br />\n", -1);
845
- style_body_and_footer("tkt");
845
+ style_finish_page("tkt");
846846
}
847847
848848
/*
849849
** WEBPAGE: tktedit
850850
** WEBPAGE: debug_tktedit
@@ -873,24 +873,24 @@
873873
}
874874
style_header("Edit Ticket");
875875
if( zName==0 || (nName = strlen(zName))<4 || nName>HNAME_LEN_SHA1
876876
|| !validate16(zName,nName) ){
877877
@ <span class="tktError">Not a valid ticket id: "%h(zName)"</span>
878
- style_body_and_footer("tkt");
878
+ style_finish_page("tkt");
879879
return;
880880
}
881881
nRec = db_int(0, "SELECT count(*) FROM ticket WHERE tkt_uuid GLOB '%q*'",
882882
zName);
883883
if( nRec==0 ){
884884
@ <span class="tktError">No such ticket: "%h(zName)"</span>
885
- style_body_and_footer("tkt");
885
+ style_finish_page("tkt");
886886
return;
887887
}
888888
if( nRec>1 ){
889889
@ <span class="tktError">%d(nRec) tickets begin with:
890890
@ "%h(zName)"</span>
891
- style_body_and_footer("tkt");
891
+ style_finish_page("tkt");
892892
return;
893893
}
894894
if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT<br />\n", -1);
895895
ticket_init();
896896
getAllTicketFields();
@@ -911,11 +911,11 @@
911911
return;
912912
}
913913
captcha_generate(0);
914914
@ </form>
915915
if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT<br />\n", -1);
916
- style_body_and_footer("tkt");
916
+ style_finish_page("tkt");
917917
}
918918
919919
/*
920920
** Check the ticket table schema in zSchema to see if it appears to
921921
** be well-formed. If everything is OK, return NULL. If something is
@@ -1041,15 +1041,15 @@
10411041
sqlite3_snprintf(6, zGlobPattern, "%s", zUuid);
10421042
canonical16(zGlobPattern, strlen(zGlobPattern));
10431043
tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid);
10441044
if( tagid==0 ){
10451045
@ No such ticket: %h(zUuid)
1046
- style_body_and_footer("tkt");
1046
+ style_finish_page("tkt");
10471047
return;
10481048
}
10491049
tkt_draw_timeline(tagid, zType);
1050
- style_body_and_footer("tkt");
1050
+ style_finish_page("tkt");
10511051
}
10521052
10531053
/*
10541054
** WEBPAGE: tkthistory
10551055
** URL: /tkthistory?name=TICKETUUID
@@ -1088,11 +1088,11 @@
10881088
style_header("%z", zTitle);
10891089
10901090
tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid);
10911091
if( tagid==0 ){
10921092
@ No such ticket: %h(zUuid)
1093
- style_body_and_footer("tkt");
1093
+ style_finish_page("tkt");
10941094
return;
10951095
}
10961096
if( P("raw")!=0 ){
10971097
@ <h2>Raw Artifacts Associated With Ticket %h(zUuid)</h2>
10981098
}else{
@@ -1161,11 +1161,11 @@
11611161
}
11621162
db_finalize(&q);
11631163
if( nChng ){
11641164
@ </ol>
11651165
}
1166
- style_body_and_footer("tkt");
1166
+ style_finish_page("tkt");
11671167
}
11681168
11691169
/*
11701170
** Return TRUE if the given BLOB contains a newline character.
11711171
*/
@@ -1613,7 +1613,7 @@
16131613
void tkt_srchpage(void){
16141614
login_check_credentials();
16151615
style_header("Ticket Search");
16161616
ticket_standard_submenu(T_ALL_BUT(T_SRCH));
16171617
search_screen(SRCH_TKT, 0);
1618
- style_body_and_footer("tkt");
1618
+ style_finish_page("tkt");
16191619
}
16201620
--- src/tkt.c
+++ src/tkt.c
@@ -617,11 +617,11 @@
617 " WHERE tkt_uuid GLOB '%q*'", zUuid);
618 if( zFullName ){
619 attachment_list(zFullName, "<hr /><h2>Attachments:</h2><ul>");
620 }
621
622 style_body_and_footer("tkt");
623 }
624
625 /*
626 ** TH1 command: append_field FIELD STRING
627 **
@@ -840,11 +840,11 @@
840 return;
841 }
842 captcha_generate(0);
843 @ </form>
844 if( g.thTrace ) Th_Trace("END_TKTVIEW<br />\n", -1);
845 style_body_and_footer("tkt");
846 }
847
848 /*
849 ** WEBPAGE: tktedit
850 ** WEBPAGE: debug_tktedit
@@ -873,24 +873,24 @@
873 }
874 style_header("Edit Ticket");
875 if( zName==0 || (nName = strlen(zName))<4 || nName>HNAME_LEN_SHA1
876 || !validate16(zName,nName) ){
877 @ <span class="tktError">Not a valid ticket id: "%h(zName)"</span>
878 style_body_and_footer("tkt");
879 return;
880 }
881 nRec = db_int(0, "SELECT count(*) FROM ticket WHERE tkt_uuid GLOB '%q*'",
882 zName);
883 if( nRec==0 ){
884 @ <span class="tktError">No such ticket: "%h(zName)"</span>
885 style_body_and_footer("tkt");
886 return;
887 }
888 if( nRec>1 ){
889 @ <span class="tktError">%d(nRec) tickets begin with:
890 @ "%h(zName)"</span>
891 style_body_and_footer("tkt");
892 return;
893 }
894 if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT<br />\n", -1);
895 ticket_init();
896 getAllTicketFields();
@@ -911,11 +911,11 @@
911 return;
912 }
913 captcha_generate(0);
914 @ </form>
915 if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT<br />\n", -1);
916 style_body_and_footer("tkt");
917 }
918
919 /*
920 ** Check the ticket table schema in zSchema to see if it appears to
921 ** be well-formed. If everything is OK, return NULL. If something is
@@ -1041,15 +1041,15 @@
1041 sqlite3_snprintf(6, zGlobPattern, "%s", zUuid);
1042 canonical16(zGlobPattern, strlen(zGlobPattern));
1043 tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid);
1044 if( tagid==0 ){
1045 @ No such ticket: %h(zUuid)
1046 style_body_and_footer("tkt");
1047 return;
1048 }
1049 tkt_draw_timeline(tagid, zType);
1050 style_body_and_footer("tkt");
1051 }
1052
1053 /*
1054 ** WEBPAGE: tkthistory
1055 ** URL: /tkthistory?name=TICKETUUID
@@ -1088,11 +1088,11 @@
1088 style_header("%z", zTitle);
1089
1090 tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid);
1091 if( tagid==0 ){
1092 @ No such ticket: %h(zUuid)
1093 style_body_and_footer("tkt");
1094 return;
1095 }
1096 if( P("raw")!=0 ){
1097 @ <h2>Raw Artifacts Associated With Ticket %h(zUuid)</h2>
1098 }else{
@@ -1161,11 +1161,11 @@
1161 }
1162 db_finalize(&q);
1163 if( nChng ){
1164 @ </ol>
1165 }
1166 style_body_and_footer("tkt");
1167 }
1168
1169 /*
1170 ** Return TRUE if the given BLOB contains a newline character.
1171 */
@@ -1613,7 +1613,7 @@
1613 void tkt_srchpage(void){
1614 login_check_credentials();
1615 style_header("Ticket Search");
1616 ticket_standard_submenu(T_ALL_BUT(T_SRCH));
1617 search_screen(SRCH_TKT, 0);
1618 style_body_and_footer("tkt");
1619 }
1620
--- src/tkt.c
+++ src/tkt.c
@@ -617,11 +617,11 @@
617 " WHERE tkt_uuid GLOB '%q*'", zUuid);
618 if( zFullName ){
619 attachment_list(zFullName, "<hr /><h2>Attachments:</h2><ul>");
620 }
621
622 style_finish_page("tkt");
623 }
624
625 /*
626 ** TH1 command: append_field FIELD STRING
627 **
@@ -840,11 +840,11 @@
840 return;
841 }
842 captcha_generate(0);
843 @ </form>
844 if( g.thTrace ) Th_Trace("END_TKTVIEW<br />\n", -1);
845 style_finish_page("tkt");
846 }
847
848 /*
849 ** WEBPAGE: tktedit
850 ** WEBPAGE: debug_tktedit
@@ -873,24 +873,24 @@
873 }
874 style_header("Edit Ticket");
875 if( zName==0 || (nName = strlen(zName))<4 || nName>HNAME_LEN_SHA1
876 || !validate16(zName,nName) ){
877 @ <span class="tktError">Not a valid ticket id: "%h(zName)"</span>
878 style_finish_page("tkt");
879 return;
880 }
881 nRec = db_int(0, "SELECT count(*) FROM ticket WHERE tkt_uuid GLOB '%q*'",
882 zName);
883 if( nRec==0 ){
884 @ <span class="tktError">No such ticket: "%h(zName)"</span>
885 style_finish_page("tkt");
886 return;
887 }
888 if( nRec>1 ){
889 @ <span class="tktError">%d(nRec) tickets begin with:
890 @ "%h(zName)"</span>
891 style_finish_page("tkt");
892 return;
893 }
894 if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT<br />\n", -1);
895 ticket_init();
896 getAllTicketFields();
@@ -911,11 +911,11 @@
911 return;
912 }
913 captcha_generate(0);
914 @ </form>
915 if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT<br />\n", -1);
916 style_finish_page("tkt");
917 }
918
919 /*
920 ** Check the ticket table schema in zSchema to see if it appears to
921 ** be well-formed. If everything is OK, return NULL. If something is
@@ -1041,15 +1041,15 @@
1041 sqlite3_snprintf(6, zGlobPattern, "%s", zUuid);
1042 canonical16(zGlobPattern, strlen(zGlobPattern));
1043 tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid);
1044 if( tagid==0 ){
1045 @ No such ticket: %h(zUuid)
1046 style_finish_page("tkt");
1047 return;
1048 }
1049 tkt_draw_timeline(tagid, zType);
1050 style_finish_page("tkt");
1051 }
1052
1053 /*
1054 ** WEBPAGE: tkthistory
1055 ** URL: /tkthistory?name=TICKETUUID
@@ -1088,11 +1088,11 @@
1088 style_header("%z", zTitle);
1089
1090 tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid);
1091 if( tagid==0 ){
1092 @ No such ticket: %h(zUuid)
1093 style_finish_page("tkt");
1094 return;
1095 }
1096 if( P("raw")!=0 ){
1097 @ <h2>Raw Artifacts Associated With Ticket %h(zUuid)</h2>
1098 }else{
@@ -1161,11 +1161,11 @@
1161 }
1162 db_finalize(&q);
1163 if( nChng ){
1164 @ </ol>
1165 }
1166 style_finish_page("tkt");
1167 }
1168
1169 /*
1170 ** Return TRUE if the given BLOB contains a newline character.
1171 */
@@ -1613,7 +1613,7 @@
1613 void tkt_srchpage(void){
1614 login_check_credentials();
1615 style_header("Ticket Search");
1616 ticket_standard_submenu(T_ALL_BUT(T_SRCH));
1617 search_screen(SRCH_TKT, 0);
1618 style_finish_page("tkt");
1619 }
1620
+3 -3
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -54,11 +54,11 @@
5454
setup_menu_entry("Report Template", "tktsetup_rpttplt",
5555
"The default ticket report format.");
5656
setup_menu_entry("Key Template", "tktsetup_keytplt",
5757
"The default color key for reports.");
5858
@ </table>
59
- style_body_and_footer("tktsetup");
59
+ style_finish_page("tktsetup");
6060
}
6161
6262
/*
6363
** NOTE: When changing the table definition below, also change the
6464
** equivalent definition found in schema.c.
@@ -163,11 +163,11 @@
163163
@ <hr />
164164
@ <h2>Default %s(zTitle)</h2>
165165
@ <blockquote><pre>
166166
@ %h(zDfltValue)
167167
@ </pre></blockquote>
168
- style_body_and_footer("tktsetup");
168
+ style_finish_page("tktsetup");
169169
}
170170
171171
/*
172172
** WEBPAGE: tktsetup_tab
173173
** Administrative page for defining the "ticket" table used
@@ -934,8 +934,8 @@
934934
@ <input type="submit" name="submit" value="Apply Changes" />
935935
@ <input type="submit" name="setup" value="Cancel" />
936936
@ </p>
937937
@ </div></form>
938938
db_end_transaction(0);
939
- style_body_and_footer("tktsetup");
939
+ style_finish_page("tktsetup");
940940
941941
}
942942
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -54,11 +54,11 @@
54 setup_menu_entry("Report Template", "tktsetup_rpttplt",
55 "The default ticket report format.");
56 setup_menu_entry("Key Template", "tktsetup_keytplt",
57 "The default color key for reports.");
58 @ </table>
59 style_body_and_footer("tktsetup");
60 }
61
62 /*
63 ** NOTE: When changing the table definition below, also change the
64 ** equivalent definition found in schema.c.
@@ -163,11 +163,11 @@
163 @ <hr />
164 @ <h2>Default %s(zTitle)</h2>
165 @ <blockquote><pre>
166 @ %h(zDfltValue)
167 @ </pre></blockquote>
168 style_body_and_footer("tktsetup");
169 }
170
171 /*
172 ** WEBPAGE: tktsetup_tab
173 ** Administrative page for defining the "ticket" table used
@@ -934,8 +934,8 @@
934 @ <input type="submit" name="submit" value="Apply Changes" />
935 @ <input type="submit" name="setup" value="Cancel" />
936 @ </p>
937 @ </div></form>
938 db_end_transaction(0);
939 style_body_and_footer("tktsetup");
940
941 }
942
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -54,11 +54,11 @@
54 setup_menu_entry("Report Template", "tktsetup_rpttplt",
55 "The default ticket report format.");
56 setup_menu_entry("Key Template", "tktsetup_keytplt",
57 "The default color key for reports.");
58 @ </table>
59 style_finish_page("tktsetup");
60 }
61
62 /*
63 ** NOTE: When changing the table definition below, also change the
64 ** equivalent definition found in schema.c.
@@ -163,11 +163,11 @@
163 @ <hr />
164 @ <h2>Default %s(zTitle)</h2>
165 @ <blockquote><pre>
166 @ %h(zDfltValue)
167 @ </pre></blockquote>
168 style_finish_page("tktsetup");
169 }
170
171 /*
172 ** WEBPAGE: tktsetup_tab
173 ** Administrative page for defining the "ticket" table used
@@ -934,8 +934,8 @@
934 @ <input type="submit" name="submit" value="Apply Changes" />
935 @ <input type="submit" name="setup" value="Cancel" />
936 @ </p>
937 @ </div></form>
938 db_end_transaction(0);
939 style_finish_page("tktsetup");
940
941 }
942
--- src/unversioned.c
+++ src/unversioned.c
@@ -546,11 +546,11 @@
546546
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
547547
etag_check(ETAG_DATA,0);
548548
style_header("Unversioned Files");
549549
if( !db_table_exists("repository","unversioned") ){
550550
@ No unversioned files on this server
551
- style_body_and_footer("uvlist");
551
+ style_finish_page("uvlist");
552552
return;
553553
}
554554
if( PB("byage") ) zOrderBy = "mtime DESC";
555555
if( PB("showdel") ) showDel = 1;
556556
db_prepare(&q,
@@ -632,11 +632,11 @@
632632
@ </tfoot>
633633
@ </table></div>
634634
}else{
635635
@ No unversioned files on this server.
636636
}
637
- style_body_and_footer("uvlist");
637
+ style_finish_page("uvlist");
638638
}
639639
640640
/*
641641
** WEBPAGE: juvlist
642642
**
643643
--- src/unversioned.c
+++ src/unversioned.c
@@ -546,11 +546,11 @@
546 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
547 etag_check(ETAG_DATA,0);
548 style_header("Unversioned Files");
549 if( !db_table_exists("repository","unversioned") ){
550 @ No unversioned files on this server
551 style_body_and_footer("uvlist");
552 return;
553 }
554 if( PB("byage") ) zOrderBy = "mtime DESC";
555 if( PB("showdel") ) showDel = 1;
556 db_prepare(&q,
@@ -632,11 +632,11 @@
632 @ </tfoot>
633 @ </table></div>
634 }else{
635 @ No unversioned files on this server.
636 }
637 style_body_and_footer("uvlist");
638 }
639
640 /*
641 ** WEBPAGE: juvlist
642 **
643
--- src/unversioned.c
+++ src/unversioned.c
@@ -546,11 +546,11 @@
546 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
547 etag_check(ETAG_DATA,0);
548 style_header("Unversioned Files");
549 if( !db_table_exists("repository","unversioned") ){
550 @ No unversioned files on this server
551 style_finish_page("uvlist");
552 return;
553 }
554 if( PB("byage") ) zOrderBy = "mtime DESC";
555 if( PB("showdel") ) showDel = 1;
556 db_prepare(&q,
@@ -632,11 +632,11 @@
632 @ </tfoot>
633 @ </table></div>
634 }else{
635 @ No unversioned files on this server.
636 }
637 style_finish_page("uvlist");
638 }
639
640 /*
641 ** WEBPAGE: juvlist
642 **
643
+1 -1
--- src/user.c
+++ src/user.c
@@ -772,7 +772,7 @@
772772
@ <label><input type="checkbox" name="delall">
773773
@ Delete all entries</input></label>
774774
@ <input type="submit" name="delallbtn" value="Delete"></input>
775775
@ </form>
776776
style_table_sorter();
777
- style_body_and_footer("access_log");
777
+ style_finish_page("access_log");
778778
}
779779
--- src/user.c
+++ src/user.c
@@ -772,7 +772,7 @@
772 @ <label><input type="checkbox" name="delall">
773 @ Delete all entries</input></label>
774 @ <input type="submit" name="delallbtn" value="Delete"></input>
775 @ </form>
776 style_table_sorter();
777 style_body_and_footer("access_log");
778 }
779
--- src/user.c
+++ src/user.c
@@ -772,7 +772,7 @@
772 @ <label><input type="checkbox" name="delall">
773 @ Delete all entries</input></label>
774 @ <input type="submit" name="delallbtn" value="Delete"></input>
775 @ </form>
776 style_table_sorter();
777 style_finish_page("access_log");
778 }
779
+5 -5
--- src/webmail.c
+++ src/webmail.c
@@ -513,11 +513,11 @@
513513
style_submenu_element("Delete", "%s",
514514
url_render(pUrl,"trash","1",zENum,"1"));
515515
}
516516
517517
db_end_transaction(0);
518
- style_body_and_footer("webmail");
518
+ style_finish_page("webmail");
519519
return;
520520
}
521521
522522
/*
523523
** Scan the query parameters looking for parameters with name of the
@@ -613,11 +613,11 @@
613613
return;
614614
}
615615
if( !db_table_exists("repository","emailbox") ){
616616
style_header("Webmail Not Available");
617617
@ <p>This repository is not configured to provide webmail</p>
618
- style_body_and_footer("webmail");
618
+ style_finish_page("webmail");
619619
return;
620620
}
621621
add_content_sql_commands(g.db);
622622
emailid = atoi(PD("id","0"));
623623
url_initialize(&url, "webmail");
@@ -757,11 +757,11 @@
757757
@ for(i=0; i<x.length; i++){
758758
@ x[i].checked = true;
759759
@ }
760760
@ }
761761
@ </script>
762
- style_body_and_footer("webmail");
762
+ style_finish_page("webmail");
763763
db_end_transaction(0);
764764
}
765765
766766
/*
767767
** WEBPAGE: emailblob
@@ -854,11 +854,11 @@
854854
}
855855
@ </tbody></table>
856856
db_finalize(&q);
857857
style_table_sorter();
858858
}
859
- style_body_and_footer("webmail");
859
+ style_finish_page("webmail");
860860
}
861861
862862
/*
863863
** WEBPAGE: emailoutq
864864
**
@@ -911,7 +911,7 @@
911911
}
912912
}
913913
@ </tbody></table>
914914
db_finalize(&q);
915915
style_table_sorter();
916
- style_body_and_footer("webmail");
916
+ style_finish_page("webmail");
917917
}
918918
--- src/webmail.c
+++ src/webmail.c
@@ -513,11 +513,11 @@
513 style_submenu_element("Delete", "%s",
514 url_render(pUrl,"trash","1",zENum,"1"));
515 }
516
517 db_end_transaction(0);
518 style_body_and_footer("webmail");
519 return;
520 }
521
522 /*
523 ** Scan the query parameters looking for parameters with name of the
@@ -613,11 +613,11 @@
613 return;
614 }
615 if( !db_table_exists("repository","emailbox") ){
616 style_header("Webmail Not Available");
617 @ <p>This repository is not configured to provide webmail</p>
618 style_body_and_footer("webmail");
619 return;
620 }
621 add_content_sql_commands(g.db);
622 emailid = atoi(PD("id","0"));
623 url_initialize(&url, "webmail");
@@ -757,11 +757,11 @@
757 @ for(i=0; i<x.length; i++){
758 @ x[i].checked = true;
759 @ }
760 @ }
761 @ </script>
762 style_body_and_footer("webmail");
763 db_end_transaction(0);
764 }
765
766 /*
767 ** WEBPAGE: emailblob
@@ -854,11 +854,11 @@
854 }
855 @ </tbody></table>
856 db_finalize(&q);
857 style_table_sorter();
858 }
859 style_body_and_footer("webmail");
860 }
861
862 /*
863 ** WEBPAGE: emailoutq
864 **
@@ -911,7 +911,7 @@
911 }
912 }
913 @ </tbody></table>
914 db_finalize(&q);
915 style_table_sorter();
916 style_body_and_footer("webmail");
917 }
918
--- src/webmail.c
+++ src/webmail.c
@@ -513,11 +513,11 @@
513 style_submenu_element("Delete", "%s",
514 url_render(pUrl,"trash","1",zENum,"1"));
515 }
516
517 db_end_transaction(0);
518 style_finish_page("webmail");
519 return;
520 }
521
522 /*
523 ** Scan the query parameters looking for parameters with name of the
@@ -613,11 +613,11 @@
613 return;
614 }
615 if( !db_table_exists("repository","emailbox") ){
616 style_header("Webmail Not Available");
617 @ <p>This repository is not configured to provide webmail</p>
618 style_finish_page("webmail");
619 return;
620 }
621 add_content_sql_commands(g.db);
622 emailid = atoi(PD("id","0"));
623 url_initialize(&url, "webmail");
@@ -757,11 +757,11 @@
757 @ for(i=0; i<x.length; i++){
758 @ x[i].checked = true;
759 @ }
760 @ }
761 @ </script>
762 style_finish_page("webmail");
763 db_end_transaction(0);
764 }
765
766 /*
767 ** WEBPAGE: emailblob
@@ -854,11 +854,11 @@
854 }
855 @ </tbody></table>
856 db_finalize(&q);
857 style_table_sorter();
858 }
859 style_finish_page("webmail");
860 }
861
862 /*
863 ** WEBPAGE: emailoutq
864 **
@@ -911,7 +911,7 @@
911 }
912 }
913 @ </tbody></table>
914 db_finalize(&q);
915 style_table_sorter();
916 style_finish_page("webmail");
917 }
918
+15 -15
--- src/wiki.c
+++ src/wiki.c
@@ -66,11 +66,11 @@
6666
if( !wiki_name_is_wellformed((const unsigned char *)z) ){
6767
style_header("Wiki Page Name Error");
6868
@ The wiki name "<span class="wikiError">%h(z)</span>" is not well-formed.
6969
@ Rules for wiki page names:
7070
well_formed_wiki_name_rules();
71
- style_body_and_footer("wiki");
71
+ style_finish_page("wiki");
7272
return 1;
7373
}
7474
return 0;
7575
}
7676
@@ -141,11 +141,11 @@
141141
@ To fill in this page, first go to
142142
@ %z(href("%R/setup_config"))setup/config</a>
143143
@ and establish a "Project Name". Then create a
144144
@ wiki page with that name. The content of that wiki page
145145
@ will be displayed in place of this message.</p>
146
- style_body_and_footer("wiki");
146
+ style_finish_page("wiki");
147147
}
148148
149149
/*
150150
** Return true if the given pagename is the name of the sandbox
151151
*/
@@ -242,11 +242,11 @@
242242
blob_materialize(&x);
243243
interwiki_append_map_table(&x);
244244
safe_html_context(DOCSRC_TRUSTED);
245245
wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-markdown");
246246
blob_reset(&x);
247
- style_body_and_footer("wiki");
247
+ style_finish_page("wiki");
248248
}
249249
250250
/*
251251
** WEBPAGE: wiki_rules
252252
**
@@ -266,11 +266,11 @@
266266
blob_materialize(&x);
267267
interwiki_append_map_table(&x);
268268
safe_html_context(DOCSRC_TRUSTED);
269269
wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-fossil-wiki");
270270
blob_reset(&x);
271
- style_body_and_footer("wiki");
271
+ style_finish_page("wiki");
272272
}
273273
274274
/*
275275
** WEBPAGE: markup_help
276276
**
@@ -280,11 +280,11 @@
280280
style_header("Fossil Markup Styles");
281281
@ <ul>
282282
@ <li><p>%z(href("%R/wiki_rules"))Fossil Wiki Formatting Rules</a></p></li>
283283
@ <li><p>%z(href("%R/md_rules"))Markdown Formatting Rules</a></p></li>
284284
@ </ul>
285
- style_body_and_footer("wiki");
285
+ style_finish_page("wiki");
286286
}
287287
288288
/*
289289
** Returns non-zero if moderation is required for wiki changes and wiki
290290
** attachments.
@@ -369,11 +369,11 @@
369369
if( search_restrict(SRCH_WIKI)!=0 ){
370370
@ <li> %z(href("%R/wikisrch"))Search</a> for wiki pages containing key
371371
@ words</li>
372372
}
373373
@ </ul>
374
- style_body_and_footer("wiki");
374
+ style_finish_page("wiki");
375375
return;
376376
}
377377
378378
/*
379379
** WEBPAGE: wikisrch
@@ -384,11 +384,11 @@
384384
void wiki_srchpage(void){
385385
login_check_credentials();
386386
style_header("Wiki Search");
387387
wiki_standard_submenu(W_HELP|W_LIST|W_SANDBOX);
388388
search_screen(SRCH_WIKI, 0);
389
- style_body_and_footer("wiki");
389
+ style_finish_page("wiki");
390390
}
391391
392392
/* Return values from wiki_page_type() */
393393
#if INTERFACE
394394
# define WIKITYPE_UNKNOWN (-1)
@@ -597,11 +597,11 @@
597597
blob_reset(&wiki);
598598
}
599599
attachment_list(zPageName, "<hr /><h2>Attachments:</h2><ul>");
600600
manifest_destroy(pWiki);
601601
document_emit_js(/*for optional pikchr support*/);
602
- style_body_and_footer("wiki");
602
+ style_finish_page("wiki");
603603
}
604604
605605
/*
606606
** Write a wiki artifact into the repository
607607
*/
@@ -1344,11 +1344,11 @@
13441344
CX("}catch(e){"
13451345
"fossil.error(e); console.error('Exception:',e);"
13461346
"}\n");
13471347
CX("});\n"/*fossil.onPageLoad()*/);
13481348
style_script_end();
1349
- style_body_and_footer("wiki");
1349
+ style_finish_page("wiki");
13501350
}
13511351
13521352
/*
13531353
** WEBPAGE: wikinew
13541354
** URL /wikinew
@@ -1382,11 +1382,11 @@
13821382
@ </p></form>
13831383
if( zName[0] ){
13841384
@ <p><span class="wikiError">
13851385
@ "%h(zName)" is not a valid wiki page name!</span></p>
13861386
}
1387
- style_body_and_footer("wiki");
1387
+ style_finish_page("wiki");
13881388
}
13891389
13901390
13911391
/*
13921392
** Append the wiki text for an remark to the end of the given BLOB.
@@ -1544,11 +1544,11 @@
15441544
@ <input type="submit" name="preview" value="Preview Your Comment" />
15451545
@ <input type="submit" name="submit" value="Append Your Changes" />
15461546
@ <input type="submit" name="cancel" value="Cancel" />
15471547
captcha_generate(0);
15481548
@ </form>
1549
- style_body_and_footer("wiki");
1549
+ style_finish_page("wiki");
15501550
}
15511551
15521552
/*
15531553
** WEBPAGE: whistory
15541554
** URL: /whistory?name=PAGENAME
@@ -1582,11 +1582,11 @@
15821582
www_print_timeline(&q,
15831583
TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_REFS,
15841584
0, 0, 0, 0, 0, 0);
15851585
db_finalize(&q);
15861586
blob_reset(&sql);
1587
- style_body_and_footer("wiki");
1587
+ style_finish_page("wiki");
15881588
}
15891589
15901590
/*
15911591
** WEBPAGE: wdiff
15921592
**
@@ -1654,11 +1654,11 @@
16541654
@ <pre class="udiff">
16551655
@ %s(blob_str(&d))
16561656
@ <pre>
16571657
manifest_destroy(pW1);
16581658
manifest_destroy(pW2);
1659
- style_body_and_footer("wiki");
1659
+ style_finish_page("wiki");
16601660
}
16611661
16621662
/*
16631663
** A query that returns information about all wiki pages.
16641664
**
@@ -1756,11 +1756,11 @@
17561756
fossil_free(zWDisplayName);
17571757
}
17581758
@ </tbody></table></div>
17591759
db_finalize(&q);
17601760
style_table_sorter();
1761
- style_body_and_footer("wiki");
1761
+ style_finish_page("wiki");
17621762
}
17631763
17641764
/*
17651765
** WEBPAGE: wfind
17661766
**
@@ -1783,11 +1783,11 @@
17831783
const char *zName = db_column_text(&q, 0);
17841784
@ <li>%z(href("%R/wiki?name=%T",zName))%h(zName)</a></li>
17851785
}
17861786
db_finalize(&q);
17871787
@ </ul>
1788
- style_body_and_footer("wiki");
1788
+ style_finish_page("wiki");
17891789
}
17901790
17911791
/*
17921792
** Add a new wiki page to the repository. The page name is
17931793
** given by the zPageName parameter. rid must be zero to create
17941794
--- src/wiki.c
+++ src/wiki.c
@@ -66,11 +66,11 @@
66 if( !wiki_name_is_wellformed((const unsigned char *)z) ){
67 style_header("Wiki Page Name Error");
68 @ The wiki name "<span class="wikiError">%h(z)</span>" is not well-formed.
69 @ Rules for wiki page names:
70 well_formed_wiki_name_rules();
71 style_body_and_footer("wiki");
72 return 1;
73 }
74 return 0;
75 }
76
@@ -141,11 +141,11 @@
141 @ To fill in this page, first go to
142 @ %z(href("%R/setup_config"))setup/config</a>
143 @ and establish a "Project Name". Then create a
144 @ wiki page with that name. The content of that wiki page
145 @ will be displayed in place of this message.</p>
146 style_body_and_footer("wiki");
147 }
148
149 /*
150 ** Return true if the given pagename is the name of the sandbox
151 */
@@ -242,11 +242,11 @@
242 blob_materialize(&x);
243 interwiki_append_map_table(&x);
244 safe_html_context(DOCSRC_TRUSTED);
245 wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-markdown");
246 blob_reset(&x);
247 style_body_and_footer("wiki");
248 }
249
250 /*
251 ** WEBPAGE: wiki_rules
252 **
@@ -266,11 +266,11 @@
266 blob_materialize(&x);
267 interwiki_append_map_table(&x);
268 safe_html_context(DOCSRC_TRUSTED);
269 wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-fossil-wiki");
270 blob_reset(&x);
271 style_body_and_footer("wiki");
272 }
273
274 /*
275 ** WEBPAGE: markup_help
276 **
@@ -280,11 +280,11 @@
280 style_header("Fossil Markup Styles");
281 @ <ul>
282 @ <li><p>%z(href("%R/wiki_rules"))Fossil Wiki Formatting Rules</a></p></li>
283 @ <li><p>%z(href("%R/md_rules"))Markdown Formatting Rules</a></p></li>
284 @ </ul>
285 style_body_and_footer("wiki");
286 }
287
288 /*
289 ** Returns non-zero if moderation is required for wiki changes and wiki
290 ** attachments.
@@ -369,11 +369,11 @@
369 if( search_restrict(SRCH_WIKI)!=0 ){
370 @ <li> %z(href("%R/wikisrch"))Search</a> for wiki pages containing key
371 @ words</li>
372 }
373 @ </ul>
374 style_body_and_footer("wiki");
375 return;
376 }
377
378 /*
379 ** WEBPAGE: wikisrch
@@ -384,11 +384,11 @@
384 void wiki_srchpage(void){
385 login_check_credentials();
386 style_header("Wiki Search");
387 wiki_standard_submenu(W_HELP|W_LIST|W_SANDBOX);
388 search_screen(SRCH_WIKI, 0);
389 style_body_and_footer("wiki");
390 }
391
392 /* Return values from wiki_page_type() */
393 #if INTERFACE
394 # define WIKITYPE_UNKNOWN (-1)
@@ -597,11 +597,11 @@
597 blob_reset(&wiki);
598 }
599 attachment_list(zPageName, "<hr /><h2>Attachments:</h2><ul>");
600 manifest_destroy(pWiki);
601 document_emit_js(/*for optional pikchr support*/);
602 style_body_and_footer("wiki");
603 }
604
605 /*
606 ** Write a wiki artifact into the repository
607 */
@@ -1344,11 +1344,11 @@
1344 CX("}catch(e){"
1345 "fossil.error(e); console.error('Exception:',e);"
1346 "}\n");
1347 CX("});\n"/*fossil.onPageLoad()*/);
1348 style_script_end();
1349 style_body_and_footer("wiki");
1350 }
1351
1352 /*
1353 ** WEBPAGE: wikinew
1354 ** URL /wikinew
@@ -1382,11 +1382,11 @@
1382 @ </p></form>
1383 if( zName[0] ){
1384 @ <p><span class="wikiError">
1385 @ "%h(zName)" is not a valid wiki page name!</span></p>
1386 }
1387 style_body_and_footer("wiki");
1388 }
1389
1390
1391 /*
1392 ** Append the wiki text for an remark to the end of the given BLOB.
@@ -1544,11 +1544,11 @@
1544 @ <input type="submit" name="preview" value="Preview Your Comment" />
1545 @ <input type="submit" name="submit" value="Append Your Changes" />
1546 @ <input type="submit" name="cancel" value="Cancel" />
1547 captcha_generate(0);
1548 @ </form>
1549 style_body_and_footer("wiki");
1550 }
1551
1552 /*
1553 ** WEBPAGE: whistory
1554 ** URL: /whistory?name=PAGENAME
@@ -1582,11 +1582,11 @@
1582 www_print_timeline(&q,
1583 TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_REFS,
1584 0, 0, 0, 0, 0, 0);
1585 db_finalize(&q);
1586 blob_reset(&sql);
1587 style_body_and_footer("wiki");
1588 }
1589
1590 /*
1591 ** WEBPAGE: wdiff
1592 **
@@ -1654,11 +1654,11 @@
1654 @ <pre class="udiff">
1655 @ %s(blob_str(&d))
1656 @ <pre>
1657 manifest_destroy(pW1);
1658 manifest_destroy(pW2);
1659 style_body_and_footer("wiki");
1660 }
1661
1662 /*
1663 ** A query that returns information about all wiki pages.
1664 **
@@ -1756,11 +1756,11 @@
1756 fossil_free(zWDisplayName);
1757 }
1758 @ </tbody></table></div>
1759 db_finalize(&q);
1760 style_table_sorter();
1761 style_body_and_footer("wiki");
1762 }
1763
1764 /*
1765 ** WEBPAGE: wfind
1766 **
@@ -1783,11 +1783,11 @@
1783 const char *zName = db_column_text(&q, 0);
1784 @ <li>%z(href("%R/wiki?name=%T",zName))%h(zName)</a></li>
1785 }
1786 db_finalize(&q);
1787 @ </ul>
1788 style_body_and_footer("wiki");
1789 }
1790
1791 /*
1792 ** Add a new wiki page to the repository. The page name is
1793 ** given by the zPageName parameter. rid must be zero to create
1794
--- src/wiki.c
+++ src/wiki.c
@@ -66,11 +66,11 @@
66 if( !wiki_name_is_wellformed((const unsigned char *)z) ){
67 style_header("Wiki Page Name Error");
68 @ The wiki name "<span class="wikiError">%h(z)</span>" is not well-formed.
69 @ Rules for wiki page names:
70 well_formed_wiki_name_rules();
71 style_finish_page("wiki");
72 return 1;
73 }
74 return 0;
75 }
76
@@ -141,11 +141,11 @@
141 @ To fill in this page, first go to
142 @ %z(href("%R/setup_config"))setup/config</a>
143 @ and establish a "Project Name". Then create a
144 @ wiki page with that name. The content of that wiki page
145 @ will be displayed in place of this message.</p>
146 style_finish_page("wiki");
147 }
148
149 /*
150 ** Return true if the given pagename is the name of the sandbox
151 */
@@ -242,11 +242,11 @@
242 blob_materialize(&x);
243 interwiki_append_map_table(&x);
244 safe_html_context(DOCSRC_TRUSTED);
245 wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-markdown");
246 blob_reset(&x);
247 style_finish_page("wiki");
248 }
249
250 /*
251 ** WEBPAGE: wiki_rules
252 **
@@ -266,11 +266,11 @@
266 blob_materialize(&x);
267 interwiki_append_map_table(&x);
268 safe_html_context(DOCSRC_TRUSTED);
269 wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-fossil-wiki");
270 blob_reset(&x);
271 style_finish_page("wiki");
272 }
273
274 /*
275 ** WEBPAGE: markup_help
276 **
@@ -280,11 +280,11 @@
280 style_header("Fossil Markup Styles");
281 @ <ul>
282 @ <li><p>%z(href("%R/wiki_rules"))Fossil Wiki Formatting Rules</a></p></li>
283 @ <li><p>%z(href("%R/md_rules"))Markdown Formatting Rules</a></p></li>
284 @ </ul>
285 style_finish_page("wiki");
286 }
287
288 /*
289 ** Returns non-zero if moderation is required for wiki changes and wiki
290 ** attachments.
@@ -369,11 +369,11 @@
369 if( search_restrict(SRCH_WIKI)!=0 ){
370 @ <li> %z(href("%R/wikisrch"))Search</a> for wiki pages containing key
371 @ words</li>
372 }
373 @ </ul>
374 style_finish_page("wiki");
375 return;
376 }
377
378 /*
379 ** WEBPAGE: wikisrch
@@ -384,11 +384,11 @@
384 void wiki_srchpage(void){
385 login_check_credentials();
386 style_header("Wiki Search");
387 wiki_standard_submenu(W_HELP|W_LIST|W_SANDBOX);
388 search_screen(SRCH_WIKI, 0);
389 style_finish_page("wiki");
390 }
391
392 /* Return values from wiki_page_type() */
393 #if INTERFACE
394 # define WIKITYPE_UNKNOWN (-1)
@@ -597,11 +597,11 @@
597 blob_reset(&wiki);
598 }
599 attachment_list(zPageName, "<hr /><h2>Attachments:</h2><ul>");
600 manifest_destroy(pWiki);
601 document_emit_js(/*for optional pikchr support*/);
602 style_finish_page("wiki");
603 }
604
605 /*
606 ** Write a wiki artifact into the repository
607 */
@@ -1344,11 +1344,11 @@
1344 CX("}catch(e){"
1345 "fossil.error(e); console.error('Exception:',e);"
1346 "}\n");
1347 CX("});\n"/*fossil.onPageLoad()*/);
1348 style_script_end();
1349 style_finish_page("wiki");
1350 }
1351
1352 /*
1353 ** WEBPAGE: wikinew
1354 ** URL /wikinew
@@ -1382,11 +1382,11 @@
1382 @ </p></form>
1383 if( zName[0] ){
1384 @ <p><span class="wikiError">
1385 @ "%h(zName)" is not a valid wiki page name!</span></p>
1386 }
1387 style_finish_page("wiki");
1388 }
1389
1390
1391 /*
1392 ** Append the wiki text for an remark to the end of the given BLOB.
@@ -1544,11 +1544,11 @@
1544 @ <input type="submit" name="preview" value="Preview Your Comment" />
1545 @ <input type="submit" name="submit" value="Append Your Changes" />
1546 @ <input type="submit" name="cancel" value="Cancel" />
1547 captcha_generate(0);
1548 @ </form>
1549 style_finish_page("wiki");
1550 }
1551
1552 /*
1553 ** WEBPAGE: whistory
1554 ** URL: /whistory?name=PAGENAME
@@ -1582,11 +1582,11 @@
1582 www_print_timeline(&q,
1583 TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_REFS,
1584 0, 0, 0, 0, 0, 0);
1585 db_finalize(&q);
1586 blob_reset(&sql);
1587 style_finish_page("wiki");
1588 }
1589
1590 /*
1591 ** WEBPAGE: wdiff
1592 **
@@ -1654,11 +1654,11 @@
1654 @ <pre class="udiff">
1655 @ %s(blob_str(&d))
1656 @ <pre>
1657 manifest_destroy(pW1);
1658 manifest_destroy(pW2);
1659 style_finish_page("wiki");
1660 }
1661
1662 /*
1663 ** A query that returns information about all wiki pages.
1664 **
@@ -1756,11 +1756,11 @@
1756 fossil_free(zWDisplayName);
1757 }
1758 @ </tbody></table></div>
1759 db_finalize(&q);
1760 style_table_sorter();
1761 style_finish_page("wiki");
1762 }
1763
1764 /*
1765 ** WEBPAGE: wfind
1766 **
@@ -1783,11 +1783,11 @@
1783 const char *zName = db_column_text(&q, 0);
1784 @ <li>%z(href("%R/wiki?name=%T",zName))%h(zName)</a></li>
1785 }
1786 db_finalize(&q);
1787 @ </ul>
1788 style_finish_page("wiki");
1789 }
1790
1791 /*
1792 ** Add a new wiki page to the repository. The page name is
1793 ** given by the zPageName parameter. rid must be zero to create
1794
+2 -2
--- src/xfersetup.c
+++ src/xfersetup.c
@@ -85,11 +85,11 @@
8585
client_sync(syncFlags, 0, 0, 0);
8686
@ </pre>
8787
}
8888
}
8989
90
- style_body_and_footer("xfersetup");
90
+ style_finish_page("xfersetup");
9191
}
9292
9393
/*
9494
** Common implementation for the transfer setup editor pages.
9595
*/
@@ -150,11 +150,11 @@
150150
@ <h2>Default %s(zTitle)</h2>
151151
@ <blockquote><pre>
152152
@ %h(zDfltValue)
153153
@ </pre></blockquote>
154154
}
155
- style_body_and_footer("xfersetup");
155
+ style_finish_page("xfersetup");
156156
}
157157
158158
static const char *zDefaultXferCommon = 0;
159159
160160
/*
161161
--- src/xfersetup.c
+++ src/xfersetup.c
@@ -85,11 +85,11 @@
85 client_sync(syncFlags, 0, 0, 0);
86 @ </pre>
87 }
88 }
89
90 style_body_and_footer("xfersetup");
91 }
92
93 /*
94 ** Common implementation for the transfer setup editor pages.
95 */
@@ -150,11 +150,11 @@
150 @ <h2>Default %s(zTitle)</h2>
151 @ <blockquote><pre>
152 @ %h(zDfltValue)
153 @ </pre></blockquote>
154 }
155 style_body_and_footer("xfersetup");
156 }
157
158 static const char *zDefaultXferCommon = 0;
159
160 /*
161
--- src/xfersetup.c
+++ src/xfersetup.c
@@ -85,11 +85,11 @@
85 client_sync(syncFlags, 0, 0, 0);
86 @ </pre>
87 }
88 }
89
90 style_finish_page("xfersetup");
91 }
92
93 /*
94 ** Common implementation for the transfer setup editor pages.
95 */
@@ -150,11 +150,11 @@
150 @ <h2>Default %s(zTitle)</h2>
151 @ <blockquote><pre>
152 @ %h(zDfltValue)
153 @ </pre></blockquote>
154 }
155 style_finish_page("xfersetup");
156 }
157
158 static const char *zDefaultXferCommon = 0;
159
160 /*
161
+2 -2
--- src/zip.c
+++ src/zip.c
@@ -955,11 +955,11 @@
955955
}
956956
if( zExclude ){
957957
@ zExclude = "%h(zExclude)"<br />
958958
}
959959
@ zKey = "%h(zKey)"
960
- style_body_and_footer("zip");
960
+ style_finish_page("zip");
961961
return;
962962
}
963963
if( referred_from_login() ){
964964
style_header("%s Archive Download", zType);
965965
@ <form action='%R/%s(g.zPath)/%h(zName).%s(g.zPath)'>
@@ -966,11 +966,11 @@
966966
cgi_query_parameters_to_hidden();
967967
@ <p>%s(zType) Archive named <b>%h(zName).%s(g.zPath)</b>
968968
@ holding the content of check-in <b>%h(zRid)</b>:
969969
@ <input type="submit" value="Download" />
970970
@ </form>
971
- style_body_and_footer("zip");
971
+ style_finish_page("zip");
972972
return;
973973
}
974974
blob_zero(&zip);
975975
if( cache_read(&zip, zKey)==0 ){
976976
zip_of_checkin(eType, rid, &zip, zName, pInclude, pExclude);
977977
--- src/zip.c
+++ src/zip.c
@@ -955,11 +955,11 @@
955 }
956 if( zExclude ){
957 @ zExclude = "%h(zExclude)"<br />
958 }
959 @ zKey = "%h(zKey)"
960 style_body_and_footer("zip");
961 return;
962 }
963 if( referred_from_login() ){
964 style_header("%s Archive Download", zType);
965 @ <form action='%R/%s(g.zPath)/%h(zName).%s(g.zPath)'>
@@ -966,11 +966,11 @@
966 cgi_query_parameters_to_hidden();
967 @ <p>%s(zType) Archive named <b>%h(zName).%s(g.zPath)</b>
968 @ holding the content of check-in <b>%h(zRid)</b>:
969 @ <input type="submit" value="Download" />
970 @ </form>
971 style_body_and_footer("zip");
972 return;
973 }
974 blob_zero(&zip);
975 if( cache_read(&zip, zKey)==0 ){
976 zip_of_checkin(eType, rid, &zip, zName, pInclude, pExclude);
977
--- src/zip.c
+++ src/zip.c
@@ -955,11 +955,11 @@
955 }
956 if( zExclude ){
957 @ zExclude = "%h(zExclude)"<br />
958 }
959 @ zKey = "%h(zKey)"
960 style_finish_page("zip");
961 return;
962 }
963 if( referred_from_login() ){
964 style_header("%s Archive Download", zType);
965 @ <form action='%R/%s(g.zPath)/%h(zName).%s(g.zPath)'>
@@ -966,11 +966,11 @@
966 cgi_query_parameters_to_hidden();
967 @ <p>%s(zType) Archive named <b>%h(zName).%s(g.zPath)</b>
968 @ holding the content of check-in <b>%h(zRid)</b>:
969 @ <input type="submit" value="Download" />
970 @ </form>
971 style_finish_page("zip");
972 return;
973 }
974 blob_zero(&zip);
975 if( cache_read(&zip, zKey)==0 ){
976 zip_of_checkin(eType, rid, &zip, zName, pInclude, pExclude);
977

Keyboard Shortcuts

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