Fossil SCM

Avoid the use of tabs. Make sure lines do not exceed 80 characters.

drh 2010-09-13 22:14 UTC wolfgangFormat2CSS
Commit 4cc0ebef9a74d415d83ee58cb257af4cc09b3b26
+6 -3
--- src/branch.c
+++ src/branch.c
@@ -231,16 +231,19 @@
231231
}
232232
login_anonymous_available();
233233
compute_leaves(0, 1);
234234
style_sidebox_begin("Nomenclature:", "33%");
235235
@ <ol>
236
- @ <li> An <div class="sideboxDescribed"><a href="brlist">open branch</a></div> is a branch that has one or
236
+ @ <li> An <div class="sideboxDescribed"><a href="brlist">
237
+ @ open branch</a></div> is a branch that has one or
237238
@ more <a href="leaves">open leaves.</a>
238239
@ The presence of open leaves presumably means
239240
@ that the branch is still being extended with new check-ins.</li>
240
- @ <li> A <div class="sideboxDescribed"><a href="brlist?closed">closed branch</a></div> is a branch with only
241
- @ <div class="sideboxDescribed"><a href="leaves?closed">closed leaves</a></div>.
241
+ @ <li> A <div class="sideboxDescribed"><a href="brlist?closed">
242
+ @ closed branch</a></div> is a branch with only
243
+ @ <div class="sideboxDescribed"><a href="leaves?closed">
244
+ @ closed leaves</a></div>.
242245
@ Closed branches are fixed and do not change (unless they are first
243246
@ reopened)</li>
244247
@ </ol>
245248
style_sidebox_end();
246249
247250
--- src/branch.c
+++ src/branch.c
@@ -231,16 +231,19 @@
231 }
232 login_anonymous_available();
233 compute_leaves(0, 1);
234 style_sidebox_begin("Nomenclature:", "33%");
235 @ <ol>
236 @ <li> An <div class="sideboxDescribed"><a href="brlist">open branch</a></div> is a branch that has one or
 
237 @ more <a href="leaves">open leaves.</a>
238 @ The presence of open leaves presumably means
239 @ that the branch is still being extended with new check-ins.</li>
240 @ <li> A <div class="sideboxDescribed"><a href="brlist?closed">closed branch</a></div> is a branch with only
241 @ <div class="sideboxDescribed"><a href="leaves?closed">closed leaves</a></div>.
 
 
242 @ Closed branches are fixed and do not change (unless they are first
243 @ reopened)</li>
244 @ </ol>
245 style_sidebox_end();
246
247
--- src/branch.c
+++ src/branch.c
@@ -231,16 +231,19 @@
231 }
232 login_anonymous_available();
233 compute_leaves(0, 1);
234 style_sidebox_begin("Nomenclature:", "33%");
235 @ <ol>
236 @ <li> An <div class="sideboxDescribed"><a href="brlist">
237 @ open branch</a></div> is a branch that has one or
238 @ more <a href="leaves">open leaves.</a>
239 @ The presence of open leaves presumably means
240 @ that the branch is still being extended with new check-ins.</li>
241 @ <li> A <div class="sideboxDescribed"><a href="brlist?closed">
242 @ closed branch</a></div> is a branch with only
243 @ <div class="sideboxDescribed"><a href="leaves?closed">
244 @ closed leaves</a></div>.
245 @ Closed branches are fixed and do not change (unless they are first
246 @ reopened)</li>
247 @ </ol>
248 style_sidebox_end();
249
250
+2 -1
--- src/browse.c
+++ src/browse.c
@@ -233,11 +233,12 @@
233233
@ <li><a href="%s(zSubdirLink)%T(zFN)">%h(zFN)/</a></li>
234234
}else if( zCI ){
235235
const char *zUuid = db_column_text(&q, 1);
236236
@ <li><a href="%s(g.zBaseURL)/artifact?name=%s(zUuid)">%h(zFN)</a></li>
237237
}else{
238
- @ <li><a href="%s(g.zBaseURL)/finfo?name=%T(zPrefix)%T(zFN)">%h(zFN)</a></li>
238
+ @ <li><a href="%s(g.zBaseURL)/finfo?name=%T(zPrefix)%T(zFN)">%h(zFN)
239
+ @ </a></li>
239240
}
240241
}
241242
db_finalize(&q);
242243
@ </ul></td></tr></table>
243244
style_footer();
244245
--- src/browse.c
+++ src/browse.c
@@ -233,11 +233,12 @@
233 @ <li><a href="%s(zSubdirLink)%T(zFN)">%h(zFN)/</a></li>
234 }else if( zCI ){
235 const char *zUuid = db_column_text(&q, 1);
236 @ <li><a href="%s(g.zBaseURL)/artifact?name=%s(zUuid)">%h(zFN)</a></li>
237 }else{
238 @ <li><a href="%s(g.zBaseURL)/finfo?name=%T(zPrefix)%T(zFN)">%h(zFN)</a></li>
 
239 }
240 }
241 db_finalize(&q);
242 @ </ul></td></tr></table>
243 style_footer();
244
--- src/browse.c
+++ src/browse.c
@@ -233,11 +233,12 @@
233 @ <li><a href="%s(zSubdirLink)%T(zFN)">%h(zFN)/</a></li>
234 }else if( zCI ){
235 const char *zUuid = db_column_text(&q, 1);
236 @ <li><a href="%s(g.zBaseURL)/artifact?name=%s(zUuid)">%h(zFN)</a></li>
237 }else{
238 @ <li><a href="%s(g.zBaseURL)/finfo?name=%T(zPrefix)%T(zFN)">%h(zFN)
239 @ </a></li>
240 }
241 }
242 db_finalize(&q);
243 @ </ul></td></tr></table>
244 style_footer();
245
-2
--- src/db.c
+++ src/db.c
@@ -664,16 +664,14 @@
664664
}
665665
#endif
666666
if( file_isdir(zHome)!=1 ){
667667
fossil_fatal("invalid home directory: %s", zHome);
668668
}
669
-#ifndef __MINGW32__
670669
#ifndef _WIN32
671670
if( access(zHome, W_OK) ){
672671
fossil_fatal("home directory %s must be writeable", zHome);
673672
}
674
-#endif
675673
#endif
676674
g.zHome = mprintf("%/", zHome);
677675
#if defined(_WIN32)
678676
/* . filenames give some window systems problems and many apps problems */
679677
zDbName = mprintf("%//_fossil", zHome);
680678
--- src/db.c
+++ src/db.c
@@ -664,16 +664,14 @@
664 }
665 #endif
666 if( file_isdir(zHome)!=1 ){
667 fossil_fatal("invalid home directory: %s", zHome);
668 }
669 #ifndef __MINGW32__
670 #ifndef _WIN32
671 if( access(zHome, W_OK) ){
672 fossil_fatal("home directory %s must be writeable", zHome);
673 }
674 #endif
675 #endif
676 g.zHome = mprintf("%/", zHome);
677 #if defined(_WIN32)
678 /* . filenames give some window systems problems and many apps problems */
679 zDbName = mprintf("%//_fossil", zHome);
680
--- src/db.c
+++ src/db.c
@@ -664,16 +664,14 @@
664 }
665 #endif
666 if( file_isdir(zHome)!=1 ){
667 fossil_fatal("invalid home directory: %s", zHome);
668 }
 
669 #ifndef _WIN32
670 if( access(zHome, W_OK) ){
671 fossil_fatal("home directory %s must be writeable", zHome);
672 }
 
673 #endif
674 g.zHome = mprintf("%/", zHome);
675 #if defined(_WIN32)
676 /* . filenames give some window systems problems and many apps problems */
677 zDbName = mprintf("%//_fossil", zHome);
678
--- src/descendants.c
+++ src/descendants.c
@@ -318,14 +318,17 @@
318318
style_header("Leaves");
319319
login_anonymous_available();
320320
compute_leaves(0, showAll ? 0 : showClosed ? 2 : 1);
321321
style_sidebox_begin("Nomenclature:", "33%");
322322
@ <ol>
323
- @ <li> A <div class="sideboxDescribed">leaf</div> is a check-in with no descendants.</li>
324
- @ <li> An <div class="sideboxDescribed">open leaf</div> is a leaf that does not have a "closed" tag
323
+ @ <li> A <div class="sideboxDescribed">leaf</div>
324
+ @ is a check-in with no descendants.</li>
325
+ @ <li> An <div class="sideboxDescribed">open leaf</div>
326
+ @ is a leaf that does not have a "closed" tag
325327
@ and is thus assumed to still be in use.</li>
326
- @ <li> A <div class="sideboxDescribed">closed leaf</div> has a "closed" tag and is thus assumed to
328
+ @ <li> A <div class="sideboxDescribed">closed leaf</div>
329
+ @ has a "closed" tag and is thus assumed to
327330
@ be historical and no longer in active use.</li>
328331
@ </ol>
329332
style_sidebox_end();
330333
331334
if( showAll ){
332335
--- src/descendants.c
+++ src/descendants.c
@@ -318,14 +318,17 @@
318 style_header("Leaves");
319 login_anonymous_available();
320 compute_leaves(0, showAll ? 0 : showClosed ? 2 : 1);
321 style_sidebox_begin("Nomenclature:", "33%");
322 @ <ol>
323 @ <li> A <div class="sideboxDescribed">leaf</div> is a check-in with no descendants.</li>
324 @ <li> An <div class="sideboxDescribed">open leaf</div> is a leaf that does not have a "closed" tag
 
 
325 @ and is thus assumed to still be in use.</li>
326 @ <li> A <div class="sideboxDescribed">closed leaf</div> has a "closed" tag and is thus assumed to
 
327 @ be historical and no longer in active use.</li>
328 @ </ol>
329 style_sidebox_end();
330
331 if( showAll ){
332
--- src/descendants.c
+++ src/descendants.c
@@ -318,14 +318,17 @@
318 style_header("Leaves");
319 login_anonymous_available();
320 compute_leaves(0, showAll ? 0 : showClosed ? 2 : 1);
321 style_sidebox_begin("Nomenclature:", "33%");
322 @ <ol>
323 @ <li> A <div class="sideboxDescribed">leaf</div>
324 @ is a check-in with no descendants.</li>
325 @ <li> An <div class="sideboxDescribed">open leaf</div>
326 @ is a leaf that does not have a "closed" tag
327 @ and is thus assumed to still be in use.</li>
328 @ <li> A <div class="sideboxDescribed">closed leaf</div>
329 @ has a "closed" tag and is thus assumed to
330 @ be historical and no longer in active use.</li>
331 @ </ol>
332 style_sidebox_end();
333
334 if( showAll ){
335
+4 -2
--- src/finfo.c
+++ src/finfo.c
@@ -187,14 +187,15 @@
187187
hyperlink_to_uuid(zShortCkin);
188188
@ %h(zCom) (user:
189189
hyperlink_to_user(zUser, zDate, "");
190190
@ branch: %h(zBr))
191191
if( g.okHistory && zUuid ){
192
+ const char *z = zFilename;
192193
if( fpid ){
193194
@ <a href="%s(g.zTop)/fdiff?v1=%s(zPUuid)&amp;v2=%s(zUuid)">[diff]</a>
194195
}
195
- @ <a href="%s(g.zTop)/annotate?checkin=%S(zCkin)&amp;filename=%h(zFilename)">
196
+ @ <a href="%s(g.zTop)/annotate?checkin=%S(zCkin)&amp;filename=%h(z)">
196197
@ [annotate]</a>
197198
}
198199
@ </td></tr>
199200
}
200201
db_finalize(&q);
@@ -202,12 +203,13 @@
202203
graph_finish(pGraph, 1);
203204
if( pGraph->nErr ){
204205
graph_free(pGraph);
205206
pGraph = 0;
206207
}else{
207
- @ <tr><td></td><td><div style="width:%d(pGraph->mxRail*20+30)px;"></div></td></tr>
208
+ @ <tr><td></td><td><div style="width:%d(pGraph->mxRail*20+30)px;"></div>
209
+ @ </td></tr>
208210
}
209211
}
210212
@ </table>
211213
timeline_output_graph_javascript(pGraph);
212214
style_footer();
213215
}
214216
--- src/finfo.c
+++ src/finfo.c
@@ -187,14 +187,15 @@
187 hyperlink_to_uuid(zShortCkin);
188 @ %h(zCom) (user:
189 hyperlink_to_user(zUser, zDate, "");
190 @ branch: %h(zBr))
191 if( g.okHistory && zUuid ){
 
192 if( fpid ){
193 @ <a href="%s(g.zTop)/fdiff?v1=%s(zPUuid)&amp;v2=%s(zUuid)">[diff]</a>
194 }
195 @ <a href="%s(g.zTop)/annotate?checkin=%S(zCkin)&amp;filename=%h(zFilename)">
196 @ [annotate]</a>
197 }
198 @ </td></tr>
199 }
200 db_finalize(&q);
@@ -202,12 +203,13 @@
202 graph_finish(pGraph, 1);
203 if( pGraph->nErr ){
204 graph_free(pGraph);
205 pGraph = 0;
206 }else{
207 @ <tr><td></td><td><div style="width:%d(pGraph->mxRail*20+30)px;"></div></td></tr>
 
208 }
209 }
210 @ </table>
211 timeline_output_graph_javascript(pGraph);
212 style_footer();
213 }
214
--- src/finfo.c
+++ src/finfo.c
@@ -187,14 +187,15 @@
187 hyperlink_to_uuid(zShortCkin);
188 @ %h(zCom) (user:
189 hyperlink_to_user(zUser, zDate, "");
190 @ branch: %h(zBr))
191 if( g.okHistory && zUuid ){
192 const char *z = zFilename;
193 if( fpid ){
194 @ <a href="%s(g.zTop)/fdiff?v1=%s(zPUuid)&amp;v2=%s(zUuid)">[diff]</a>
195 }
196 @ <a href="%s(g.zTop)/annotate?checkin=%S(zCkin)&amp;filename=%h(z)">
197 @ [annotate]</a>
198 }
199 @ </td></tr>
200 }
201 db_finalize(&q);
@@ -202,12 +203,13 @@
203 graph_finish(pGraph, 1);
204 if( pGraph->nErr ){
205 graph_free(pGraph);
206 pGraph = 0;
207 }else{
208 @ <tr><td></td><td><div style="width:%d(pGraph->mxRail*20+30)px;"></div>
209 @ </td></tr>
210 }
211 }
212 @ </table>
213 timeline_output_graph_javascript(pGraph);
214 style_footer();
215 }
216
+3 -3
--- src/info.c
+++ src/info.c
@@ -399,13 +399,13 @@
399399
db_finalize(&q);
400400
}
401401
if( g.okHistory ){
402402
const char *zProjName = db_get("project-name", "unnamed");
403403
@ <tr><th>Timelines:</th><td>
404
- @ <a href="%s(g.zBaseURL)/timeline?p=%S(zUuid)">ancestors</a>
405
- @ | <a href="%s(g.zBaseURL)/timeline?d=%S(zUuid)">descendants</a>
406
- @ | <a href="%s(g.zBaseURL)/timeline?d=%S(zUuid)&amp;p=%S(zUuid)">both</a>
404
+ @ <a href="%s(g.zBaseURL)/timeline?p=%S(zUuid)">ancestors</a>
405
+ @ | <a href="%s(g.zBaseURL)/timeline?d=%S(zUuid)">descendants</a>
406
+ @ | <a href="%s(g.zBaseURL)/timeline?d=%S(zUuid)&amp;p=%S(zUuid)">both</a>
407407
db_prepare(&q, "SELECT substr(tag.tagname,5) FROM tagxref, tag "
408408
" WHERE rid=%d AND tagtype>0 "
409409
" AND tag.tagid=tagxref.tagid "
410410
" AND +tag.tagname GLOB 'sym-*'", rid);
411411
while( db_step(&q)==SQLITE_ROW ){
412412
--- src/info.c
+++ src/info.c
@@ -399,13 +399,13 @@
399 db_finalize(&q);
400 }
401 if( g.okHistory ){
402 const char *zProjName = db_get("project-name", "unnamed");
403 @ <tr><th>Timelines:</th><td>
404 @ <a href="%s(g.zBaseURL)/timeline?p=%S(zUuid)">ancestors</a>
405 @ | <a href="%s(g.zBaseURL)/timeline?d=%S(zUuid)">descendants</a>
406 @ | <a href="%s(g.zBaseURL)/timeline?d=%S(zUuid)&amp;p=%S(zUuid)">both</a>
407 db_prepare(&q, "SELECT substr(tag.tagname,5) FROM tagxref, tag "
408 " WHERE rid=%d AND tagtype>0 "
409 " AND tag.tagid=tagxref.tagid "
410 " AND +tag.tagname GLOB 'sym-*'", rid);
411 while( db_step(&q)==SQLITE_ROW ){
412
--- src/info.c
+++ src/info.c
@@ -399,13 +399,13 @@
399 db_finalize(&q);
400 }
401 if( g.okHistory ){
402 const char *zProjName = db_get("project-name", "unnamed");
403 @ <tr><th>Timelines:</th><td>
404 @ <a href="%s(g.zBaseURL)/timeline?p=%S(zUuid)">ancestors</a>
405 @ | <a href="%s(g.zBaseURL)/timeline?d=%S(zUuid)">descendants</a>
406 @ | <a href="%s(g.zBaseURL)/timeline?d=%S(zUuid)&amp;p=%S(zUuid)">both</a>
407 db_prepare(&q, "SELECT substr(tag.tagname,5) FROM tagxref, tag "
408 " WHERE rid=%d AND tagtype>0 "
409 " AND tag.tagid=tagxref.tagid "
410 " AND +tag.tagname GLOB 'sym-*'", rid);
411 while( db_step(&q)==SQLITE_ROW ){
412
+3 -3
--- src/login.c
+++ src/login.c
@@ -237,13 +237,13 @@
237237
}
238238
@ <table class="login_out">
239239
@ <tr>
240240
@ <td class="login_out_label">User ID:</td>
241241
if( anonFlag ){
242
- @ <td><input type="text" id="u" name="u" value="anonymous" size="30" /></td>
242
+ @ <td><input type="text" id="u" name="u" value="anonymous" size="30" /></td>
243243
}else{
244
- @ <td><input type="text" id="u" name="u" value="" size="30" /></td>
244
+ @ <td><input type="text" id="u" name="u" value="" size="30" /></td>
245245
}
246246
@ </tr>
247247
@ <tr>
248248
@ <td class="login_out_label">Password:</td>
249249
@ <td><input type="password" id="p" name="p" value="" size="30" /></td>
@@ -256,11 +256,11 @@
256256
@ <tr>
257257
@ <td></td>
258258
@ <td><input type="submit" name="in" value="Login" /></td>
259259
@ </tr>
260260
@ </table>
261
- @ <script type="text/JavaScript">document.getElementById('u').focus()</script>
261
+ @ <script type="text/JavaScript">document.getElementById('u').focus()</script>
262262
if( g.zLogin==0 ){
263263
@ <p>Enter
264264
}else{
265265
@ <p>You are currently logged in as <b>%h(g.zLogin)</b></p>
266266
@ <p>To change your login to a different user, enter
267267
--- src/login.c
+++ src/login.c
@@ -237,13 +237,13 @@
237 }
238 @ <table class="login_out">
239 @ <tr>
240 @ <td class="login_out_label">User ID:</td>
241 if( anonFlag ){
242 @ <td><input type="text" id="u" name="u" value="anonymous" size="30" /></td>
243 }else{
244 @ <td><input type="text" id="u" name="u" value="" size="30" /></td>
245 }
246 @ </tr>
247 @ <tr>
248 @ <td class="login_out_label">Password:</td>
249 @ <td><input type="password" id="p" name="p" value="" size="30" /></td>
@@ -256,11 +256,11 @@
256 @ <tr>
257 @ <td></td>
258 @ <td><input type="submit" name="in" value="Login" /></td>
259 @ </tr>
260 @ </table>
261 @ <script type="text/JavaScript">document.getElementById('u').focus()</script>
262 if( g.zLogin==0 ){
263 @ <p>Enter
264 }else{
265 @ <p>You are currently logged in as <b>%h(g.zLogin)</b></p>
266 @ <p>To change your login to a different user, enter
267
--- src/login.c
+++ src/login.c
@@ -237,13 +237,13 @@
237 }
238 @ <table class="login_out">
239 @ <tr>
240 @ <td class="login_out_label">User ID:</td>
241 if( anonFlag ){
242 @ <td><input type="text" id="u" name="u" value="anonymous" size="30" /></td>
243 }else{
244 @ <td><input type="text" id="u" name="u" value="" size="30" /></td>
245 }
246 @ </tr>
247 @ <tr>
248 @ <td class="login_out_label">Password:</td>
249 @ <td><input type="password" id="p" name="p" value="" size="30" /></td>
@@ -256,11 +256,11 @@
256 @ <tr>
257 @ <td></td>
258 @ <td><input type="submit" name="in" value="Login" /></td>
259 @ </tr>
260 @ </table>
261 @ <script type="text/JavaScript">document.getElementById('u').focus()</script>
262 if( g.zLogin==0 ){
263 @ <p>Enter
264 }else{
265 @ <p>You are currently logged in as <b>%h(g.zLogin)</b></p>
266 @ <p>To change your login to a different user, enter
267
+123 -94
--- src/setup.c
+++ src/setup.c
@@ -179,23 +179,25 @@
179179
@ user <tt>developer</tt></td></tr>
180180
@ <tr><td valign="top"><b>w</b></td>
181181
@ <td><i>Write-Tkt:</i> Edit tickets</td></tr>
182182
@ <tr><td valign="top"><b>z</b></td>
183183
@ <td><i>Zip download:</i> Download a baseline via the
184
- @ <tt>/zip</tt> URL even without check<span class="capability">o</span>ut
184
+ @ <tt>/zip</tt> URL even without
185
+ @ check<span class="capability">o</span>ut
185186
@ and <span class="capability">h</span>istory permissions</td></tr>
186187
@ </table>
187188
@ </li>
188189
@
189190
@ <li><p>
190
- @ Every user, logged in or not, inherits the privileges of <span class="usertype">nobody</span>.
191
+ @ Every user, logged in or not, inherits the privileges of
192
+ @ <span class="usertype">nobody</span>.
191193
@ </p></li>
192194
@
193195
@ <li><p>
194196
@ Any human can login as <span class="usertype">anonymous</span> since the
195
- @ password is clearly displayed on the login page for them to type. The purpose
196
- @ of requiring anonymous to log in is to prevent access by spiders.
197
+ @ password is clearly displayed on the login page for them to type. The
198
+ @ purpose of requiring anonymous to log in is to prevent access by spiders.
197199
@ Every logged-in user inherits the combined privileges of
198200
@ <span class="usertype">anonymous</span> and
199201
@ <span class="usertype">nobody</span>.
200202
@ </p></li>
201203
@
@@ -323,12 +325,12 @@
323325
}
324326
if( uid>0 &&
325327
db_exists("SELECT 1 FROM user WHERE login=%Q AND uid!=%d", zLogin, uid)
326328
){
327329
style_header("User Creation Error");
328
- @ <span class="loginError">Login "%h(zLogin)" is already used by a different
329
- @ user.</span>
330
+ @ <span class="loginError">Login "%h(zLogin)" is already used by
331
+ @ a different user.</span>
330332
@
331333
@ <p><a href="setup_uedit?id=%d(uid)">[Bummer]</a></p>
332334
style_footer();
333335
return;
334336
}
@@ -383,35 +385,39 @@
383385
memset(inherit, 0, sizeof(inherit));
384386
if( strcmp(zLogin, "developer") ){
385387
char *z1, *z2;
386388
z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='developer'");
387389
while( z1 && *z1 ){
388
- inherit[0x7f & *(z1++)] = "<span class=\"ueditInheritDeveloper\">&bull;</span>";
390
+ inherit[0x7f & *(z1++)] =
391
+ "<span class=\"ueditInheritDeveloper\">&bull;</span>";
389392
}
390393
free(z2);
391394
}
392395
if( strcmp(zLogin, "reader") ){
393396
char *z1, *z2;
394397
z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='reader'");
395398
while( z1 && *z1 ){
396
- inherit[0x7f & *(z1++)] = "<span class=\"ueditInheritReader\">&bull;</span>";
399
+ inherit[0x7f & *(z1++)] =
400
+ "<span class=\"ueditInheritReader\">&bull;</span>";
397401
}
398402
free(z2);
399403
}
400404
if( strcmp(zLogin, "anonymous") ){
401405
char *z1, *z2;
402406
z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='anonymous'");
403407
while( z1 && *z1 ){
404
- inherit[0x7f & *(z1++)] = "<span class=\"ueditInheritAnonymous\">&bull;</span>";
408
+ inherit[0x7f & *(z1++)] =
409
+ "<span class=\"ueditInheritAnonymous\">&bull;</span>";
405410
}
406411
free(z2);
407412
}
408413
if( strcmp(zLogin, "nobody") ){
409414
char *z1, *z2;
410415
z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='nobody'");
411416
while( z1 && *z1 ){
412
- inherit[0x7f & *(z1++)] = "<span class=\"ueditInheritNobody\">&bull;</span>";
417
+ inherit[0x7f & *(z1++)] =
418
+ "<span class=\"ueditInheritNobody\">&bull;</span>";
413419
}
414420
free(z2);
415421
}
416422
417423
/* Begin generating the page
@@ -499,96 +505,113 @@
499505
@ so you are not permitted to make changes to %h(zLogin).
500506
@ </b></font></p></li>
501507
@
502508
}
503509
@ <li><p>
504
- @ The <span class="capability">Setup</span> user can make arbitrary configuration changes.
505
- @ An <span class="usertype">Admin</span> user can add other users and change user privileges
510
+ @ The <span class="capability">Setup</span> user can make arbitrary
511
+ @ configuration changes. An <span class="usertype">Admin</span> user
512
+ @ can add other users and change user privileges
506513
@ and reset user passwords. Both automatically get all other privileges
507514
@ listed below. Use these two settings with discretion.
508515
@ </p></li>
509516
@
510517
@ <li><p>
511
- @ The "<span class="ueditInheritNobody"><big>&bull;</big></span>" mark indicates
512
- @ the privileges of <span class="usertype">nobody</span> that are available to all users
513
- @ regardless of whether or not they are logged in.
514
- @ </p></li>
515
- @
516
- @ <li><p>
517
- @ The "<span class="ueditInheritAnonymous"><big>&bull;</big></span>" mark indicates
518
- @ the privileges of <span class="usertype">anonymous</span> that are inherited by all logged-in users.
519
- @ </p></li>
520
- @
521
- @ <li><p>
522
- @ The "<span class="ueditInheritDeveloper"><big>&bull;</big></span>" mark indicates
523
- @ the privileges of <span class="usertype">developer</span> that are inherited by all users with
524
- @ the <span class="capability">Developer</span> privilege.
525
- @ </p></li>
526
- @
527
- @ <li><p>
528
- @ The "<span class="ueditInheritReader"><big>&bull;</big></span>" mark indicates
529
- @ the privileges of <span class="usertype">reader</span> that are inherited by all users with
530
- @ the <span class="capability">Reader</span> privilege.
531
- @ </p></li>
532
- @
533
- @ <li><p>
534
- @ The <span class="capability">Delete</span> privilege give the user the ability to erase
535
- @ wiki, tickets, and attachments that have been added by anonymous
536
- @ users. This capability is intended for deletion of spam. The
537
- @ delete capability is only in effect for 24 hours after the item
538
- @ is first posted. The <span class="usertype">Setup</span> user can delete anything at any time.
539
- @ </p></li>
540
- @
541
- @ <li><p>
542
- @ The <span class="capability">History</span> privilege allows a user to see most hyperlinks.
543
- @ This is recommended ON for most logged-in users but OFF for
544
- @ user "nobody" to avoid problems with spiders trying to walk every
545
- @ historical version of every baseline and file.
546
- @ </p></li>
547
- @
548
- @ <li><p>
549
- @ The <span class="capability">Zip</span> privilege allows a user to see the "download as ZIP"
518
+ @ The "<span class="ueditInheritNobody"><big>&bull;</big></span>" mark
519
+ @ indicates the privileges of <span class="usertype">nobody</span> that
520
+ @ are available to all users regardless of whether or not they are logged in.
521
+ @ </p></li>
522
+ @
523
+ @ <li><p>
524
+ @ The "<span class="ueditInheritAnonymous"><big>&bull;</big></span>" mark
525
+ @ indicates the privileges of <span class="usertype">anonymous</span> that
526
+ @ are inherited by all logged-in users.
527
+ @ </p></li>
528
+ @
529
+ @ <li><p>
530
+ @ The "<span class="ueditInheritDeveloper"><big>&bull;</big></span>" mark
531
+ @ indicates the privileges of <span class="usertype">developer</span> that
532
+ @ are inherited by all users with the
533
+ @ <span class="capability">Developer</span> privilege.
534
+ @ </p></li>
535
+ @
536
+ @ <li><p>
537
+ @ The "<span class="ueditInheritReader"><big>&bull;</big></span>" mark
538
+ @ indicates the privileges of <span class="usertype">reader</span> that
539
+ @ are inherited by all users with the <span class="capability">Reader</span>
540
+ @ privilege.
541
+ @ </p></li>
542
+ @
543
+ @ <li><p>
544
+ @ The <span class="capability">Delete</span> privilege give the user the
545
+ @ ability to erase wiki, tickets, and attachments that have been added
546
+ @ by anonymous users. This capability is intended for deletion of spam.
547
+ @ The delete capability is only in effect for 24 hours after the item
548
+ @ is first posted. The <span class="usertype">Setup</span> user can
549
+ @ delete anything at any time.
550
+ @ </p></li>
551
+ @
552
+ @ <li><p>
553
+ @ The <span class="capability">History</span> privilege allows a user
554
+ @ to see most hyperlinks. This is recommended ON for most logged-in users
555
+ @ but OFF for user "nobody" to avoid problems with spiders trying to walk
556
+ @ every historical version of every baseline and file.
557
+ @ </p></li>
558
+ @
559
+ @ <li><p>
560
+ @ The <span class="capability">Zip</span> privilege allows a user to
561
+ @ see the "download as ZIP"
550562
@ hyperlink and permits access to the <tt>/zip</tt> page. This allows
551563
@ users to download ZIP archives without granting other rights like
552
- @ <span class="capability">Read</span> or <span class="capability">History</span>. This privilege is recommended for
553
- @ user <span class="usertype">nobody</span> so that automatic package downloaders can obtain
554
- @ the sources without going through the login procedure.
564
+ @ <span class="capability">Read</span> or
565
+ @ <span class="capability">History</span>. This privilege is recommended for
566
+ @ user <span class="usertype">nobody</span> so that automatic package
567
+ @ downloaders can obtain the sources without going through the login
568
+ @ procedure.
555569
@ </p></li>
556570
@
557571
@ <li><p>
558
- @ The <span class="capability">Check-in</span> privilege allows remote users to "push".
559
- @ The <span class="capability">Check-out</span> privilege allows remote users to "pull".
560
- @ The <span class="capability">Clone</span> privilege allows remote users to "clone".
572
+ @ The <span class="capability">Check-in</span> privilege allows remote
573
+ @ users to "push". The <span class="capability">Check-out</span> privilege
574
+ @ allows remote users to "pull". The <span class="capability">Clone</span>
575
+ @ privilege allows remote users to "clone".
561576
@ </p></li>
562577
@
563578
@ <li><p>
564
- @ The <span class="capability">Read Wiki</span>, <span class="capability">New Wiki</span>, <span class="capability">Append Wiki</span>, and
579
+ @ The <span class="capability">Read Wiki</span>,
580
+ @ <span class="capability">New Wiki</span>,
581
+ @ <span class="capability">Append Wiki</span>, and
565582
@ <b>Write Wiki</b> privileges control access to wiki pages. The
566
- @ <span class="capability">Read Ticket</span>, <span class="capability">New Ticket</span>, <span class="capability">Append Ticket</span>, and
567
- @ <span class="capability">Write Ticket</span> privileges control access to trouble tickets.
568
- @ The <span class="capability">Ticket Report</span> privilege allows the user to create or edit
569
- @ ticket report formats.
583
+ @ <span class="capability">Read Ticket</span>,
584
+ @ <span class="capability">New Ticket</span>,
585
+ @ <span class="capability">Append Ticket</span>, and
586
+ @ <span class="capability">Write Ticket</span> privileges control access
587
+ @ to trouble tickets.
588
+ @ The <span class="capability">Ticket Report</span> privilege allows
589
+ @ the user to create or edit ticket report formats.
570590
@ </p></li>
571591
@
572592
@ <li><p>
573
- @ Users with the <span class="capability">Password</span> privilege are allowed
574
- @ to change their own password. Recommended ON for most users but OFF for special
575
- @ users <span class="usertype">developer</span>, <span class="usertype">anonymous</span>,
593
+ @ Users with the <span class="capability">Password</span> privilege
594
+ @ are allowed to change their own password. Recommended ON for most
595
+ @ users but OFF for special users <span class="usertype">developer</span>,
596
+ @ <span class="usertype">anonymous</span>,
576597
@ and <span class="usertype">nobody</span>.
577598
@ </p></li>
578599
@
579600
@ <li><p>
580601
@ The <span class="capability">EMail</span> privilege allows the display of
581
- @ sensitive information such as the email address of users and contact information
582
- @ on tickets. Recommended OFF for <span class="usertype">anonymousy</span> and for
583
- @ <span class="usertype">nobody</span> but ON for <span class="usertype">developer</span>.
602
+ @ sensitive information such as the email address of users and contact
603
+ @ information on tickets. Recommended OFF for
604
+ @ <span class="usertype">anonymousy</span> and for
605
+ @ <span class="usertype">nobody</span> but ON for
606
+ @ <span class="usertype">developer</span>.
584607
@ </p></li>
585608
@
586609
@ <li><p>
587
- @ The <span class="capability">Attachment</span> privilege is needed in order to
588
- @ add attachments to tickets or wiki. Write privilege on the ticket or wiki is
589
- @ also required.
610
+ @ The <span class="capability">Attachment</span> privilege is needed in
611
+ @ order to add attachments to tickets or wiki. Write privilege on the
612
+ @ ticket or wiki is also required.
590613
@ </p></li>
591614
@
592615
@ <li><p>
593616
@ Login is prohibited if the password is an empty string.
594617
@ </p></li>
@@ -597,38 +620,42 @@
597620
@ <h2>Special Logins</h2>
598621
@
599622
@ <ul>
600623
@ <li><p>
601624
@ No login is required for user <span class="usertype">nobody</span>. The
602
- @ capabilities of the <span class="usertype">nobody</span> user are inherited by
603
- @ all users, regardless of whether or not they are logged in. To disable universal
604
- @ access to the repository, make sure no user named <span class="usertype">nobody</span>
605
- @ exists or that the <span class="usertype">nobody</span> user has no capabilities
606
- @ enabled. The password for <span class="usertype">nobody</span> is ignore. To
607
- @ avoid problems with spiders overloading the server, it is recommended
608
- @ that the <span class="capability">h</span> (History) capability be turned off
609
- @ for the <span class="usertype">nobody</span> user.
625
+ @ capabilities of the <span class="usertype">nobody</span> user are
626
+ @ inherited by all users, regardless of whether or not they are logged in.
627
+ @ To disable universal access to the repository, make sure no user named
628
+ @ <span class="usertype">nobody</span> exists or that the
629
+ @ <span class="usertype">nobody</span> user has no capabilities
630
+ @ enabled. The password for <span class="usertype">nobody</span> is ignore.
631
+ @ To avoid problems with spiders overloading the server, it is recommended
632
+ @ that the <span class="capability">h</span> (History) capability be turned
633
+ @ off for the <span class="usertype">nobody</span> user.
610634
@ </p></li>
611635
@
612636
@ <li><p>
613637
@ Login is required for user <span class="usertype">anonymous</span> but the
614638
@ password is displayed on the login screen beside the password entry box
615639
@ so anybody who can read should be able to login as anonymous.
616640
@ On the other hand, spiders and web-crawlers will typically not
617
- @ be able to login. Set the capabilities of the <span class="usertype">anonymous</span>
641
+ @ be able to login. Set the capabilities of the
642
+ @ <span class="usertype">anonymous</span>
618643
@ user to things that you want any human to be able to do, but not any
619644
@ spider. Every other logged-in user inherits the privileges of
620645
@ <span class="usertype">anonymous</span>.
621646
@ </p></li>
622647
@
623648
@ <li><p>
624649
@ The <span class="usertype">developer</span> user is intended as a template
625650
@ for trusted users with check-in privileges. When adding new trusted users,
626
- @ simply select the <span class="capability">developer</span> privilege to cause
627
- @ the new user to inherit all privileges of the <span class="usertype">developer</span>
628
- @ user. Similarly, the <span class="usertype">reader</span> user is a template
629
- @ for users who are allowed more access than <span class="usertype">anonymous</span>,
651
+ @ simply select the <span class="capability">developer</span> privilege to
652
+ @ cause the new user to inherit all privileges of the
653
+ @ <span class="usertype">developer</span>
654
+ @ user. Similarly, the <span class="usertype">reader</span> user is a
655
+ @ template for users who are allowed more access than
656
+ @ <span class="usertype">anonymous</span>,
630657
@ but less than a <span class="usertype">developer</span>.
631658
@ </p></li>
632659
@ </ul>
633660
style_footer();
634661
}
@@ -655,11 +682,12 @@
655682
db_set(zVar, iQ ? "1" : "0", 0);
656683
iVal = iQ;
657684
}
658685
}
659686
if( iVal ){
660
- @ <input type="checkbox" name="%s(zQParm)" checked="checked" /><b>%s(zLabel)</b>
687
+ @ <input type="checkbox" name="%s(zQParm)" checked="checked" />
688
+ @ <b>%s(zLabel)</b>
661689
}else{
662690
@ <input type="checkbox" name="%s(zQParm)" /><b>%s(zLabel)</b>
663691
}
664692
}
665693
@@ -858,13 +886,14 @@
858886
@ as the Project Name specified above. Some sites prefer to redirect
859887
@ to a documentation page (ex: "/doc/tip/index.wiki") or to "/timeline".</p>
860888
@ <hr />
861889
onoff_attribute("Use HTML as wiki markup language",
862890
"wiki-use-html", "wiki-use-html", 0);
863
- @ <p>Use HTML as the wiki markup language. Wiki links will still be parsed but
864
- @ all other wiki formatting will be ignored. This option is helpful if you have
865
- @ chosen to use a rich HTML editor for wiki markup such as TinyMCE.</p>
891
+ @ <p>Use HTML as the wiki markup language. Wiki links will still be parsed
892
+ @ but all other wiki formatting will be ignored. This option is helpful
893
+ @ if you have chosen to use a rich HTML editor for wiki markup such as
894
+ @ TinyMCE.</p>
866895
@ <p><strong>CAUTION:</strong> when
867896
@ enabling, <i>all</i> HTML tags and attributes are accepted in the wiki.
868897
@ No sanitization is done. This means that it is very possible for malicious
869898
@ users to inject dangerous HTML, CSS and JavaScript code into your wiki.</p>
870899
@ <p>This should <strong>only</strong> be enabled when wiki editing is limited
@@ -905,12 +934,12 @@
905934
textarea_attribute("", 40, 80, "css", "css", zDefaultCSS);
906935
@ <br />
907936
@ <input type="submit" name="submit" value="Apply Changes" />
908937
@ <input type="submit" name="clear" value="Revert To Default" />
909938
@ </div></form>
910
- @ <p><span class="note">Note:</span> Press your browser Reload button after modifying the
911
- @ CSS in order to pull in the modified CSS file.</p>
939
+ @ <p><span class="note">Note:</span> Press your browser Reload button after
940
+ @ modifying the CSS in order to pull in the modified CSS file.</p>
912941
@ <hr />
913942
@ The default CSS is shown below for reference. Other examples
914943
@ of CSS files can be seen on the <a href="setup_skin">skins page</a>.
915944
@ See also the <a href="setup_header">header</a> and
916945
@ <a href="setup_footer">footer</a> editing screens.
@@ -1055,12 +1084,12 @@
10551084
@ <input type="file" name="im" size="60" accept="image/*" /><br />
10561085
@ <input type="submit" name="set" value="Change Logo" />
10571086
@ <input type="submit" name="clr" value="Revert To Default" />
10581087
@ </div></form>
10591088
@
1060
- @ <p><span class="note">Note:</span> Your browser has probably cached the logo image, so
1061
- @ you will probably need to press the Reload button on your browser after
1062
- @ changing the logo to provoke your browser to reload the new logo image.
1063
- @ </p>
1089
+ @ <p><span class="note">Note:</span> Your browser has probably cached the
1090
+ @ logo image, so you will probably need to press the Reload button on your
1091
+ @ browser after changing the logo to provoke your browser to reload the new
1092
+ @ logo image. </p>
10641093
style_footer();
10651094
db_end_transaction(0);
10661095
}
10671096
--- src/setup.c
+++ src/setup.c
@@ -179,23 +179,25 @@
179 @ user <tt>developer</tt></td></tr>
180 @ <tr><td valign="top"><b>w</b></td>
181 @ <td><i>Write-Tkt:</i> Edit tickets</td></tr>
182 @ <tr><td valign="top"><b>z</b></td>
183 @ <td><i>Zip download:</i> Download a baseline via the
184 @ <tt>/zip</tt> URL even without check<span class="capability">o</span>ut
 
185 @ and <span class="capability">h</span>istory permissions</td></tr>
186 @ </table>
187 @ </li>
188 @
189 @ <li><p>
190 @ Every user, logged in or not, inherits the privileges of <span class="usertype">nobody</span>.
 
191 @ </p></li>
192 @
193 @ <li><p>
194 @ Any human can login as <span class="usertype">anonymous</span> since the
195 @ password is clearly displayed on the login page for them to type. The purpose
196 @ of requiring anonymous to log in is to prevent access by spiders.
197 @ Every logged-in user inherits the combined privileges of
198 @ <span class="usertype">anonymous</span> and
199 @ <span class="usertype">nobody</span>.
200 @ </p></li>
201 @
@@ -323,12 +325,12 @@
323 }
324 if( uid>0 &&
325 db_exists("SELECT 1 FROM user WHERE login=%Q AND uid!=%d", zLogin, uid)
326 ){
327 style_header("User Creation Error");
328 @ <span class="loginError">Login "%h(zLogin)" is already used by a different
329 @ user.</span>
330 @
331 @ <p><a href="setup_uedit?id=%d(uid)">[Bummer]</a></p>
332 style_footer();
333 return;
334 }
@@ -383,35 +385,39 @@
383 memset(inherit, 0, sizeof(inherit));
384 if( strcmp(zLogin, "developer") ){
385 char *z1, *z2;
386 z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='developer'");
387 while( z1 && *z1 ){
388 inherit[0x7f & *(z1++)] = "<span class=\"ueditInheritDeveloper\">&bull;</span>";
 
389 }
390 free(z2);
391 }
392 if( strcmp(zLogin, "reader") ){
393 char *z1, *z2;
394 z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='reader'");
395 while( z1 && *z1 ){
396 inherit[0x7f & *(z1++)] = "<span class=\"ueditInheritReader\">&bull;</span>";
 
397 }
398 free(z2);
399 }
400 if( strcmp(zLogin, "anonymous") ){
401 char *z1, *z2;
402 z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='anonymous'");
403 while( z1 && *z1 ){
404 inherit[0x7f & *(z1++)] = "<span class=\"ueditInheritAnonymous\">&bull;</span>";
 
405 }
406 free(z2);
407 }
408 if( strcmp(zLogin, "nobody") ){
409 char *z1, *z2;
410 z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='nobody'");
411 while( z1 && *z1 ){
412 inherit[0x7f & *(z1++)] = "<span class=\"ueditInheritNobody\">&bull;</span>";
 
413 }
414 free(z2);
415 }
416
417 /* Begin generating the page
@@ -499,96 +505,113 @@
499 @ so you are not permitted to make changes to %h(zLogin).
500 @ </b></font></p></li>
501 @
502 }
503 @ <li><p>
504 @ The <span class="capability">Setup</span> user can make arbitrary configuration changes.
505 @ An <span class="usertype">Admin</span> user can add other users and change user privileges
 
506 @ and reset user passwords. Both automatically get all other privileges
507 @ listed below. Use these two settings with discretion.
508 @ </p></li>
509 @
510 @ <li><p>
511 @ The "<span class="ueditInheritNobody"><big>&bull;</big></span>" mark indicates
512 @ the privileges of <span class="usertype">nobody</span> that are available to all users
513 @ regardless of whether or not they are logged in.
514 @ </p></li>
515 @
516 @ <li><p>
517 @ The "<span class="ueditInheritAnonymous"><big>&bull;</big></span>" mark indicates
518 @ the privileges of <span class="usertype">anonymous</span> that are inherited by all logged-in users.
519 @ </p></li>
520 @
521 @ <li><p>
522 @ The "<span class="ueditInheritDeveloper"><big>&bull;</big></span>" mark indicates
523 @ the privileges of <span class="usertype">developer</span> that are inherited by all users with
524 @ the <span class="capability">Developer</span> privilege.
525 @ </p></li>
526 @
527 @ <li><p>
528 @ The "<span class="ueditInheritReader"><big>&bull;</big></span>" mark indicates
529 @ the privileges of <span class="usertype">reader</span> that are inherited by all users with
530 @ the <span class="capability">Reader</span> privilege.
531 @ </p></li>
532 @
533 @ <li><p>
534 @ The <span class="capability">Delete</span> privilege give the user the ability to erase
535 @ wiki, tickets, and attachments that have been added by anonymous
536 @ users. This capability is intended for deletion of spam. The
537 @ delete capability is only in effect for 24 hours after the item
538 @ is first posted. The <span class="usertype">Setup</span> user can delete anything at any time.
539 @ </p></li>
540 @
541 @ <li><p>
542 @ The <span class="capability">History</span> privilege allows a user to see most hyperlinks.
543 @ This is recommended ON for most logged-in users but OFF for
544 @ user "nobody" to avoid problems with spiders trying to walk every
545 @ historical version of every baseline and file.
546 @ </p></li>
547 @
548 @ <li><p>
549 @ The <span class="capability">Zip</span> privilege allows a user to see the "download as ZIP"
 
 
 
 
 
550 @ hyperlink and permits access to the <tt>/zip</tt> page. This allows
551 @ users to download ZIP archives without granting other rights like
552 @ <span class="capability">Read</span> or <span class="capability">History</span>. This privilege is recommended for
553 @ user <span class="usertype">nobody</span> so that automatic package downloaders can obtain
554 @ the sources without going through the login procedure.
 
 
555 @ </p></li>
556 @
557 @ <li><p>
558 @ The <span class="capability">Check-in</span> privilege allows remote users to "push".
559 @ The <span class="capability">Check-out</span> privilege allows remote users to "pull".
560 @ The <span class="capability">Clone</span> privilege allows remote users to "clone".
 
561 @ </p></li>
562 @
563 @ <li><p>
564 @ The <span class="capability">Read Wiki</span>, <span class="capability">New Wiki</span>, <span class="capability">Append Wiki</span>, and
 
 
565 @ <b>Write Wiki</b> privileges control access to wiki pages. The
566 @ <span class="capability">Read Ticket</span>, <span class="capability">New Ticket</span>, <span class="capability">Append Ticket</span>, and
567 @ <span class="capability">Write Ticket</span> privileges control access to trouble tickets.
568 @ The <span class="capability">Ticket Report</span> privilege allows the user to create or edit
569 @ ticket report formats.
 
 
 
570 @ </p></li>
571 @
572 @ <li><p>
573 @ Users with the <span class="capability">Password</span> privilege are allowed
574 @ to change their own password. Recommended ON for most users but OFF for special
575 @ users <span class="usertype">developer</span>, <span class="usertype">anonymous</span>,
 
576 @ and <span class="usertype">nobody</span>.
577 @ </p></li>
578 @
579 @ <li><p>
580 @ The <span class="capability">EMail</span> privilege allows the display of
581 @ sensitive information such as the email address of users and contact information
582 @ on tickets. Recommended OFF for <span class="usertype">anonymousy</span> and for
583 @ <span class="usertype">nobody</span> but ON for <span class="usertype">developer</span>.
 
 
584 @ </p></li>
585 @
586 @ <li><p>
587 @ The <span class="capability">Attachment</span> privilege is needed in order to
588 @ add attachments to tickets or wiki. Write privilege on the ticket or wiki is
589 @ also required.
590 @ </p></li>
591 @
592 @ <li><p>
593 @ Login is prohibited if the password is an empty string.
594 @ </p></li>
@@ -597,38 +620,42 @@
597 @ <h2>Special Logins</h2>
598 @
599 @ <ul>
600 @ <li><p>
601 @ No login is required for user <span class="usertype">nobody</span>. The
602 @ capabilities of the <span class="usertype">nobody</span> user are inherited by
603 @ all users, regardless of whether or not they are logged in. To disable universal
604 @ access to the repository, make sure no user named <span class="usertype">nobody</span>
605 @ exists or that the <span class="usertype">nobody</span> user has no capabilities
606 @ enabled. The password for <span class="usertype">nobody</span> is ignore. To
607 @ avoid problems with spiders overloading the server, it is recommended
608 @ that the <span class="capability">h</span> (History) capability be turned off
609 @ for the <span class="usertype">nobody</span> user.
 
610 @ </p></li>
611 @
612 @ <li><p>
613 @ Login is required for user <span class="usertype">anonymous</span> but the
614 @ password is displayed on the login screen beside the password entry box
615 @ so anybody who can read should be able to login as anonymous.
616 @ On the other hand, spiders and web-crawlers will typically not
617 @ be able to login. Set the capabilities of the <span class="usertype">anonymous</span>
 
618 @ user to things that you want any human to be able to do, but not any
619 @ spider. Every other logged-in user inherits the privileges of
620 @ <span class="usertype">anonymous</span>.
621 @ </p></li>
622 @
623 @ <li><p>
624 @ The <span class="usertype">developer</span> user is intended as a template
625 @ for trusted users with check-in privileges. When adding new trusted users,
626 @ simply select the <span class="capability">developer</span> privilege to cause
627 @ the new user to inherit all privileges of the <span class="usertype">developer</span>
628 @ user. Similarly, the <span class="usertype">reader</span> user is a template
629 @ for users who are allowed more access than <span class="usertype">anonymous</span>,
 
 
630 @ but less than a <span class="usertype">developer</span>.
631 @ </p></li>
632 @ </ul>
633 style_footer();
634 }
@@ -655,11 +682,12 @@
655 db_set(zVar, iQ ? "1" : "0", 0);
656 iVal = iQ;
657 }
658 }
659 if( iVal ){
660 @ <input type="checkbox" name="%s(zQParm)" checked="checked" /><b>%s(zLabel)</b>
 
661 }else{
662 @ <input type="checkbox" name="%s(zQParm)" /><b>%s(zLabel)</b>
663 }
664 }
665
@@ -858,13 +886,14 @@
858 @ as the Project Name specified above. Some sites prefer to redirect
859 @ to a documentation page (ex: "/doc/tip/index.wiki") or to "/timeline".</p>
860 @ <hr />
861 onoff_attribute("Use HTML as wiki markup language",
862 "wiki-use-html", "wiki-use-html", 0);
863 @ <p>Use HTML as the wiki markup language. Wiki links will still be parsed but
864 @ all other wiki formatting will be ignored. This option is helpful if you have
865 @ chosen to use a rich HTML editor for wiki markup such as TinyMCE.</p>
 
866 @ <p><strong>CAUTION:</strong> when
867 @ enabling, <i>all</i> HTML tags and attributes are accepted in the wiki.
868 @ No sanitization is done. This means that it is very possible for malicious
869 @ users to inject dangerous HTML, CSS and JavaScript code into your wiki.</p>
870 @ <p>This should <strong>only</strong> be enabled when wiki editing is limited
@@ -905,12 +934,12 @@
905 textarea_attribute("", 40, 80, "css", "css", zDefaultCSS);
906 @ <br />
907 @ <input type="submit" name="submit" value="Apply Changes" />
908 @ <input type="submit" name="clear" value="Revert To Default" />
909 @ </div></form>
910 @ <p><span class="note">Note:</span> Press your browser Reload button after modifying the
911 @ CSS in order to pull in the modified CSS file.</p>
912 @ <hr />
913 @ The default CSS is shown below for reference. Other examples
914 @ of CSS files can be seen on the <a href="setup_skin">skins page</a>.
915 @ See also the <a href="setup_header">header</a> and
916 @ <a href="setup_footer">footer</a> editing screens.
@@ -1055,12 +1084,12 @@
1055 @ <input type="file" name="im" size="60" accept="image/*" /><br />
1056 @ <input type="submit" name="set" value="Change Logo" />
1057 @ <input type="submit" name="clr" value="Revert To Default" />
1058 @ </div></form>
1059 @
1060 @ <p><span class="note">Note:</span> Your browser has probably cached the logo image, so
1061 @ you will probably need to press the Reload button on your browser after
1062 @ changing the logo to provoke your browser to reload the new logo image.
1063 @ </p>
1064 style_footer();
1065 db_end_transaction(0);
1066 }
1067
--- src/setup.c
+++ src/setup.c
@@ -179,23 +179,25 @@
179 @ user <tt>developer</tt></td></tr>
180 @ <tr><td valign="top"><b>w</b></td>
181 @ <td><i>Write-Tkt:</i> Edit tickets</td></tr>
182 @ <tr><td valign="top"><b>z</b></td>
183 @ <td><i>Zip download:</i> Download a baseline via the
184 @ <tt>/zip</tt> URL even without
185 @ check<span class="capability">o</span>ut
186 @ and <span class="capability">h</span>istory permissions</td></tr>
187 @ </table>
188 @ </li>
189 @
190 @ <li><p>
191 @ Every user, logged in or not, inherits the privileges of
192 @ <span class="usertype">nobody</span>.
193 @ </p></li>
194 @
195 @ <li><p>
196 @ Any human can login as <span class="usertype">anonymous</span> since the
197 @ password is clearly displayed on the login page for them to type. The
198 @ purpose of requiring anonymous to log in is to prevent access by spiders.
199 @ Every logged-in user inherits the combined privileges of
200 @ <span class="usertype">anonymous</span> and
201 @ <span class="usertype">nobody</span>.
202 @ </p></li>
203 @
@@ -323,12 +325,12 @@
325 }
326 if( uid>0 &&
327 db_exists("SELECT 1 FROM user WHERE login=%Q AND uid!=%d", zLogin, uid)
328 ){
329 style_header("User Creation Error");
330 @ <span class="loginError">Login "%h(zLogin)" is already used by
331 @ a different user.</span>
332 @
333 @ <p><a href="setup_uedit?id=%d(uid)">[Bummer]</a></p>
334 style_footer();
335 return;
336 }
@@ -383,35 +385,39 @@
385 memset(inherit, 0, sizeof(inherit));
386 if( strcmp(zLogin, "developer") ){
387 char *z1, *z2;
388 z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='developer'");
389 while( z1 && *z1 ){
390 inherit[0x7f & *(z1++)] =
391 "<span class=\"ueditInheritDeveloper\">&bull;</span>";
392 }
393 free(z2);
394 }
395 if( strcmp(zLogin, "reader") ){
396 char *z1, *z2;
397 z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='reader'");
398 while( z1 && *z1 ){
399 inherit[0x7f & *(z1++)] =
400 "<span class=\"ueditInheritReader\">&bull;</span>";
401 }
402 free(z2);
403 }
404 if( strcmp(zLogin, "anonymous") ){
405 char *z1, *z2;
406 z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='anonymous'");
407 while( z1 && *z1 ){
408 inherit[0x7f & *(z1++)] =
409 "<span class=\"ueditInheritAnonymous\">&bull;</span>";
410 }
411 free(z2);
412 }
413 if( strcmp(zLogin, "nobody") ){
414 char *z1, *z2;
415 z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='nobody'");
416 while( z1 && *z1 ){
417 inherit[0x7f & *(z1++)] =
418 "<span class=\"ueditInheritNobody\">&bull;</span>";
419 }
420 free(z2);
421 }
422
423 /* Begin generating the page
@@ -499,96 +505,113 @@
505 @ so you are not permitted to make changes to %h(zLogin).
506 @ </b></font></p></li>
507 @
508 }
509 @ <li><p>
510 @ The <span class="capability">Setup</span> user can make arbitrary
511 @ configuration changes. An <span class="usertype">Admin</span> user
512 @ can add other users and change user privileges
513 @ and reset user passwords. Both automatically get all other privileges
514 @ listed below. Use these two settings with discretion.
515 @ </p></li>
516 @
517 @ <li><p>
518 @ The "<span class="ueditInheritNobody"><big>&bull;</big></span>" mark
519 @ indicates the privileges of <span class="usertype">nobody</span> that
520 @ are available to all users regardless of whether or not they are logged in.
521 @ </p></li>
522 @
523 @ <li><p>
524 @ The "<span class="ueditInheritAnonymous"><big>&bull;</big></span>" mark
525 @ indicates the privileges of <span class="usertype">anonymous</span> that
526 @ are inherited by all logged-in users.
527 @ </p></li>
528 @
529 @ <li><p>
530 @ The "<span class="ueditInheritDeveloper"><big>&bull;</big></span>" mark
531 @ indicates the privileges of <span class="usertype">developer</span> that
532 @ are inherited by all users with the
533 @ <span class="capability">Developer</span> privilege.
534 @ </p></li>
535 @
536 @ <li><p>
537 @ The "<span class="ueditInheritReader"><big>&bull;</big></span>" mark
538 @ indicates the privileges of <span class="usertype">reader</span> that
539 @ are inherited by all users with the <span class="capability">Reader</span>
540 @ privilege.
541 @ </p></li>
542 @
543 @ <li><p>
544 @ The <span class="capability">Delete</span> privilege give the user the
545 @ ability to erase wiki, tickets, and attachments that have been added
546 @ by anonymous users. This capability is intended for deletion of spam.
547 @ The delete capability is only in effect for 24 hours after the item
548 @ is first posted. The <span class="usertype">Setup</span> user can
549 @ delete anything at any time.
550 @ </p></li>
551 @
552 @ <li><p>
553 @ The <span class="capability">History</span> privilege allows a user
554 @ to see most hyperlinks. This is recommended ON for most logged-in users
555 @ but OFF for user "nobody" to avoid problems with spiders trying to walk
556 @ every historical version of every baseline and file.
557 @ </p></li>
558 @
559 @ <li><p>
560 @ The <span class="capability">Zip</span> privilege allows a user to
561 @ see the "download as ZIP"
562 @ hyperlink and permits access to the <tt>/zip</tt> page. This allows
563 @ users to download ZIP archives without granting other rights like
564 @ <span class="capability">Read</span> or
565 @ <span class="capability">History</span>. This privilege is recommended for
566 @ user <span class="usertype">nobody</span> so that automatic package
567 @ downloaders can obtain the sources without going through the login
568 @ procedure.
569 @ </p></li>
570 @
571 @ <li><p>
572 @ The <span class="capability">Check-in</span> privilege allows remote
573 @ users to "push". The <span class="capability">Check-out</span> privilege
574 @ allows remote users to "pull". The <span class="capability">Clone</span>
575 @ privilege allows remote users to "clone".
576 @ </p></li>
577 @
578 @ <li><p>
579 @ The <span class="capability">Read Wiki</span>,
580 @ <span class="capability">New Wiki</span>,
581 @ <span class="capability">Append Wiki</span>, and
582 @ <b>Write Wiki</b> privileges control access to wiki pages. The
583 @ <span class="capability">Read Ticket</span>,
584 @ <span class="capability">New Ticket</span>,
585 @ <span class="capability">Append Ticket</span>, and
586 @ <span class="capability">Write Ticket</span> privileges control access
587 @ to trouble tickets.
588 @ The <span class="capability">Ticket Report</span> privilege allows
589 @ the user to create or edit ticket report formats.
590 @ </p></li>
591 @
592 @ <li><p>
593 @ Users with the <span class="capability">Password</span> privilege
594 @ are allowed to change their own password. Recommended ON for most
595 @ users but OFF for special users <span class="usertype">developer</span>,
596 @ <span class="usertype">anonymous</span>,
597 @ and <span class="usertype">nobody</span>.
598 @ </p></li>
599 @
600 @ <li><p>
601 @ The <span class="capability">EMail</span> privilege allows the display of
602 @ sensitive information such as the email address of users and contact
603 @ information on tickets. Recommended OFF for
604 @ <span class="usertype">anonymousy</span> and for
605 @ <span class="usertype">nobody</span> but ON for
606 @ <span class="usertype">developer</span>.
607 @ </p></li>
608 @
609 @ <li><p>
610 @ The <span class="capability">Attachment</span> privilege is needed in
611 @ order to add attachments to tickets or wiki. Write privilege on the
612 @ ticket or wiki is also required.
613 @ </p></li>
614 @
615 @ <li><p>
616 @ Login is prohibited if the password is an empty string.
617 @ </p></li>
@@ -597,38 +620,42 @@
620 @ <h2>Special Logins</h2>
621 @
622 @ <ul>
623 @ <li><p>
624 @ No login is required for user <span class="usertype">nobody</span>. The
625 @ capabilities of the <span class="usertype">nobody</span> user are
626 @ inherited by all users, regardless of whether or not they are logged in.
627 @ To disable universal access to the repository, make sure no user named
628 @ <span class="usertype">nobody</span> exists or that the
629 @ <span class="usertype">nobody</span> user has no capabilities
630 @ enabled. The password for <span class="usertype">nobody</span> is ignore.
631 @ To avoid problems with spiders overloading the server, it is recommended
632 @ that the <span class="capability">h</span> (History) capability be turned
633 @ off for the <span class="usertype">nobody</span> user.
634 @ </p></li>
635 @
636 @ <li><p>
637 @ Login is required for user <span class="usertype">anonymous</span> but the
638 @ password is displayed on the login screen beside the password entry box
639 @ so anybody who can read should be able to login as anonymous.
640 @ On the other hand, spiders and web-crawlers will typically not
641 @ be able to login. Set the capabilities of the
642 @ <span class="usertype">anonymous</span>
643 @ user to things that you want any human to be able to do, but not any
644 @ spider. Every other logged-in user inherits the privileges of
645 @ <span class="usertype">anonymous</span>.
646 @ </p></li>
647 @
648 @ <li><p>
649 @ The <span class="usertype">developer</span> user is intended as a template
650 @ for trusted users with check-in privileges. When adding new trusted users,
651 @ simply select the <span class="capability">developer</span> privilege to
652 @ cause the new user to inherit all privileges of the
653 @ <span class="usertype">developer</span>
654 @ user. Similarly, the <span class="usertype">reader</span> user is a
655 @ template for users who are allowed more access than
656 @ <span class="usertype">anonymous</span>,
657 @ but less than a <span class="usertype">developer</span>.
658 @ </p></li>
659 @ </ul>
660 style_footer();
661 }
@@ -655,11 +682,12 @@
682 db_set(zVar, iQ ? "1" : "0", 0);
683 iVal = iQ;
684 }
685 }
686 if( iVal ){
687 @ <input type="checkbox" name="%s(zQParm)" checked="checked" />
688 @ <b>%s(zLabel)</b>
689 }else{
690 @ <input type="checkbox" name="%s(zQParm)" /><b>%s(zLabel)</b>
691 }
692 }
693
@@ -858,13 +886,14 @@
886 @ as the Project Name specified above. Some sites prefer to redirect
887 @ to a documentation page (ex: "/doc/tip/index.wiki") or to "/timeline".</p>
888 @ <hr />
889 onoff_attribute("Use HTML as wiki markup language",
890 "wiki-use-html", "wiki-use-html", 0);
891 @ <p>Use HTML as the wiki markup language. Wiki links will still be parsed
892 @ but all other wiki formatting will be ignored. This option is helpful
893 @ if you have chosen to use a rich HTML editor for wiki markup such as
894 @ TinyMCE.</p>
895 @ <p><strong>CAUTION:</strong> when
896 @ enabling, <i>all</i> HTML tags and attributes are accepted in the wiki.
897 @ No sanitization is done. This means that it is very possible for malicious
898 @ users to inject dangerous HTML, CSS and JavaScript code into your wiki.</p>
899 @ <p>This should <strong>only</strong> be enabled when wiki editing is limited
@@ -905,12 +934,12 @@
934 textarea_attribute("", 40, 80, "css", "css", zDefaultCSS);
935 @ <br />
936 @ <input type="submit" name="submit" value="Apply Changes" />
937 @ <input type="submit" name="clear" value="Revert To Default" />
938 @ </div></form>
939 @ <p><span class="note">Note:</span> Press your browser Reload button after
940 @ modifying the CSS in order to pull in the modified CSS file.</p>
941 @ <hr />
942 @ The default CSS is shown below for reference. Other examples
943 @ of CSS files can be seen on the <a href="setup_skin">skins page</a>.
944 @ See also the <a href="setup_header">header</a> and
945 @ <a href="setup_footer">footer</a> editing screens.
@@ -1055,12 +1084,12 @@
1084 @ <input type="file" name="im" size="60" accept="image/*" /><br />
1085 @ <input type="submit" name="set" value="Change Logo" />
1086 @ <input type="submit" name="clr" value="Revert To Default" />
1087 @ </div></form>
1088 @
1089 @ <p><span class="note">Note:</span> Your browser has probably cached the
1090 @ logo image, so you will probably need to press the Reload button on your
1091 @ browser after changing the logo to provoke your browser to reload the new
1092 @ logo image. </p>
1093 style_footer();
1094 db_end_transaction(0);
1095 }
1096
+17 -7
--- src/style.c
+++ src/style.c
@@ -387,14 +387,20 @@
387387
@ text-align: right;
388388
@ padding: 0.2ex 2ex;
389389
@ }
390390
@
391391
;
392
+
393
+
394
+/* The following table contains bits of default CSS that must
395
+** be included if they are not found in the application-defined
396
+** CSS.
397
+*/
392398
const struct strctCssDefaults {
393
- char const * const elementClass;
394
- char const * const comment;
395
- char const * const value;
399
+ char const * const elementClass; /* Name of element needed */
400
+ char const * const comment; /* Comment text */
401
+ char const * const value; /* CSS text */
396402
} cssDefaultList[] = {
397403
{ "",
398404
"",
399405
zDefaultCSS
400406
},
@@ -647,32 +653,36 @@
647653
0,
648654
0
649655
}
650656
};
651657
658
+/*
659
+** Append all of the default CSS to the CGI output.
660
+*/
652661
void cgi_append_default_css(void) {
653662
int i;
654663
655
- for (i=0;cssDefaultList[i].elementClass;i++)
656
- if (cssDefaultList[i].elementClass[0])
664
+ for (i=0;cssDefaultList[i].elementClass;i++){
665
+ if (cssDefaultList[i].elementClass[0]){
657666
cgi_printf("/* %s */\n%s {\n%s\n}\n\n",
658667
cssDefaultList[i].comment,
659668
cssDefaultList[i].elementClass,
660669
cssDefaultList[i].value
661670
);
662
- else
671
+ }else{
663672
cgi_printf("%s",
664673
cssDefaultList[i].value
665674
);
675
+ }
676
+ }
666677
}
667678
668679
/*
669680
** WEBPAGE: style.css
670681
*/
671682
void page_style_css(void){
672683
const char *zCSS = 0;
673
- const char *zCSSdef = 0;
674684
int i;
675685
676686
cgi_set_content_type("text/css");
677687
zCSS = db_get("css",(char*)zDefaultCSS);
678688
/* append user defined css */
679689
--- src/style.c
+++ src/style.c
@@ -387,14 +387,20 @@
387 @ text-align: right;
388 @ padding: 0.2ex 2ex;
389 @ }
390 @
391 ;
 
 
 
 
 
 
392 const struct strctCssDefaults {
393 char const * const elementClass;
394 char const * const comment;
395 char const * const value;
396 } cssDefaultList[] = {
397 { "",
398 "",
399 zDefaultCSS
400 },
@@ -647,32 +653,36 @@
647 0,
648 0
649 }
650 };
651
 
 
 
652 void cgi_append_default_css(void) {
653 int i;
654
655 for (i=0;cssDefaultList[i].elementClass;i++)
656 if (cssDefaultList[i].elementClass[0])
657 cgi_printf("/* %s */\n%s {\n%s\n}\n\n",
658 cssDefaultList[i].comment,
659 cssDefaultList[i].elementClass,
660 cssDefaultList[i].value
661 );
662 else
663 cgi_printf("%s",
664 cssDefaultList[i].value
665 );
 
 
666 }
667
668 /*
669 ** WEBPAGE: style.css
670 */
671 void page_style_css(void){
672 const char *zCSS = 0;
673 const char *zCSSdef = 0;
674 int i;
675
676 cgi_set_content_type("text/css");
677 zCSS = db_get("css",(char*)zDefaultCSS);
678 /* append user defined css */
679
--- src/style.c
+++ src/style.c
@@ -387,14 +387,20 @@
387 @ text-align: right;
388 @ padding: 0.2ex 2ex;
389 @ }
390 @
391 ;
392
393
394 /* The following table contains bits of default CSS that must
395 ** be included if they are not found in the application-defined
396 ** CSS.
397 */
398 const struct strctCssDefaults {
399 char const * const elementClass; /* Name of element needed */
400 char const * const comment; /* Comment text */
401 char const * const value; /* CSS text */
402 } cssDefaultList[] = {
403 { "",
404 "",
405 zDefaultCSS
406 },
@@ -647,32 +653,36 @@
653 0,
654 0
655 }
656 };
657
658 /*
659 ** Append all of the default CSS to the CGI output.
660 */
661 void cgi_append_default_css(void) {
662 int i;
663
664 for (i=0;cssDefaultList[i].elementClass;i++){
665 if (cssDefaultList[i].elementClass[0]){
666 cgi_printf("/* %s */\n%s {\n%s\n}\n\n",
667 cssDefaultList[i].comment,
668 cssDefaultList[i].elementClass,
669 cssDefaultList[i].value
670 );
671 }else{
672 cgi_printf("%s",
673 cssDefaultList[i].value
674 );
675 }
676 }
677 }
678
679 /*
680 ** WEBPAGE: style.css
681 */
682 void page_style_css(void){
683 const char *zCSS = 0;
 
684 int i;
685
686 cgi_set_content_type("text/css");
687 zCSS = db_get("css",(char*)zDefaultCSS);
688 /* append user defined css */
689
+4 -2
--- src/tag.c
+++ src/tag.c
@@ -514,11 +514,12 @@
514514
);
515515
@ <ul>
516516
while( db_step(&q)==SQLITE_ROW ){
517517
const char *zName = db_column_text(&q, 0);
518518
if( g.okHistory ){
519
- @ <li><a class="tagLink" href="%s(g.zBaseURL)/timeline?t=%T(zName)">%h(zName)</a></li>
519
+ @ <li><a class="tagLink" href="%s(g.zBaseURL)/timeline?t=%T(zName)">
520
+ @ %h(zName)</a></li>
520521
}else{
521522
@ <li><span class="tagDsp">%h(zName)</span></li>
522523
}
523524
}
524525
@ </ul>
@@ -542,11 +543,12 @@
542543
rid
543544
);
544545
while( db_step(&q)==SQLITE_ROW ){
545546
const char *zTagName = db_column_text(&q, 0);
546547
if( g.okHistory ){
547
- @ <a class="tagLink" href="%s(g.zBaseURL)/timeline?t=%T(zTagName)">[%h(zTagName)]</a>
548
+ @ <a class="tagLink" href="%s(g.zBaseURL)/timeline?t=%T(zTagName)">
549
+ @ [%h(zTagName)]</a>
548550
}else{
549551
@ <span class="tagDsp">[%h(zTagName)]</span>
550552
}
551553
}
552554
db_finalize(&q);
553555
--- src/tag.c
+++ src/tag.c
@@ -514,11 +514,12 @@
514 );
515 @ <ul>
516 while( db_step(&q)==SQLITE_ROW ){
517 const char *zName = db_column_text(&q, 0);
518 if( g.okHistory ){
519 @ <li><a class="tagLink" href="%s(g.zBaseURL)/timeline?t=%T(zName)">%h(zName)</a></li>
 
520 }else{
521 @ <li><span class="tagDsp">%h(zName)</span></li>
522 }
523 }
524 @ </ul>
@@ -542,11 +543,12 @@
542 rid
543 );
544 while( db_step(&q)==SQLITE_ROW ){
545 const char *zTagName = db_column_text(&q, 0);
546 if( g.okHistory ){
547 @ <a class="tagLink" href="%s(g.zBaseURL)/timeline?t=%T(zTagName)">[%h(zTagName)]</a>
 
548 }else{
549 @ <span class="tagDsp">[%h(zTagName)]</span>
550 }
551 }
552 db_finalize(&q);
553
--- src/tag.c
+++ src/tag.c
@@ -514,11 +514,12 @@
514 );
515 @ <ul>
516 while( db_step(&q)==SQLITE_ROW ){
517 const char *zName = db_column_text(&q, 0);
518 if( g.okHistory ){
519 @ <li><a class="tagLink" href="%s(g.zBaseURL)/timeline?t=%T(zName)">
520 @ %h(zName)</a></li>
521 }else{
522 @ <li><span class="tagDsp">%h(zName)</span></li>
523 }
524 }
525 @ </ul>
@@ -542,11 +543,12 @@
543 rid
544 );
545 while( db_step(&q)==SQLITE_ROW ){
546 const char *zTagName = db_column_text(&q, 0);
547 if( g.okHistory ){
548 @ <a class="tagLink" href="%s(g.zBaseURL)/timeline?t=%T(zTagName)">
549 @ [%h(zTagName)]</a>
550 }else{
551 @ <span class="tagDsp">[%h(zTagName)]</span>
552 }
553 }
554 db_finalize(&q);
555
+2 -1
--- src/th_main.c
+++ src/th_main.c
@@ -278,11 +278,12 @@
278278
blob_reset(&name);
279279
for(i=0; i<nElem; i++){
280280
zH = htmlize((char*)azElem[i], aszElem[i]);
281281
if( zValue && aszElem[i]==nValue
282282
&& memcmp(zValue, azElem[i], nValue)==0 ){
283
- z = mprintf("<option value=\"%s\" selected=\"selected\">%s</option>", zH, zH);
283
+ z = mprintf("<option value=\"%s\" selected=\"selected\">%s</option>",
284
+ zH, zH);
284285
}else{
285286
z = mprintf("<option value=\"%s\">%s</option>", zH, zH);
286287
}
287288
free(zH);
288289
sendText(z, -1, 0);
289290
--- src/th_main.c
+++ src/th_main.c
@@ -278,11 +278,12 @@
278 blob_reset(&name);
279 for(i=0; i<nElem; i++){
280 zH = htmlize((char*)azElem[i], aszElem[i]);
281 if( zValue && aszElem[i]==nValue
282 && memcmp(zValue, azElem[i], nValue)==0 ){
283 z = mprintf("<option value=\"%s\" selected=\"selected\">%s</option>", zH, zH);
 
284 }else{
285 z = mprintf("<option value=\"%s\">%s</option>", zH, zH);
286 }
287 free(zH);
288 sendText(z, -1, 0);
289
--- src/th_main.c
+++ src/th_main.c
@@ -278,11 +278,12 @@
278 blob_reset(&name);
279 for(i=0; i<nElem; i++){
280 zH = htmlize((char*)azElem[i], aszElem[i]);
281 if( zValue && aszElem[i]==nValue
282 && memcmp(zValue, azElem[i], nValue)==0 ){
283 z = mprintf("<option value=\"%s\" selected=\"selected\">%s</option>",
284 zH, zH);
285 }else{
286 z = mprintf("<option value=\"%s\">%s</option>", zH, zH);
287 }
288 free(zH);
289 sendText(z, -1, 0);
290
+2 -1
--- src/timeline.c
+++ src/timeline.c
@@ -48,11 +48,12 @@
4848
*/
4949
void hyperlink_to_uuid(const char *zUuid){
5050
char zShortUuid[UUID_SIZE+1];
5151
shorten_uuid(zShortUuid, zUuid);
5252
if( g.okHistory ){
53
- @ <a class="timelineHistLink" href="%s(g.zBaseURL)/info/%s(zShortUuid)">[%s(zShortUuid)]</a>
53
+ @ <a class="timelineHistLink" href="%s(g.zBaseURL)/info/%s(zShortUuid)">
54
+ @ [%s(zShortUuid)]</a>
5455
}else{
5556
@ <span class="timelineHistDsp">[%s(zShortUuid)]</span>
5657
}
5758
}
5859
5960
--- src/timeline.c
+++ src/timeline.c
@@ -48,11 +48,12 @@
48 */
49 void hyperlink_to_uuid(const char *zUuid){
50 char zShortUuid[UUID_SIZE+1];
51 shorten_uuid(zShortUuid, zUuid);
52 if( g.okHistory ){
53 @ <a class="timelineHistLink" href="%s(g.zBaseURL)/info/%s(zShortUuid)">[%s(zShortUuid)]</a>
 
54 }else{
55 @ <span class="timelineHistDsp">[%s(zShortUuid)]</span>
56 }
57 }
58
59
--- src/timeline.c
+++ src/timeline.c
@@ -48,11 +48,12 @@
48 */
49 void hyperlink_to_uuid(const char *zUuid){
50 char zShortUuid[UUID_SIZE+1];
51 shorten_uuid(zShortUuid, zUuid);
52 if( g.okHistory ){
53 @ <a class="timelineHistLink" href="%s(g.zBaseURL)/info/%s(zShortUuid)">
54 @ [%s(zShortUuid)]</a>
55 }else{
56 @ <span class="timelineHistDsp">[%s(zShortUuid)]</span>
57 }
58 }
59
60
+2 -1
--- src/tkt.c
+++ src/tkt.c
@@ -567,11 +567,12 @@
567567
@ <span class="tktError">No such ticket: \"%h(zName)\"</span>
568568
style_footer();
569569
return;
570570
}
571571
if( nRec>1 ){
572
- @ <span class="tktError"><b>%d(nRec) tickets begin with: \"%h(zName)\"</span>
572
+ @ <span class="tktError"><b>%d(nRec) tickets begin with:
573
+ @ \"%h(zName)\"</span>
573574
style_footer();
574575
return;
575576
}
576577
if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT<br />\n", -1);
577578
ticket_init();
578579
--- src/tkt.c
+++ src/tkt.c
@@ -567,11 +567,12 @@
567 @ <span class="tktError">No such ticket: \"%h(zName)\"</span>
568 style_footer();
569 return;
570 }
571 if( nRec>1 ){
572 @ <span class="tktError"><b>%d(nRec) tickets begin with: \"%h(zName)\"</span>
 
573 style_footer();
574 return;
575 }
576 if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT<br />\n", -1);
577 ticket_init();
578
--- src/tkt.c
+++ src/tkt.c
@@ -567,11 +567,12 @@
567 @ <span class="tktError">No such ticket: \"%h(zName)\"</span>
568 style_footer();
569 return;
570 }
571 if( nRec>1 ){
572 @ <span class="tktError"><b>%d(nRec) tickets begin with:
573 @ \"%h(zName)\"</span>
574 style_footer();
575 return;
576 }
577 if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT<br />\n", -1);
578 ticket_init();
579
+6 -6
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -285,12 +285,12 @@
285285
@
286286
@ <tr>
287287
@ <td style="text-align: center;">EMail:
288288
@ <input type="text" name="private_contact" value="$<private_contact>" size="30" />
289289
@ </td>
290
-@ <td><span style="text-decoration: underline;">Not publicly visible</span>. Used by developers to contact you with
291
-@ questions.</td>
290
+@ <td><span style="text-decoration: underline;">Not publicly visible</span>.
291
+@ Used by developers to contact you with questions.</td>
292292
@ </tr>
293293
@
294294
@ <tr>
295295
@ <td colspan="2">
296296
@ Enter a detailed description of the problem.
@@ -338,11 +338,12 @@
338338
/*
339339
** WEBPAGE: tktsetup_newpage
340340
*/
341341
void tktsetup_newpage_page(void){
342342
static const char zDesc[] =
343
- @ Enter HTML with embedded TH1 script that will render the "new ticket" page
343
+ @ Enter HTML with embedded TH1 script that will render the "new ticket"
344
+ @ page
344345
;
345346
tktsetup_generic(
346347
"HTML For New Tickets",
347348
"ticket-newpage",
348349
zDefaultNew,
@@ -353,13 +354,12 @@
353354
);
354355
}
355356
356357
static const char zDefaultView[] =
357358
@ <table cellpadding="5">
358
-@ <tr><td class="tktDspLabel">Ticket&nbsp;UUID:</td><td class="tktDspValue" colspan="3">
359
-@ $<tkt_uuid>
360
-@ </td></tr>
359
+@ <tr><td class="tktDspLabel">Ticket&nbsp;UUID:</td>
360
+@ <td class="tktDspValue" colspan="3">$<tkt_uuid></td></tr>
361361
@ <tr><td class="tktDspLabel">Title:</td>
362362
@ <td class="tktDspValue" colspan="3">
363363
@ <th1>wiki $title</th1>
364364
@ </td></tr>
365365
@ <tr><td class="tktDspLabel">Status:</td><td class="tktDspValue">
366366
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -285,12 +285,12 @@
285 @
286 @ <tr>
287 @ <td style="text-align: center;">EMail:
288 @ <input type="text" name="private_contact" value="$<private_contact>" size="30" />
289 @ </td>
290 @ <td><span style="text-decoration: underline;">Not publicly visible</span>. Used by developers to contact you with
291 @ questions.</td>
292 @ </tr>
293 @
294 @ <tr>
295 @ <td colspan="2">
296 @ Enter a detailed description of the problem.
@@ -338,11 +338,12 @@
338 /*
339 ** WEBPAGE: tktsetup_newpage
340 */
341 void tktsetup_newpage_page(void){
342 static const char zDesc[] =
343 @ Enter HTML with embedded TH1 script that will render the "new ticket" page
 
344 ;
345 tktsetup_generic(
346 "HTML For New Tickets",
347 "ticket-newpage",
348 zDefaultNew,
@@ -353,13 +354,12 @@
353 );
354 }
355
356 static const char zDefaultView[] =
357 @ <table cellpadding="5">
358 @ <tr><td class="tktDspLabel">Ticket&nbsp;UUID:</td><td class="tktDspValue" colspan="3">
359 @ $<tkt_uuid>
360 @ </td></tr>
361 @ <tr><td class="tktDspLabel">Title:</td>
362 @ <td class="tktDspValue" colspan="3">
363 @ <th1>wiki $title</th1>
364 @ </td></tr>
365 @ <tr><td class="tktDspLabel">Status:</td><td class="tktDspValue">
366
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -285,12 +285,12 @@
285 @
286 @ <tr>
287 @ <td style="text-align: center;">EMail:
288 @ <input type="text" name="private_contact" value="$<private_contact>" size="30" />
289 @ </td>
290 @ <td><span style="text-decoration: underline;">Not publicly visible</span>.
291 @ Used by developers to contact you with questions.</td>
292 @ </tr>
293 @
294 @ <tr>
295 @ <td colspan="2">
296 @ Enter a detailed description of the problem.
@@ -338,11 +338,12 @@
338 /*
339 ** WEBPAGE: tktsetup_newpage
340 */
341 void tktsetup_newpage_page(void){
342 static const char zDesc[] =
343 @ Enter HTML with embedded TH1 script that will render the "new ticket"
344 @ page
345 ;
346 tktsetup_generic(
347 "HTML For New Tickets",
348 "ticket-newpage",
349 zDefaultNew,
@@ -353,13 +354,12 @@
354 );
355 }
356
357 static const char zDefaultView[] =
358 @ <table cellpadding="5">
359 @ <tr><td class="tktDspLabel">Ticket&nbsp;UUID:</td>
360 @ <td class="tktDspValue" colspan="3">$<tkt_uuid></td></tr>
 
361 @ <tr><td class="tktDspLabel">Title:</td>
362 @ <td class="tktDspValue" colspan="3">
363 @ <th1>wiki $title</th1>
364 @ </td></tr>
365 @ <tr><td class="tktDspLabel">Status:</td><td class="tktDspValue">
366
+6 -5
--- src/wiki.c
+++ src/wiki.c
@@ -155,14 +155,14 @@
155155
if( g.okNewWiki ){
156156
@ <li> Create a <a href="%s(g.zBaseURL)/wikinew">new wiki page</a>.</li>
157157
}
158158
@ <li> <a href="%s(g.zBaseURL)/wcontent">List of All Wiki Pages</a>
159159
@ available on this server.</li>
160
- @ <li> <form method="get" action="%s(g.zBaseURL)/wfind"><div>
161
- @ Search wiki titles: <input type="text" name="title"/>
162
- @ &nbsp; <input type="submit" /></div></form>
163
- @ </li>
160
+ @ <li> <form method="get" action="%s(g.zBaseURL)/wfind"><div>
161
+ @ Search wiki titles: <input type="text" name="title"/>
162
+ @ &nbsp; <input type="submit" /></div></form>
163
+ @ </li>
164164
@ </ul>
165165
style_footer();
166166
return;
167167
}
168168
if( check_name(zPageName) ) return;
@@ -227,11 +227,12 @@
227227
@ <hr><h2>Attachments:</h2>
228228
@ <ul>
229229
}
230230
cnt++;
231231
if( g.okHistory && g.okRead ){
232
- @ <li><a href="%s(g.zTop)/attachview?page=%s(zPageName)&amp;file=%t(zFile)">
232
+ @ <li>
233
+ @ <a href="%s(g.zTop)/attachview?page=%s(zPageName)&amp;file=%t(zFile)">
233234
@ %h(zFile)</a>
234235
}else{
235236
@ <li>%h(zFile)
236237
}
237238
@ added by %h(zUser) on
238239
--- src/wiki.c
+++ src/wiki.c
@@ -155,14 +155,14 @@
155 if( g.okNewWiki ){
156 @ <li> Create a <a href="%s(g.zBaseURL)/wikinew">new wiki page</a>.</li>
157 }
158 @ <li> <a href="%s(g.zBaseURL)/wcontent">List of All Wiki Pages</a>
159 @ available on this server.</li>
160 @ <li> <form method="get" action="%s(g.zBaseURL)/wfind"><div>
161 @ Search wiki titles: <input type="text" name="title"/>
162 @ &nbsp; <input type="submit" /></div></form>
163 @ </li>
164 @ </ul>
165 style_footer();
166 return;
167 }
168 if( check_name(zPageName) ) return;
@@ -227,11 +227,12 @@
227 @ <hr><h2>Attachments:</h2>
228 @ <ul>
229 }
230 cnt++;
231 if( g.okHistory && g.okRead ){
232 @ <li><a href="%s(g.zTop)/attachview?page=%s(zPageName)&amp;file=%t(zFile)">
 
233 @ %h(zFile)</a>
234 }else{
235 @ <li>%h(zFile)
236 }
237 @ added by %h(zUser) on
238
--- src/wiki.c
+++ src/wiki.c
@@ -155,14 +155,14 @@
155 if( g.okNewWiki ){
156 @ <li> Create a <a href="%s(g.zBaseURL)/wikinew">new wiki page</a>.</li>
157 }
158 @ <li> <a href="%s(g.zBaseURL)/wcontent">List of All Wiki Pages</a>
159 @ available on this server.</li>
160 @ <li> <form method="get" action="%s(g.zBaseURL)/wfind"><div>
161 @ Search wiki titles: <input type="text" name="title"/>
162 @ &nbsp; <input type="submit" /></div></form>
163 @ </li>
164 @ </ul>
165 style_footer();
166 return;
167 }
168 if( check_name(zPageName) ) return;
@@ -227,11 +227,12 @@
227 @ <hr><h2>Attachments:</h2>
228 @ <ul>
229 }
230 cnt++;
231 if( g.okHistory && g.okRead ){
232 @ <li>
233 @ <a href="%s(g.zTop)/attachview?page=%s(zPageName)&amp;file=%t(zFile)">
234 @ %h(zFile)</a>
235 }else{
236 @ <li>%h(zFile)
237 }
238 @ added by %h(zUser) on
239
+16 -13
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -745,12 +745,12 @@
745745
static void renderMarkup(Blob *pOut, ParsedMarkup *p){
746746
int i;
747747
if( p->endTag ){
748748
blob_appendf(pOut, "</%s>", aMarkup[p->iCode].zName);
749749
}else{
750
- /* close active paragraph for several elemnts, which are not allowed
751
- ** in paragraphs(xhtml!)
750
+ /* Close active paragraph for several elements, which are not allowed
751
+ ** in paragraphs in XHTML.
752752
*/
753753
blob_appendf(pOut, "<%s", aMarkup[p->iCode].zName);
754754
for(i=0; i<p->nAttr; i++){
755755
blob_appendf(pOut, " %s", aAttribute[p->aAttr[i].iACode].zName);
756756
if( p->aAttr[i].zValue ){
@@ -760,12 +760,13 @@
760760
}else{
761761
blob_appendf(pOut, "=\"%s\"", zVal);
762762
}
763763
}
764764
}
765
- if (p->iType & MUTYPE_SINGLE)
765
+ if (p->iType & MUTYPE_SINGLE){
766766
blob_append(pOut, " /", 2);
767
+ }
767768
blob_append(pOut, ">", 1);
768769
}
769770
}
770771
771772
/*
@@ -1024,12 +1025,13 @@
10241025
/* Special display processing for tickets. Display the hyperlink
10251026
** as crossed out if the ticket is closed.
10261027
*/
10271028
if( isClosed ){
10281029
if( g.okHistory ){
1029
- blob_appendf(p->pOut,"<a href=\"%s/info/%s\"><span class=\"wikiTagCancelled\">",
1030
- g.zBaseURL, zTarget
1030
+ blob_appendf(p->pOut,
1031
+ "<a href=\"%s/info/%s\"><span class=\"wikiTagCancelled\">",
1032
+ g.zBaseURL, zTarget
10311033
);
10321034
zTerm = "</span></a>";
10331035
}else{
10341036
blob_appendf(p->pOut,"<span class=\"wikiTagCancelled\">");
10351037
zTerm = "</span>";
@@ -1398,19 +1400,20 @@
13981400
if( markup.iType==MUTYPE_FONT ){
13991401
startAutoParagraph(p);
14001402
}else if( markup.iType==MUTYPE_BLOCK ){
14011403
p->wantAutoParagraph = 0;
14021404
}
1403
- if ( markup.iCode==MARKUP_HR
1404
- || markup.iCode==MARKUP_H1
1405
- || markup.iCode==MARKUP_H2
1406
- || markup.iCode==MARKUP_H3
1407
- || markup.iCode==MARKUP_H4
1408
- || markup.iCode==MARKUP_H5
1409
- || markup.iCode==MARKUP_P
1410
- )
1405
+ if( markup.iCode==MARKUP_HR
1406
+ || markup.iCode==MARKUP_H1
1407
+ || markup.iCode==MARKUP_H2
1408
+ || markup.iCode==MARKUP_H3
1409
+ || markup.iCode==MARKUP_H4
1410
+ || markup.iCode==MARKUP_H5
1411
+ || markup.iCode==MARKUP_P
1412
+ ){
14111413
endAutoParagraph(p);
1414
+ }
14121415
if( (markup.iType & MUTYPE_STACK )!=0 ){
14131416
pushStack(p, markup.iCode);
14141417
}
14151418
renderMarkup(p->pOut, &markup);
14161419
}
14171420
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -745,12 +745,12 @@
745 static void renderMarkup(Blob *pOut, ParsedMarkup *p){
746 int i;
747 if( p->endTag ){
748 blob_appendf(pOut, "</%s>", aMarkup[p->iCode].zName);
749 }else{
750 /* close active paragraph for several elemnts, which are not allowed
751 ** in paragraphs(xhtml!)
752 */
753 blob_appendf(pOut, "<%s", aMarkup[p->iCode].zName);
754 for(i=0; i<p->nAttr; i++){
755 blob_appendf(pOut, " %s", aAttribute[p->aAttr[i].iACode].zName);
756 if( p->aAttr[i].zValue ){
@@ -760,12 +760,13 @@
760 }else{
761 blob_appendf(pOut, "=\"%s\"", zVal);
762 }
763 }
764 }
765 if (p->iType & MUTYPE_SINGLE)
766 blob_append(pOut, " /", 2);
 
767 blob_append(pOut, ">", 1);
768 }
769 }
770
771 /*
@@ -1024,12 +1025,13 @@
1024 /* Special display processing for tickets. Display the hyperlink
1025 ** as crossed out if the ticket is closed.
1026 */
1027 if( isClosed ){
1028 if( g.okHistory ){
1029 blob_appendf(p->pOut,"<a href=\"%s/info/%s\"><span class=\"wikiTagCancelled\">",
1030 g.zBaseURL, zTarget
 
1031 );
1032 zTerm = "</span></a>";
1033 }else{
1034 blob_appendf(p->pOut,"<span class=\"wikiTagCancelled\">");
1035 zTerm = "</span>";
@@ -1398,19 +1400,20 @@
1398 if( markup.iType==MUTYPE_FONT ){
1399 startAutoParagraph(p);
1400 }else if( markup.iType==MUTYPE_BLOCK ){
1401 p->wantAutoParagraph = 0;
1402 }
1403 if ( markup.iCode==MARKUP_HR
1404 || markup.iCode==MARKUP_H1
1405 || markup.iCode==MARKUP_H2
1406 || markup.iCode==MARKUP_H3
1407 || markup.iCode==MARKUP_H4
1408 || markup.iCode==MARKUP_H5
1409 || markup.iCode==MARKUP_P
1410 )
1411 endAutoParagraph(p);
 
1412 if( (markup.iType & MUTYPE_STACK )!=0 ){
1413 pushStack(p, markup.iCode);
1414 }
1415 renderMarkup(p->pOut, &markup);
1416 }
1417
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -745,12 +745,12 @@
745 static void renderMarkup(Blob *pOut, ParsedMarkup *p){
746 int i;
747 if( p->endTag ){
748 blob_appendf(pOut, "</%s>", aMarkup[p->iCode].zName);
749 }else{
750 /* Close active paragraph for several elements, which are not allowed
751 ** in paragraphs in XHTML.
752 */
753 blob_appendf(pOut, "<%s", aMarkup[p->iCode].zName);
754 for(i=0; i<p->nAttr; i++){
755 blob_appendf(pOut, " %s", aAttribute[p->aAttr[i].iACode].zName);
756 if( p->aAttr[i].zValue ){
@@ -760,12 +760,13 @@
760 }else{
761 blob_appendf(pOut, "=\"%s\"", zVal);
762 }
763 }
764 }
765 if (p->iType & MUTYPE_SINGLE){
766 blob_append(pOut, " /", 2);
767 }
768 blob_append(pOut, ">", 1);
769 }
770 }
771
772 /*
@@ -1024,12 +1025,13 @@
1025 /* Special display processing for tickets. Display the hyperlink
1026 ** as crossed out if the ticket is closed.
1027 */
1028 if( isClosed ){
1029 if( g.okHistory ){
1030 blob_appendf(p->pOut,
1031 "<a href=\"%s/info/%s\"><span class=\"wikiTagCancelled\">",
1032 g.zBaseURL, zTarget
1033 );
1034 zTerm = "</span></a>";
1035 }else{
1036 blob_appendf(p->pOut,"<span class=\"wikiTagCancelled\">");
1037 zTerm = "</span>";
@@ -1398,19 +1400,20 @@
1400 if( markup.iType==MUTYPE_FONT ){
1401 startAutoParagraph(p);
1402 }else if( markup.iType==MUTYPE_BLOCK ){
1403 p->wantAutoParagraph = 0;
1404 }
1405 if( markup.iCode==MARKUP_HR
1406 || markup.iCode==MARKUP_H1
1407 || markup.iCode==MARKUP_H2
1408 || markup.iCode==MARKUP_H3
1409 || markup.iCode==MARKUP_H4
1410 || markup.iCode==MARKUP_H5
1411 || markup.iCode==MARKUP_P
1412 ){
1413 endAutoParagraph(p);
1414 }
1415 if( (markup.iType & MUTYPE_STACK )!=0 ){
1416 pushStack(p, markup.iCode);
1417 }
1418 renderMarkup(p->pOut, &markup);
1419 }
1420

Keyboard Shortcuts

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