Fossil SCM

Merged from trunk

ashepilko 2020-04-11 22:35 api-cleanup merge
Commit 2f24675ab589dca1cef7efd1077bcd982bac916d673295c3deb0c82c44949d69
--- a/src/accordion.js
+++ b/src/accordion.js
@@ -0,0 +1,27 @@
1
+/* Attach appropriate javascript to each ".accordion" button so that
2
+** it expands and contracts when clicked.
3
+**ntracts when clicked.
4
+**
5
+** The uncompressed source code for the SV
6
+** wiki page "branch/accordion-experiments" window to a smaller
7
+** width, causing vertical growth.)
8
+**
9
+** Ano"+"/"+"ttach appropriate javascript to each ".accordion" button so that
10
+** it expands and contracts when clicked.
11
+**ntracts when clicked.
12
+**
13
+** The uncompressed source code for the SV
14
+** wiki page "branch/accordion-experiments" window to a smaller
15
+** width, causing vertical growth.)
16
+**
17
+** Another problem is that `scrollHeight' used to calculate the expanded height
18
+** while still in the contracted state may return values with small errors on
19
+** some browsers, especially for large elements, presumably due to omitting the
20
+** space required by the vertical scrollbar that may become necessary, causing
21
+** additional horizontal shrinking and consequently more vertical growth than
22
+** calculated. That's why se/* Attach appropriate javascript to each ".accordion" button so that
23
+** it expands and contracts when clicked.
24
+**ntracts when clicked.
25
+**
26
+** The uncompressed source code for the SV
27
+** wiki page "branch/accordion-experiments" window to a smvar p = a[i].nextElementSibli
--- a/src/accordion.js
+++ b/src/accordion.js
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/src/accordion.js
+++ b/src/accordion.js
@@ -0,0 +1,27 @@
1 /* Attach appropriate javascript to each ".accordion" button so that
2 ** it expands and contracts when clicked.
3 **ntracts when clicked.
4 **
5 ** The uncompressed source code for the SV
6 ** wiki page "branch/accordion-experiments" window to a smaller
7 ** width, causing vertical growth.)
8 **
9 ** Ano"+"/"+"ttach appropriate javascript to each ".accordion" button so that
10 ** it expands and contracts when clicked.
11 **ntracts when clicked.
12 **
13 ** The uncompressed source code for the SV
14 ** wiki page "branch/accordion-experiments" window to a smaller
15 ** width, causing vertical growth.)
16 **
17 ** Another problem is that `scrollHeight' used to calculate the expanded height
18 ** while still in the contracted state may return values with small errors on
19 ** some browsers, especially for large elements, presumably due to omitting the
20 ** space required by the vertical scrollbar that may become necessary, causing
21 ** additional horizontal shrinking and consequently more vertical growth than
22 ** calculated. That's why se/* Attach appropriate javascript to each ".accordion" button so that
23 ** it expands and contracts when clicked.
24 **ntracts when clicked.
25 **
26 ** The uncompressed source code for the SV
27 ** wiki page "branch/accordion-experiments" window to a smvar p = a[i].nextElementSibli
+3 -1
--- src/alerts.c
+++ src/alerts.c
@@ -2214,11 +2214,13 @@
22142214
"SELECT"
22152215
" forumpost.fpid," /* 0 */
22162216
" (SELECT uuid FROM blob WHERE rid=forumpost.fpid)," /* 1 */
22172217
" datetime(event.mtime)," /* 2 */
22182218
" substr(comment,instr(comment,':')+2)," /* 3 */
2219
- " (SELECT uuid FROM blob WHERE rid=forumpost.firt)," /* 4 */
2219
+ " (SELECT uuid FROM blob, forumpost AS irt"
2220
+ " WHERE irt.fpid=forumpost.firt"
2221
+ " AND blob.rid=coalesce(irt.fprev,irt.fpid))," /* 4 */
22202222
" wantalert.needMod," /* 5 */
22212223
" coalesce(display_name(info),euser,user)," /* 6 */
22222224
" forumpost.fprev IS NULL" /* 7 */
22232225
" FROM temp.wantalert, event, forumpost"
22242226
" LEFT JOIN user ON (login=coalesce(euser,user))"
22252227
--- src/alerts.c
+++ src/alerts.c
@@ -2214,11 +2214,13 @@
2214 "SELECT"
2215 " forumpost.fpid," /* 0 */
2216 " (SELECT uuid FROM blob WHERE rid=forumpost.fpid)," /* 1 */
2217 " datetime(event.mtime)," /* 2 */
2218 " substr(comment,instr(comment,':')+2)," /* 3 */
2219 " (SELECT uuid FROM blob WHERE rid=forumpost.firt)," /* 4 */
 
 
2220 " wantalert.needMod," /* 5 */
2221 " coalesce(display_name(info),euser,user)," /* 6 */
2222 " forumpost.fprev IS NULL" /* 7 */
2223 " FROM temp.wantalert, event, forumpost"
2224 " LEFT JOIN user ON (login=coalesce(euser,user))"
2225
--- src/alerts.c
+++ src/alerts.c
@@ -2214,11 +2214,13 @@
2214 "SELECT"
2215 " forumpost.fpid," /* 0 */
2216 " (SELECT uuid FROM blob WHERE rid=forumpost.fpid)," /* 1 */
2217 " datetime(event.mtime)," /* 2 */
2218 " substr(comment,instr(comment,':')+2)," /* 3 */
2219 " (SELECT uuid FROM blob, forumpost AS irt"
2220 " WHERE irt.fpid=forumpost.firt"
2221 " AND blob.rid=coalesce(irt.fprev,irt.fpid))," /* 4 */
2222 " wantalert.needMod," /* 5 */
2223 " coalesce(display_name(info),euser,user)," /* 6 */
2224 " forumpost.fprev IS NULL" /* 7 */
2225 " FROM temp.wantalert, event, forumpost"
2226 " LEFT JOIN user ON (login=coalesce(euser,user))"
2227
+3 -1
--- src/alerts.c
+++ src/alerts.c
@@ -2214,11 +2214,13 @@
22142214
"SELECT"
22152215
" forumpost.fpid," /* 0 */
22162216
" (SELECT uuid FROM blob WHERE rid=forumpost.fpid)," /* 1 */
22172217
" datetime(event.mtime)," /* 2 */
22182218
" substr(comment,instr(comment,':')+2)," /* 3 */
2219
- " (SELECT uuid FROM blob WHERE rid=forumpost.firt)," /* 4 */
2219
+ " (SELECT uuid FROM blob, forumpost AS irt"
2220
+ " WHERE irt.fpid=forumpost.firt"
2221
+ " AND blob.rid=coalesce(irt.fprev,irt.fpid))," /* 4 */
22202222
" wantalert.needMod," /* 5 */
22212223
" coalesce(display_name(info),euser,user)," /* 6 */
22222224
" forumpost.fprev IS NULL" /* 7 */
22232225
" FROM temp.wantalert, event, forumpost"
22242226
" LEFT JOIN user ON (login=coalesce(euser,user))"
22252227
--- src/alerts.c
+++ src/alerts.c
@@ -2214,11 +2214,13 @@
2214 "SELECT"
2215 " forumpost.fpid," /* 0 */
2216 " (SELECT uuid FROM blob WHERE rid=forumpost.fpid)," /* 1 */
2217 " datetime(event.mtime)," /* 2 */
2218 " substr(comment,instr(comment,':')+2)," /* 3 */
2219 " (SELECT uuid FROM blob WHERE rid=forumpost.firt)," /* 4 */
 
 
2220 " wantalert.needMod," /* 5 */
2221 " coalesce(display_name(info),euser,user)," /* 6 */
2222 " forumpost.fprev IS NULL" /* 7 */
2223 " FROM temp.wantalert, event, forumpost"
2224 " LEFT JOIN user ON (login=coalesce(euser,user))"
2225
--- src/alerts.c
+++ src/alerts.c
@@ -2214,11 +2214,13 @@
2214 "SELECT"
2215 " forumpost.fpid," /* 0 */
2216 " (SELECT uuid FROM blob WHERE rid=forumpost.fpid)," /* 1 */
2217 " datetime(event.mtime)," /* 2 */
2218 " substr(comment,instr(comment,':')+2)," /* 3 */
2219 " (SELECT uuid FROM blob, forumpost AS irt"
2220 " WHERE irt.fpid=forumpost.firt"
2221 " AND blob.rid=coalesce(irt.fprev,irt.fpid))," /* 4 */
2222 " wantalert.needMod," /* 5 */
2223 " coalesce(display_name(info),euser,user)," /* 6 */
2224 " forumpost.fprev IS NULL" /* 7 */
2225 " FROM temp.wantalert, event, forumpost"
2226 " LEFT JOIN user ON (login=coalesce(euser,user))"
2227
--- src/default_css.txt
+++ src/default_css.txt
@@ -745,10 +745,12 @@
745745
}
746746
div.forumTimeline {
747747
border: 1px solid black;
748748
padding-left: 1ex;
749749
padding-right: 1ex;
750
+ max-width: 50em;
751
+ overflow: auto;
750752
}
751753
div.forumTimeline code {
752754
white-space: pre-wrap;
753755
}
754756
div.markdown code {
@@ -757,10 +759,14 @@
757759
div.forumHier, div.forumTime {
758760
border: 1px solid black;
759761
padding-left: 1ex;
760762
padding-right: 1ex;
761763
margin-top: 1ex;
764
+}
765
+div.forumPostBody {
766
+ max-height: 40em;
767
+ overflow: auto;
762768
}
763769
div.forumSel {
764770
background-color: #cef;
765771
}
766772
div.forumObs {
@@ -810,5 +816,30 @@
810816
margin-right: 0;
811817
}
812818
.nobr {
813819
white-space: nowrap;
814820
}
821
+.accordion {
822
+ cursor: pointer;
823
+}
824
+.accordion_btn {
825
+ display: inline-block;
826
+ width: 16px;
827
+ height: 16px;
828
+ margin-right: .5em;
829
+ vertical-align: middle;
830
+}
831
+// Note: the order of the next 3 entries should be
832
+// maintained for the hierarchical cascade to work.
833
+.accordion > .accordion_btn_plus {
834
+ display: none;
835
+}
836
+.accordion_closed > .accordion_btn_minus {
837
+ display: none;
838
+}
839
+.accordion_closed > .accordion_btn_plus {
840
+ display: inline-block;
841
+}
842
+.accordion_panel {
843
+ overflow: hidden;
844
+ transition: max-height 0.25s ease-out;
845
+}
815846
--- src/default_css.txt
+++ src/default_css.txt
@@ -745,10 +745,12 @@
745 }
746 div.forumTimeline {
747 border: 1px solid black;
748 padding-left: 1ex;
749 padding-right: 1ex;
 
 
750 }
751 div.forumTimeline code {
752 white-space: pre-wrap;
753 }
754 div.markdown code {
@@ -757,10 +759,14 @@
757 div.forumHier, div.forumTime {
758 border: 1px solid black;
759 padding-left: 1ex;
760 padding-right: 1ex;
761 margin-top: 1ex;
 
 
 
 
762 }
763 div.forumSel {
764 background-color: #cef;
765 }
766 div.forumObs {
@@ -810,5 +816,30 @@
810 margin-right: 0;
811 }
812 .nobr {
813 white-space: nowrap;
814 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
815
--- src/default_css.txt
+++ src/default_css.txt
@@ -745,10 +745,12 @@
745 }
746 div.forumTimeline {
747 border: 1px solid black;
748 padding-left: 1ex;
749 padding-right: 1ex;
750 max-width: 50em;
751 overflow: auto;
752 }
753 div.forumTimeline code {
754 white-space: pre-wrap;
755 }
756 div.markdown code {
@@ -757,10 +759,14 @@
759 div.forumHier, div.forumTime {
760 border: 1px solid black;
761 padding-left: 1ex;
762 padding-right: 1ex;
763 margin-top: 1ex;
764 }
765 div.forumPostBody {
766 max-height: 40em;
767 overflow: auto;
768 }
769 div.forumSel {
770 background-color: #cef;
771 }
772 div.forumObs {
@@ -810,5 +816,30 @@
816 margin-right: 0;
817 }
818 .nobr {
819 white-space: nowrap;
820 }
821 .accordion {
822 cursor: pointer;
823 }
824 .accordion_btn {
825 display: inline-block;
826 width: 16px;
827 height: 16px;
828 margin-right: .5em;
829 vertical-align: middle;
830 }
831 // Note: the order of the next 3 entries should be
832 // maintained for the hierarchical cascade to work.
833 .accordion > .accordion_btn_plus {
834 display: none;
835 }
836 .accordion_closed > .accordion_btn_minus {
837 display: none;
838 }
839 .accordion_closed > .accordion_btn_plus {
840 display: inline-block;
841 }
842 .accordion_panel {
843 overflow: hidden;
844 transition: max-height 0.25s ease-out;
845 }
846
+43 -1
--- src/file.c
+++ src/file.c
@@ -347,10 +347,50 @@
347347
}
348348
free(zFN);
349349
return rc;
350350
}
351351
352
+/*
353
+** Return true (1) if zFilename seems like it seems like a valid
354
+** repository database.
355
+*/
356
+int file_is_repository(const char *zFilename){
357
+ i64 sz;
358
+ sqlite3 *db = 0;
359
+ sqlite3_stmt *pStmt = 0;
360
+ int rc;
361
+ int i;
362
+ static const char *azReqTab[] = {
363
+ "blob", "delta", "rcvfrom", "user", "config"
364
+ };
365
+ if( !file_isfile(zFilename, ExtFILE) ) return 0;
366
+ sz = file_size(zFilename, ExtFILE);
367
+ if( sz<35328 ) return 0;
368
+ if( sz%512!=0 ) return 0;
369
+ rc = sqlite3_open_v2(zFilename, &db,
370
+ SQLITE_OPEN_READWRITE, 0);
371
+ if( rc!=0 ) goto not_a_repo;
372
+ for(i=0; i<count(azReqTab); i++){
373
+ if( sqlite3_table_column_metadata(db, "main", azReqTab[i],0,0,0,0,0,0) ){
374
+ goto not_a_repo;
375
+ }
376
+ }
377
+ rc = sqlite3_prepare_v2(db, "SELECT 1 FROM config WHERE name='project-code'",
378
+ -1, &pStmt, 0);
379
+ if( rc ) goto not_a_repo;
380
+ rc = sqlite3_step(pStmt);
381
+ if( rc!=SQLITE_ROW ) goto not_a_repo;
382
+ sqlite3_finalize(pStmt);
383
+ sqlite3_close(db);
384
+ return 1;
385
+
386
+not_a_repo:
387
+ sqlite3_finalize(pStmt);
388
+ sqlite3_close(db);
389
+ return 0;
390
+}
391
+
352392
353393
/*
354394
** Wrapper around the access() system call.
355395
*/
356396
int file_access(const char *zFilename, int flags){
@@ -1126,10 +1166,11 @@
11261166
memset(&testFileStat, 0, sizeof(struct fossilStat));
11271167
rc = fossil_stat(zPath, &testFileStat, 0);
11281168
fossil_print(" stat_rc = %d\n", rc);
11291169
sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_size);
11301170
fossil_print(" stat_size = %s\n", zBuf);
1171
+ if( g.db==0 ) sqlite3_open(":memory:", &g.db);
11311172
z = db_text(0, "SELECT datetime(%lld, 'unixepoch')", testFileStat.st_mtime);
11321173
sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld (%s)", testFileStat.st_mtime, z);
11331174
fossil_free(z);
11341175
fossil_print(" stat_mtime = %s\n", zBuf);
11351176
fossil_print(" stat_mode = 0%o\n", testFileStat.st_mode);
@@ -1166,10 +1207,11 @@
11661207
fossil_print(" file_isfile(RepoFILE) = %d\n", file_isfile(zPath,RepoFILE));
11671208
fossil_print(" file_isfile_or_link = %d\n", file_isfile_or_link(zPath));
11681209
fossil_print(" file_islink = %d\n", file_islink(zPath));
11691210
fossil_print(" file_isexe(RepoFILE) = %d\n", file_isexe(zPath,RepoFILE));
11701211
fossil_print(" file_isdir(RepoFILE) = %d\n", file_isdir(zPath,RepoFILE));
1212
+ fossil_print(" file_is_repository = %d\n", file_is_repository(zPath));
11711213
if( reset ) resetStat();
11721214
}
11731215
11741216
/*
11751217
** COMMAND: test-file-environment
@@ -1192,11 +1234,11 @@
11921234
int resetFlag = find_option("reset",0,0)!=0;
11931235
const char *zAllow = find_option("allow-symlinks",0,1);
11941236
if( find_option("open-config", 0, 0)!=0 ){
11951237
Th_OpenConfig(1);
11961238
}
1197
- db_find_and_open_repository(OPEN_ANY_SCHEMA, 0);
1239
+ db_find_and_open_repository(OPEN_ANY_SCHEMA|OPEN_OK_NOT_FOUND, 0);
11981240
fossil_print("filenames_are_case_sensitive() = %d\n",
11991241
filenames_are_case_sensitive());
12001242
fossil_print("db_allow_symlinks_by_default() = %d\n",
12011243
db_allow_symlinks_by_default());
12021244
if( zAllow ){
12031245
--- src/file.c
+++ src/file.c
@@ -347,10 +347,50 @@
347 }
348 free(zFN);
349 return rc;
350 }
351
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
353 /*
354 ** Wrapper around the access() system call.
355 */
356 int file_access(const char *zFilename, int flags){
@@ -1126,10 +1166,11 @@
1126 memset(&testFileStat, 0, sizeof(struct fossilStat));
1127 rc = fossil_stat(zPath, &testFileStat, 0);
1128 fossil_print(" stat_rc = %d\n", rc);
1129 sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_size);
1130 fossil_print(" stat_size = %s\n", zBuf);
 
1131 z = db_text(0, "SELECT datetime(%lld, 'unixepoch')", testFileStat.st_mtime);
1132 sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld (%s)", testFileStat.st_mtime, z);
1133 fossil_free(z);
1134 fossil_print(" stat_mtime = %s\n", zBuf);
1135 fossil_print(" stat_mode = 0%o\n", testFileStat.st_mode);
@@ -1166,10 +1207,11 @@
1166 fossil_print(" file_isfile(RepoFILE) = %d\n", file_isfile(zPath,RepoFILE));
1167 fossil_print(" file_isfile_or_link = %d\n", file_isfile_or_link(zPath));
1168 fossil_print(" file_islink = %d\n", file_islink(zPath));
1169 fossil_print(" file_isexe(RepoFILE) = %d\n", file_isexe(zPath,RepoFILE));
1170 fossil_print(" file_isdir(RepoFILE) = %d\n", file_isdir(zPath,RepoFILE));
 
1171 if( reset ) resetStat();
1172 }
1173
1174 /*
1175 ** COMMAND: test-file-environment
@@ -1192,11 +1234,11 @@
1192 int resetFlag = find_option("reset",0,0)!=0;
1193 const char *zAllow = find_option("allow-symlinks",0,1);
1194 if( find_option("open-config", 0, 0)!=0 ){
1195 Th_OpenConfig(1);
1196 }
1197 db_find_and_open_repository(OPEN_ANY_SCHEMA, 0);
1198 fossil_print("filenames_are_case_sensitive() = %d\n",
1199 filenames_are_case_sensitive());
1200 fossil_print("db_allow_symlinks_by_default() = %d\n",
1201 db_allow_symlinks_by_default());
1202 if( zAllow ){
1203
--- src/file.c
+++ src/file.c
@@ -347,10 +347,50 @@
347 }
348 free(zFN);
349 return rc;
350 }
351
352 /*
353 ** Return true (1) if zFilename seems like it seems like a valid
354 ** repository database.
355 */
356 int file_is_repository(const char *zFilename){
357 i64 sz;
358 sqlite3 *db = 0;
359 sqlite3_stmt *pStmt = 0;
360 int rc;
361 int i;
362 static const char *azReqTab[] = {
363 "blob", "delta", "rcvfrom", "user", "config"
364 };
365 if( !file_isfile(zFilename, ExtFILE) ) return 0;
366 sz = file_size(zFilename, ExtFILE);
367 if( sz<35328 ) return 0;
368 if( sz%512!=0 ) return 0;
369 rc = sqlite3_open_v2(zFilename, &db,
370 SQLITE_OPEN_READWRITE, 0);
371 if( rc!=0 ) goto not_a_repo;
372 for(i=0; i<count(azReqTab); i++){
373 if( sqlite3_table_column_metadata(db, "main", azReqTab[i],0,0,0,0,0,0) ){
374 goto not_a_repo;
375 }
376 }
377 rc = sqlite3_prepare_v2(db, "SELECT 1 FROM config WHERE name='project-code'",
378 -1, &pStmt, 0);
379 if( rc ) goto not_a_repo;
380 rc = sqlite3_step(pStmt);
381 if( rc!=SQLITE_ROW ) goto not_a_repo;
382 sqlite3_finalize(pStmt);
383 sqlite3_close(db);
384 return 1;
385
386 not_a_repo:
387 sqlite3_finalize(pStmt);
388 sqlite3_close(db);
389 return 0;
390 }
391
392
393 /*
394 ** Wrapper around the access() system call.
395 */
396 int file_access(const char *zFilename, int flags){
@@ -1126,10 +1166,11 @@
1166 memset(&testFileStat, 0, sizeof(struct fossilStat));
1167 rc = fossil_stat(zPath, &testFileStat, 0);
1168 fossil_print(" stat_rc = %d\n", rc);
1169 sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_size);
1170 fossil_print(" stat_size = %s\n", zBuf);
1171 if( g.db==0 ) sqlite3_open(":memory:", &g.db);
1172 z = db_text(0, "SELECT datetime(%lld, 'unixepoch')", testFileStat.st_mtime);
1173 sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld (%s)", testFileStat.st_mtime, z);
1174 fossil_free(z);
1175 fossil_print(" stat_mtime = %s\n", zBuf);
1176 fossil_print(" stat_mode = 0%o\n", testFileStat.st_mode);
@@ -1166,10 +1207,11 @@
1207 fossil_print(" file_isfile(RepoFILE) = %d\n", file_isfile(zPath,RepoFILE));
1208 fossil_print(" file_isfile_or_link = %d\n", file_isfile_or_link(zPath));
1209 fossil_print(" file_islink = %d\n", file_islink(zPath));
1210 fossil_print(" file_isexe(RepoFILE) = %d\n", file_isexe(zPath,RepoFILE));
1211 fossil_print(" file_isdir(RepoFILE) = %d\n", file_isdir(zPath,RepoFILE));
1212 fossil_print(" file_is_repository = %d\n", file_is_repository(zPath));
1213 if( reset ) resetStat();
1214 }
1215
1216 /*
1217 ** COMMAND: test-file-environment
@@ -1192,11 +1234,11 @@
1234 int resetFlag = find_option("reset",0,0)!=0;
1235 const char *zAllow = find_option("allow-symlinks",0,1);
1236 if( find_option("open-config", 0, 0)!=0 ){
1237 Th_OpenConfig(1);
1238 }
1239 db_find_and_open_repository(OPEN_ANY_SCHEMA|OPEN_OK_NOT_FOUND, 0);
1240 fossil_print("filenames_are_case_sensitive() = %d\n",
1241 filenames_are_case_sensitive());
1242 fossil_print("db_allow_symlinks_by_default() = %d\n",
1243 db_allow_symlinks_by_default());
1244 if( zAllow ){
1245
+43 -1
--- src/file.c
+++ src/file.c
@@ -347,10 +347,50 @@
347347
}
348348
free(zFN);
349349
return rc;
350350
}
351351
352
+/*
353
+** Return true (1) if zFilename seems like it seems like a valid
354
+** repository database.
355
+*/
356
+int file_is_repository(const char *zFilename){
357
+ i64 sz;
358
+ sqlite3 *db = 0;
359
+ sqlite3_stmt *pStmt = 0;
360
+ int rc;
361
+ int i;
362
+ static const char *azReqTab[] = {
363
+ "blob", "delta", "rcvfrom", "user", "config"
364
+ };
365
+ if( !file_isfile(zFilename, ExtFILE) ) return 0;
366
+ sz = file_size(zFilename, ExtFILE);
367
+ if( sz<35328 ) return 0;
368
+ if( sz%512!=0 ) return 0;
369
+ rc = sqlite3_open_v2(zFilename, &db,
370
+ SQLITE_OPEN_READWRITE, 0);
371
+ if( rc!=0 ) goto not_a_repo;
372
+ for(i=0; i<count(azReqTab); i++){
373
+ if( sqlite3_table_column_metadata(db, "main", azReqTab[i],0,0,0,0,0,0) ){
374
+ goto not_a_repo;
375
+ }
376
+ }
377
+ rc = sqlite3_prepare_v2(db, "SELECT 1 FROM config WHERE name='project-code'",
378
+ -1, &pStmt, 0);
379
+ if( rc ) goto not_a_repo;
380
+ rc = sqlite3_step(pStmt);
381
+ if( rc!=SQLITE_ROW ) goto not_a_repo;
382
+ sqlite3_finalize(pStmt);
383
+ sqlite3_close(db);
384
+ return 1;
385
+
386
+not_a_repo:
387
+ sqlite3_finalize(pStmt);
388
+ sqlite3_close(db);
389
+ return 0;
390
+}
391
+
352392
353393
/*
354394
** Wrapper around the access() system call.
355395
*/
356396
int file_access(const char *zFilename, int flags){
@@ -1126,10 +1166,11 @@
11261166
memset(&testFileStat, 0, sizeof(struct fossilStat));
11271167
rc = fossil_stat(zPath, &testFileStat, 0);
11281168
fossil_print(" stat_rc = %d\n", rc);
11291169
sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_size);
11301170
fossil_print(" stat_size = %s\n", zBuf);
1171
+ if( g.db==0 ) sqlite3_open(":memory:", &g.db);
11311172
z = db_text(0, "SELECT datetime(%lld, 'unixepoch')", testFileStat.st_mtime);
11321173
sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld (%s)", testFileStat.st_mtime, z);
11331174
fossil_free(z);
11341175
fossil_print(" stat_mtime = %s\n", zBuf);
11351176
fossil_print(" stat_mode = 0%o\n", testFileStat.st_mode);
@@ -1166,10 +1207,11 @@
11661207
fossil_print(" file_isfile(RepoFILE) = %d\n", file_isfile(zPath,RepoFILE));
11671208
fossil_print(" file_isfile_or_link = %d\n", file_isfile_or_link(zPath));
11681209
fossil_print(" file_islink = %d\n", file_islink(zPath));
11691210
fossil_print(" file_isexe(RepoFILE) = %d\n", file_isexe(zPath,RepoFILE));
11701211
fossil_print(" file_isdir(RepoFILE) = %d\n", file_isdir(zPath,RepoFILE));
1212
+ fossil_print(" file_is_repository = %d\n", file_is_repository(zPath));
11711213
if( reset ) resetStat();
11721214
}
11731215
11741216
/*
11751217
** COMMAND: test-file-environment
@@ -1192,11 +1234,11 @@
11921234
int resetFlag = find_option("reset",0,0)!=0;
11931235
const char *zAllow = find_option("allow-symlinks",0,1);
11941236
if( find_option("open-config", 0, 0)!=0 ){
11951237
Th_OpenConfig(1);
11961238
}
1197
- db_find_and_open_repository(OPEN_ANY_SCHEMA, 0);
1239
+ db_find_and_open_repository(OPEN_ANY_SCHEMA|OPEN_OK_NOT_FOUND, 0);
11981240
fossil_print("filenames_are_case_sensitive() = %d\n",
11991241
filenames_are_case_sensitive());
12001242
fossil_print("db_allow_symlinks_by_default() = %d\n",
12011243
db_allow_symlinks_by_default());
12021244
if( zAllow ){
12031245
--- src/file.c
+++ src/file.c
@@ -347,10 +347,50 @@
347 }
348 free(zFN);
349 return rc;
350 }
351
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
353 /*
354 ** Wrapper around the access() system call.
355 */
356 int file_access(const char *zFilename, int flags){
@@ -1126,10 +1166,11 @@
1126 memset(&testFileStat, 0, sizeof(struct fossilStat));
1127 rc = fossil_stat(zPath, &testFileStat, 0);
1128 fossil_print(" stat_rc = %d\n", rc);
1129 sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_size);
1130 fossil_print(" stat_size = %s\n", zBuf);
 
1131 z = db_text(0, "SELECT datetime(%lld, 'unixepoch')", testFileStat.st_mtime);
1132 sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld (%s)", testFileStat.st_mtime, z);
1133 fossil_free(z);
1134 fossil_print(" stat_mtime = %s\n", zBuf);
1135 fossil_print(" stat_mode = 0%o\n", testFileStat.st_mode);
@@ -1166,10 +1207,11 @@
1166 fossil_print(" file_isfile(RepoFILE) = %d\n", file_isfile(zPath,RepoFILE));
1167 fossil_print(" file_isfile_or_link = %d\n", file_isfile_or_link(zPath));
1168 fossil_print(" file_islink = %d\n", file_islink(zPath));
1169 fossil_print(" file_isexe(RepoFILE) = %d\n", file_isexe(zPath,RepoFILE));
1170 fossil_print(" file_isdir(RepoFILE) = %d\n", file_isdir(zPath,RepoFILE));
 
1171 if( reset ) resetStat();
1172 }
1173
1174 /*
1175 ** COMMAND: test-file-environment
@@ -1192,11 +1234,11 @@
1192 int resetFlag = find_option("reset",0,0)!=0;
1193 const char *zAllow = find_option("allow-symlinks",0,1);
1194 if( find_option("open-config", 0, 0)!=0 ){
1195 Th_OpenConfig(1);
1196 }
1197 db_find_and_open_repository(OPEN_ANY_SCHEMA, 0);
1198 fossil_print("filenames_are_case_sensitive() = %d\n",
1199 filenames_are_case_sensitive());
1200 fossil_print("db_allow_symlinks_by_default() = %d\n",
1201 db_allow_symlinks_by_default());
1202 if( zAllow ){
1203
--- src/file.c
+++ src/file.c
@@ -347,10 +347,50 @@
347 }
348 free(zFN);
349 return rc;
350 }
351
352 /*
353 ** Return true (1) if zFilename seems like it seems like a valid
354 ** repository database.
355 */
356 int file_is_repository(const char *zFilename){
357 i64 sz;
358 sqlite3 *db = 0;
359 sqlite3_stmt *pStmt = 0;
360 int rc;
361 int i;
362 static const char *azReqTab[] = {
363 "blob", "delta", "rcvfrom", "user", "config"
364 };
365 if( !file_isfile(zFilename, ExtFILE) ) return 0;
366 sz = file_size(zFilename, ExtFILE);
367 if( sz<35328 ) return 0;
368 if( sz%512!=0 ) return 0;
369 rc = sqlite3_open_v2(zFilename, &db,
370 SQLITE_OPEN_READWRITE, 0);
371 if( rc!=0 ) goto not_a_repo;
372 for(i=0; i<count(azReqTab); i++){
373 if( sqlite3_table_column_metadata(db, "main", azReqTab[i],0,0,0,0,0,0) ){
374 goto not_a_repo;
375 }
376 }
377 rc = sqlite3_prepare_v2(db, "SELECT 1 FROM config WHERE name='project-code'",
378 -1, &pStmt, 0);
379 if( rc ) goto not_a_repo;
380 rc = sqlite3_step(pStmt);
381 if( rc!=SQLITE_ROW ) goto not_a_repo;
382 sqlite3_finalize(pStmt);
383 sqlite3_close(db);
384 return 1;
385
386 not_a_repo:
387 sqlite3_finalize(pStmt);
388 sqlite3_close(db);
389 return 0;
390 }
391
392
393 /*
394 ** Wrapper around the access() system call.
395 */
396 int file_access(const char *zFilename, int flags){
@@ -1126,10 +1166,11 @@
1166 memset(&testFileStat, 0, sizeof(struct fossilStat));
1167 rc = fossil_stat(zPath, &testFileStat, 0);
1168 fossil_print(" stat_rc = %d\n", rc);
1169 sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_size);
1170 fossil_print(" stat_size = %s\n", zBuf);
1171 if( g.db==0 ) sqlite3_open(":memory:", &g.db);
1172 z = db_text(0, "SELECT datetime(%lld, 'unixepoch')", testFileStat.st_mtime);
1173 sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld (%s)", testFileStat.st_mtime, z);
1174 fossil_free(z);
1175 fossil_print(" stat_mtime = %s\n", zBuf);
1176 fossil_print(" stat_mode = 0%o\n", testFileStat.st_mode);
@@ -1166,10 +1207,11 @@
1207 fossil_print(" file_isfile(RepoFILE) = %d\n", file_isfile(zPath,RepoFILE));
1208 fossil_print(" file_isfile_or_link = %d\n", file_isfile_or_link(zPath));
1209 fossil_print(" file_islink = %d\n", file_islink(zPath));
1210 fossil_print(" file_isexe(RepoFILE) = %d\n", file_isexe(zPath,RepoFILE));
1211 fossil_print(" file_isdir(RepoFILE) = %d\n", file_isdir(zPath,RepoFILE));
1212 fossil_print(" file_is_repository = %d\n", file_is_repository(zPath));
1213 if( reset ) resetStat();
1214 }
1215
1216 /*
1217 ** COMMAND: test-file-environment
@@ -1192,11 +1234,11 @@
1234 int resetFlag = find_option("reset",0,0)!=0;
1235 const char *zAllow = find_option("allow-symlinks",0,1);
1236 if( find_option("open-config", 0, 0)!=0 ){
1237 Th_OpenConfig(1);
1238 }
1239 db_find_and_open_repository(OPEN_ANY_SCHEMA|OPEN_OK_NOT_FOUND, 0);
1240 fossil_print("filenames_are_case_sensitive() = %d\n",
1241 filenames_are_case_sensitive());
1242 fossil_print("db_allow_symlinks_by_default() = %d\n",
1243 db_allow_symlinks_by_default());
1244 if( zAllow ){
1245
+21 -15
--- src/forum.c
+++ src/forum.c
@@ -309,11 +309,12 @@
309309
*/
310310
void forum_render(
311311
const char *zTitle, /* The title. Might be NULL for no title */
312312
const char *zMimetype, /* Mimetype of the message */
313313
const char *zContent, /* Content of the message */
314
- const char *zClass /* Put in a <div> if not NULL */
314
+ const char *zClass, /* Put in a <div> if not NULL */
315
+ int bScroll /* Large message content scrolls if true */
315316
){
316317
if( zClass ){
317318
@ <div class='%s(zClass)'>
318319
}
319320
if( zTitle ){
@@ -323,14 +324,20 @@
323324
@ <h1><i>Deleted</i></h1>
324325
}
325326
}
326327
if( zContent && zContent[0] ){
327328
Blob x;
329
+ if( bScroll ){
330
+ @ <div class='forumPostBody'>
331
+ }else{
332
+ @ <div class='forumPostFullBody'>
333
+ }
328334
blob_init(&x, 0, 0);
329335
blob_append(&x, zContent, -1);
330336
wiki_render_by_mimetype(&x, zMimetype);
331337
blob_reset(&x);
338
+ @ </div>
332339
}else{
333340
@ <i>Deleted</i>
334341
}
335342
if( zClass ){
336343
@ </div>
@@ -444,20 +451,21 @@
444451
zUuid = p->pLeaf->zUuid;
445452
}
446453
if( p->fpid!=target ){
447454
@ %z(href("%R/forumpost/%S?t=%c",zUuid,cMode))[link]</a>
448455
}
449
- if( !bRawMode && fossil_strcmp(pPost->zMimetype,"text/plain")!=0 ){
456
+ if( !bRawMode ){
450457
@ %z(href("%R/forumpost/%S?raw",zUuid))[source]</a>
451458
}
452459
isPrivate = content_is_private(p->fpid);
453460
sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
454461
@ </h3>
455462
if( isPrivate && !g.perm.ModForum && !sameUser ){
456463
@ <p><span class="modpending">Awaiting Moderator Approval</span></p>
457464
}else{
458
- forum_render(0, bRawMode?"text/plain":pPost->zMimetype, pPost->zWiki, 0);
465
+ forum_render(0, bRawMode?"text/plain":pPost->zMimetype, pPost->zWiki,
466
+ 0, 1);
459467
}
460468
if( g.perm.WrForum && p->pLeaf==0 ){
461469
int sameUser = login_is_individual()
462470
&& fossil_strcmp(pPost->zUser, g.zLogin)==0;
463471
@ <p><form action="%R/forumedit" method="POST">
@@ -565,13 +573,11 @@
565573
manifest_destroy(pOPost);
566574
}
567575
if( fpid!=target ){
568576
@ %z(href("%R/forumpost/%S",zUuid))[link]</a>
569577
}
570
- if( fossil_strcmp(pPost->zMimetype,"text/plain")!=0 ){
571
- @ %z(href("%R/forumpost/%S?raw",zUuid))[source]</a>
572
- }
578
+ @ %z(href("%R/forumpost/%S?raw",zUuid))[source]</a>
573579
if( p->firt ){
574580
ForumEntry *pIrt = p->pPrev;
575581
while( pIrt && pIrt->fpid!=p->firt ) pIrt = pIrt->pPrev;
576582
if( pIrt ){
577583
@ in reply to %z(href("%R/forumpost/%S?t=h",pIrt->zUuid))\
@@ -582,11 +588,11 @@
582588
isPrivate = content_is_private(fpid);
583589
sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
584590
if( isPrivate && !g.perm.ModForum && !sameUser ){
585591
@ <p><span class="modpending">Awaiting Moderator Approval</span></p>
586592
}else{
587
- forum_render(0, pPost->zMimetype, pPost->zWiki, 0);
593
+ forum_render(0, pPost->zMimetype, pPost->zWiki, 0, 1);
588594
}
589595
if( g.perm.WrForum ){
590596
@ <p><form action="%R/forumedit" method="POST">
591597
@ <input type="hidden" name="fpid" value="%s(zUuid)">
592598
if( !isPrivate ){
@@ -717,11 +723,11 @@
717723
int notAnon = login_is_individual();
718724
int sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
719725
if( isPrivate && !g.perm.ModForum && !sameUser ){
720726
@ <p><span class="modpending">Awaiting Moderator Approval</span></p>
721727
}else{
722
- forum_render(0, "text/plain", pPost->zWiki, 0);
728
+ forum_render(0, "text/plain", pPost->zWiki, 0, 0);
723729
}
724730
manifest_destroy(pPost);
725731
}
726732
}else if( zMode[0]=='c' ){
727733
style_submenu_element("Hierarchical", "%R/%s/%s?t=h", g.zPath, zName);
@@ -949,11 +955,11 @@
949955
if( P("submit") ){
950956
if( forum_post(zTitle, 0, 0, 0, zMimetype, zContent) ) return;
951957
}
952958
if( P("preview") ){
953959
@ <h1>Preview:</h1>
954
- forum_render(zTitle, zMimetype, zContent, "forumEdit");
960
+ forum_render(zTitle, zMimetype, zContent, "forumEdit", 1);
955961
}
956962
style_header("New Forum Thread");
957963
@ <form action="%R/forume1" method="POST">
958964
@ <h1>New Thread:</h1>
959965
forum_from_line();
@@ -1067,13 +1073,13 @@
10671073
zContent = "";
10681074
if( pPost->zThreadTitle ) zTitle = "";
10691075
style_header("Delete %s", zTitle ? "Post" : "Reply");
10701076
@ <h1>Original Post:</h1>
10711077
forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki,
1072
- "forumEdit");
1078
+ "forumEdit", 1);
10731079
@ <h1>Change Into:</h1>
1074
- forum_render(zTitle, zMimetype, zContent,"forumEdit");
1080
+ forum_render(zTitle, zMimetype, zContent,"forumEdit", 1);
10751081
@ <form action="%R/forume2" method="POST">
10761082
@ <input type="hidden" name="fpid" value="%h(P("fpid"))">
10771083
@ <input type="hidden" name="nullout" value="1">
10781084
@ <input type="hidden" name="mimetype" value="%h(zMimetype)">
10791085
@ <input type="hidden" name="content" value="%h(zContent)">
@@ -1091,14 +1097,14 @@
10911097
zTitle = fossil_strdup(pPost->zThreadTitle);
10921098
}
10931099
style_header("Edit %s", zTitle ? "Post" : "Reply");
10941100
@ <h2>Original Post:</h2>
10951101
forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki,
1096
- "forumEdit");
1102
+ "forumEdit", 1);
10971103
if( P("preview") ){
10981104
@ <h2>Preview of Edited Post:</h2>
1099
- forum_render(zTitle, zMimetype, zContent,"forumEdit");
1105
+ forum_render(zTitle, zMimetype, zContent,"forumEdit", 1);
11001106
}
11011107
@ <h2>Revised Message:</h2>
11021108
@ <form action="%R/forume2" method="POST">
11031109
@ <input type="hidden" name="fpid" value="%h(P("fpid"))">
11041110
@ <input type="hidden" name="edit" value="1">
@@ -1117,14 +1123,14 @@
11171123
zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate);
11181124
zDisplayName = display_name_from_login(pPost->zUser);
11191125
@ <h3 class='forumPostHdr'>By %h(zDisplayName) on %h(zDate)</h3>
11201126
fossil_free(zDisplayName);
11211127
fossil_free(zDate);
1122
- forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit");
1128
+ forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit", 1);
11231129
if( P("preview") ){
11241130
@ <h2>Preview:</h2>
1125
- forum_render(0, zMimetype,zContent, "forumEdit");
1131
+ forum_render(0, zMimetype,zContent, "forumEdit", 1);
11261132
}
11271133
@ <h2>Enter Reply:</h2>
11281134
@ <form action="%R/forume2" method="POST">
11291135
@ <input type="hidden" name="fpid" value="%h(P("fpid"))">
11301136
@ <input type="hidden" name="reply" value="1">
11311137
--- src/forum.c
+++ src/forum.c
@@ -309,11 +309,12 @@
309 */
310 void forum_render(
311 const char *zTitle, /* The title. Might be NULL for no title */
312 const char *zMimetype, /* Mimetype of the message */
313 const char *zContent, /* Content of the message */
314 const char *zClass /* Put in a <div> if not NULL */
 
315 ){
316 if( zClass ){
317 @ <div class='%s(zClass)'>
318 }
319 if( zTitle ){
@@ -323,14 +324,20 @@
323 @ <h1><i>Deleted</i></h1>
324 }
325 }
326 if( zContent && zContent[0] ){
327 Blob x;
 
 
 
 
 
328 blob_init(&x, 0, 0);
329 blob_append(&x, zContent, -1);
330 wiki_render_by_mimetype(&x, zMimetype);
331 blob_reset(&x);
 
332 }else{
333 @ <i>Deleted</i>
334 }
335 if( zClass ){
336 @ </div>
@@ -444,20 +451,21 @@
444 zUuid = p->pLeaf->zUuid;
445 }
446 if( p->fpid!=target ){
447 @ %z(href("%R/forumpost/%S?t=%c",zUuid,cMode))[link]</a>
448 }
449 if( !bRawMode && fossil_strcmp(pPost->zMimetype,"text/plain")!=0 ){
450 @ %z(href("%R/forumpost/%S?raw",zUuid))[source]</a>
451 }
452 isPrivate = content_is_private(p->fpid);
453 sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
454 @ </h3>
455 if( isPrivate && !g.perm.ModForum && !sameUser ){
456 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
457 }else{
458 forum_render(0, bRawMode?"text/plain":pPost->zMimetype, pPost->zWiki, 0);
 
459 }
460 if( g.perm.WrForum && p->pLeaf==0 ){
461 int sameUser = login_is_individual()
462 && fossil_strcmp(pPost->zUser, g.zLogin)==0;
463 @ <p><form action="%R/forumedit" method="POST">
@@ -565,13 +573,11 @@
565 manifest_destroy(pOPost);
566 }
567 if( fpid!=target ){
568 @ %z(href("%R/forumpost/%S",zUuid))[link]</a>
569 }
570 if( fossil_strcmp(pPost->zMimetype,"text/plain")!=0 ){
571 @ %z(href("%R/forumpost/%S?raw",zUuid))[source]</a>
572 }
573 if( p->firt ){
574 ForumEntry *pIrt = p->pPrev;
575 while( pIrt && pIrt->fpid!=p->firt ) pIrt = pIrt->pPrev;
576 if( pIrt ){
577 @ in reply to %z(href("%R/forumpost/%S?t=h",pIrt->zUuid))\
@@ -582,11 +588,11 @@
582 isPrivate = content_is_private(fpid);
583 sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
584 if( isPrivate && !g.perm.ModForum && !sameUser ){
585 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
586 }else{
587 forum_render(0, pPost->zMimetype, pPost->zWiki, 0);
588 }
589 if( g.perm.WrForum ){
590 @ <p><form action="%R/forumedit" method="POST">
591 @ <input type="hidden" name="fpid" value="%s(zUuid)">
592 if( !isPrivate ){
@@ -717,11 +723,11 @@
717 int notAnon = login_is_individual();
718 int sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
719 if( isPrivate && !g.perm.ModForum && !sameUser ){
720 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
721 }else{
722 forum_render(0, "text/plain", pPost->zWiki, 0);
723 }
724 manifest_destroy(pPost);
725 }
726 }else if( zMode[0]=='c' ){
727 style_submenu_element("Hierarchical", "%R/%s/%s?t=h", g.zPath, zName);
@@ -949,11 +955,11 @@
949 if( P("submit") ){
950 if( forum_post(zTitle, 0, 0, 0, zMimetype, zContent) ) return;
951 }
952 if( P("preview") ){
953 @ <h1>Preview:</h1>
954 forum_render(zTitle, zMimetype, zContent, "forumEdit");
955 }
956 style_header("New Forum Thread");
957 @ <form action="%R/forume1" method="POST">
958 @ <h1>New Thread:</h1>
959 forum_from_line();
@@ -1067,13 +1073,13 @@
1067 zContent = "";
1068 if( pPost->zThreadTitle ) zTitle = "";
1069 style_header("Delete %s", zTitle ? "Post" : "Reply");
1070 @ <h1>Original Post:</h1>
1071 forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki,
1072 "forumEdit");
1073 @ <h1>Change Into:</h1>
1074 forum_render(zTitle, zMimetype, zContent,"forumEdit");
1075 @ <form action="%R/forume2" method="POST">
1076 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1077 @ <input type="hidden" name="nullout" value="1">
1078 @ <input type="hidden" name="mimetype" value="%h(zMimetype)">
1079 @ <input type="hidden" name="content" value="%h(zContent)">
@@ -1091,14 +1097,14 @@
1091 zTitle = fossil_strdup(pPost->zThreadTitle);
1092 }
1093 style_header("Edit %s", zTitle ? "Post" : "Reply");
1094 @ <h2>Original Post:</h2>
1095 forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki,
1096 "forumEdit");
1097 if( P("preview") ){
1098 @ <h2>Preview of Edited Post:</h2>
1099 forum_render(zTitle, zMimetype, zContent,"forumEdit");
1100 }
1101 @ <h2>Revised Message:</h2>
1102 @ <form action="%R/forume2" method="POST">
1103 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1104 @ <input type="hidden" name="edit" value="1">
@@ -1117,14 +1123,14 @@
1117 zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate);
1118 zDisplayName = display_name_from_login(pPost->zUser);
1119 @ <h3 class='forumPostHdr'>By %h(zDisplayName) on %h(zDate)</h3>
1120 fossil_free(zDisplayName);
1121 fossil_free(zDate);
1122 forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit");
1123 if( P("preview") ){
1124 @ <h2>Preview:</h2>
1125 forum_render(0, zMimetype,zContent, "forumEdit");
1126 }
1127 @ <h2>Enter Reply:</h2>
1128 @ <form action="%R/forume2" method="POST">
1129 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1130 @ <input type="hidden" name="reply" value="1">
1131
--- src/forum.c
+++ src/forum.c
@@ -309,11 +309,12 @@
309 */
310 void forum_render(
311 const char *zTitle, /* The title. Might be NULL for no title */
312 const char *zMimetype, /* Mimetype of the message */
313 const char *zContent, /* Content of the message */
314 const char *zClass, /* Put in a <div> if not NULL */
315 int bScroll /* Large message content scrolls if true */
316 ){
317 if( zClass ){
318 @ <div class='%s(zClass)'>
319 }
320 if( zTitle ){
@@ -323,14 +324,20 @@
324 @ <h1><i>Deleted</i></h1>
325 }
326 }
327 if( zContent && zContent[0] ){
328 Blob x;
329 if( bScroll ){
330 @ <div class='forumPostBody'>
331 }else{
332 @ <div class='forumPostFullBody'>
333 }
334 blob_init(&x, 0, 0);
335 blob_append(&x, zContent, -1);
336 wiki_render_by_mimetype(&x, zMimetype);
337 blob_reset(&x);
338 @ </div>
339 }else{
340 @ <i>Deleted</i>
341 }
342 if( zClass ){
343 @ </div>
@@ -444,20 +451,21 @@
451 zUuid = p->pLeaf->zUuid;
452 }
453 if( p->fpid!=target ){
454 @ %z(href("%R/forumpost/%S?t=%c",zUuid,cMode))[link]</a>
455 }
456 if( !bRawMode ){
457 @ %z(href("%R/forumpost/%S?raw",zUuid))[source]</a>
458 }
459 isPrivate = content_is_private(p->fpid);
460 sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
461 @ </h3>
462 if( isPrivate && !g.perm.ModForum && !sameUser ){
463 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
464 }else{
465 forum_render(0, bRawMode?"text/plain":pPost->zMimetype, pPost->zWiki,
466 0, 1);
467 }
468 if( g.perm.WrForum && p->pLeaf==0 ){
469 int sameUser = login_is_individual()
470 && fossil_strcmp(pPost->zUser, g.zLogin)==0;
471 @ <p><form action="%R/forumedit" method="POST">
@@ -565,13 +573,11 @@
573 manifest_destroy(pOPost);
574 }
575 if( fpid!=target ){
576 @ %z(href("%R/forumpost/%S",zUuid))[link]</a>
577 }
578 @ %z(href("%R/forumpost/%S?raw",zUuid))[source]</a>
 
 
579 if( p->firt ){
580 ForumEntry *pIrt = p->pPrev;
581 while( pIrt && pIrt->fpid!=p->firt ) pIrt = pIrt->pPrev;
582 if( pIrt ){
583 @ in reply to %z(href("%R/forumpost/%S?t=h",pIrt->zUuid))\
@@ -582,11 +588,11 @@
588 isPrivate = content_is_private(fpid);
589 sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
590 if( isPrivate && !g.perm.ModForum && !sameUser ){
591 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
592 }else{
593 forum_render(0, pPost->zMimetype, pPost->zWiki, 0, 1);
594 }
595 if( g.perm.WrForum ){
596 @ <p><form action="%R/forumedit" method="POST">
597 @ <input type="hidden" name="fpid" value="%s(zUuid)">
598 if( !isPrivate ){
@@ -717,11 +723,11 @@
723 int notAnon = login_is_individual();
724 int sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
725 if( isPrivate && !g.perm.ModForum && !sameUser ){
726 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
727 }else{
728 forum_render(0, "text/plain", pPost->zWiki, 0, 0);
729 }
730 manifest_destroy(pPost);
731 }
732 }else if( zMode[0]=='c' ){
733 style_submenu_element("Hierarchical", "%R/%s/%s?t=h", g.zPath, zName);
@@ -949,11 +955,11 @@
955 if( P("submit") ){
956 if( forum_post(zTitle, 0, 0, 0, zMimetype, zContent) ) return;
957 }
958 if( P("preview") ){
959 @ <h1>Preview:</h1>
960 forum_render(zTitle, zMimetype, zContent, "forumEdit", 1);
961 }
962 style_header("New Forum Thread");
963 @ <form action="%R/forume1" method="POST">
964 @ <h1>New Thread:</h1>
965 forum_from_line();
@@ -1067,13 +1073,13 @@
1073 zContent = "";
1074 if( pPost->zThreadTitle ) zTitle = "";
1075 style_header("Delete %s", zTitle ? "Post" : "Reply");
1076 @ <h1>Original Post:</h1>
1077 forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki,
1078 "forumEdit", 1);
1079 @ <h1>Change Into:</h1>
1080 forum_render(zTitle, zMimetype, zContent,"forumEdit", 1);
1081 @ <form action="%R/forume2" method="POST">
1082 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1083 @ <input type="hidden" name="nullout" value="1">
1084 @ <input type="hidden" name="mimetype" value="%h(zMimetype)">
1085 @ <input type="hidden" name="content" value="%h(zContent)">
@@ -1091,14 +1097,14 @@
1097 zTitle = fossil_strdup(pPost->zThreadTitle);
1098 }
1099 style_header("Edit %s", zTitle ? "Post" : "Reply");
1100 @ <h2>Original Post:</h2>
1101 forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki,
1102 "forumEdit", 1);
1103 if( P("preview") ){
1104 @ <h2>Preview of Edited Post:</h2>
1105 forum_render(zTitle, zMimetype, zContent,"forumEdit", 1);
1106 }
1107 @ <h2>Revised Message:</h2>
1108 @ <form action="%R/forume2" method="POST">
1109 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1110 @ <input type="hidden" name="edit" value="1">
@@ -1117,14 +1123,14 @@
1123 zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate);
1124 zDisplayName = display_name_from_login(pPost->zUser);
1125 @ <h3 class='forumPostHdr'>By %h(zDisplayName) on %h(zDate)</h3>
1126 fossil_free(zDisplayName);
1127 fossil_free(zDate);
1128 forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit", 1);
1129 if( P("preview") ){
1130 @ <h2>Preview:</h2>
1131 forum_render(0, zMimetype,zContent, "forumEdit", 1);
1132 }
1133 @ <h2>Enter Reply:</h2>
1134 @ <form action="%R/forume2" method="POST">
1135 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1136 @ <input type="hidden" name="reply" value="1">
1137
+21 -15
--- src/forum.c
+++ src/forum.c
@@ -309,11 +309,12 @@
309309
*/
310310
void forum_render(
311311
const char *zTitle, /* The title. Might be NULL for no title */
312312
const char *zMimetype, /* Mimetype of the message */
313313
const char *zContent, /* Content of the message */
314
- const char *zClass /* Put in a <div> if not NULL */
314
+ const char *zClass, /* Put in a <div> if not NULL */
315
+ int bScroll /* Large message content scrolls if true */
315316
){
316317
if( zClass ){
317318
@ <div class='%s(zClass)'>
318319
}
319320
if( zTitle ){
@@ -323,14 +324,20 @@
323324
@ <h1><i>Deleted</i></h1>
324325
}
325326
}
326327
if( zContent && zContent[0] ){
327328
Blob x;
329
+ if( bScroll ){
330
+ @ <div class='forumPostBody'>
331
+ }else{
332
+ @ <div class='forumPostFullBody'>
333
+ }
328334
blob_init(&x, 0, 0);
329335
blob_append(&x, zContent, -1);
330336
wiki_render_by_mimetype(&x, zMimetype);
331337
blob_reset(&x);
338
+ @ </div>
332339
}else{
333340
@ <i>Deleted</i>
334341
}
335342
if( zClass ){
336343
@ </div>
@@ -444,20 +451,21 @@
444451
zUuid = p->pLeaf->zUuid;
445452
}
446453
if( p->fpid!=target ){
447454
@ %z(href("%R/forumpost/%S?t=%c",zUuid,cMode))[link]</a>
448455
}
449
- if( !bRawMode && fossil_strcmp(pPost->zMimetype,"text/plain")!=0 ){
456
+ if( !bRawMode ){
450457
@ %z(href("%R/forumpost/%S?raw",zUuid))[source]</a>
451458
}
452459
isPrivate = content_is_private(p->fpid);
453460
sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
454461
@ </h3>
455462
if( isPrivate && !g.perm.ModForum && !sameUser ){
456463
@ <p><span class="modpending">Awaiting Moderator Approval</span></p>
457464
}else{
458
- forum_render(0, bRawMode?"text/plain":pPost->zMimetype, pPost->zWiki, 0);
465
+ forum_render(0, bRawMode?"text/plain":pPost->zMimetype, pPost->zWiki,
466
+ 0, 1);
459467
}
460468
if( g.perm.WrForum && p->pLeaf==0 ){
461469
int sameUser = login_is_individual()
462470
&& fossil_strcmp(pPost->zUser, g.zLogin)==0;
463471
@ <p><form action="%R/forumedit" method="POST">
@@ -565,13 +573,11 @@
565573
manifest_destroy(pOPost);
566574
}
567575
if( fpid!=target ){
568576
@ %z(href("%R/forumpost/%S",zUuid))[link]</a>
569577
}
570
- if( fossil_strcmp(pPost->zMimetype,"text/plain")!=0 ){
571
- @ %z(href("%R/forumpost/%S?raw",zUuid))[source]</a>
572
- }
578
+ @ %z(href("%R/forumpost/%S?raw",zUuid))[source]</a>
573579
if( p->firt ){
574580
ForumEntry *pIrt = p->pPrev;
575581
while( pIrt && pIrt->fpid!=p->firt ) pIrt = pIrt->pPrev;
576582
if( pIrt ){
577583
@ in reply to %z(href("%R/forumpost/%S?t=h",pIrt->zUuid))\
@@ -582,11 +588,11 @@
582588
isPrivate = content_is_private(fpid);
583589
sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
584590
if( isPrivate && !g.perm.ModForum && !sameUser ){
585591
@ <p><span class="modpending">Awaiting Moderator Approval</span></p>
586592
}else{
587
- forum_render(0, pPost->zMimetype, pPost->zWiki, 0);
593
+ forum_render(0, pPost->zMimetype, pPost->zWiki, 0, 1);
588594
}
589595
if( g.perm.WrForum ){
590596
@ <p><form action="%R/forumedit" method="POST">
591597
@ <input type="hidden" name="fpid" value="%s(zUuid)">
592598
if( !isPrivate ){
@@ -717,11 +723,11 @@
717723
int notAnon = login_is_individual();
718724
int sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
719725
if( isPrivate && !g.perm.ModForum && !sameUser ){
720726
@ <p><span class="modpending">Awaiting Moderator Approval</span></p>
721727
}else{
722
- forum_render(0, "text/plain", pPost->zWiki, 0);
728
+ forum_render(0, "text/plain", pPost->zWiki, 0, 0);
723729
}
724730
manifest_destroy(pPost);
725731
}
726732
}else if( zMode[0]=='c' ){
727733
style_submenu_element("Hierarchical", "%R/%s/%s?t=h", g.zPath, zName);
@@ -949,11 +955,11 @@
949955
if( P("submit") ){
950956
if( forum_post(zTitle, 0, 0, 0, zMimetype, zContent) ) return;
951957
}
952958
if( P("preview") ){
953959
@ <h1>Preview:</h1>
954
- forum_render(zTitle, zMimetype, zContent, "forumEdit");
960
+ forum_render(zTitle, zMimetype, zContent, "forumEdit", 1);
955961
}
956962
style_header("New Forum Thread");
957963
@ <form action="%R/forume1" method="POST">
958964
@ <h1>New Thread:</h1>
959965
forum_from_line();
@@ -1067,13 +1073,13 @@
10671073
zContent = "";
10681074
if( pPost->zThreadTitle ) zTitle = "";
10691075
style_header("Delete %s", zTitle ? "Post" : "Reply");
10701076
@ <h1>Original Post:</h1>
10711077
forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki,
1072
- "forumEdit");
1078
+ "forumEdit", 1);
10731079
@ <h1>Change Into:</h1>
1074
- forum_render(zTitle, zMimetype, zContent,"forumEdit");
1080
+ forum_render(zTitle, zMimetype, zContent,"forumEdit", 1);
10751081
@ <form action="%R/forume2" method="POST">
10761082
@ <input type="hidden" name="fpid" value="%h(P("fpid"))">
10771083
@ <input type="hidden" name="nullout" value="1">
10781084
@ <input type="hidden" name="mimetype" value="%h(zMimetype)">
10791085
@ <input type="hidden" name="content" value="%h(zContent)">
@@ -1091,14 +1097,14 @@
10911097
zTitle = fossil_strdup(pPost->zThreadTitle);
10921098
}
10931099
style_header("Edit %s", zTitle ? "Post" : "Reply");
10941100
@ <h2>Original Post:</h2>
10951101
forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki,
1096
- "forumEdit");
1102
+ "forumEdit", 1);
10971103
if( P("preview") ){
10981104
@ <h2>Preview of Edited Post:</h2>
1099
- forum_render(zTitle, zMimetype, zContent,"forumEdit");
1105
+ forum_render(zTitle, zMimetype, zContent,"forumEdit", 1);
11001106
}
11011107
@ <h2>Revised Message:</h2>
11021108
@ <form action="%R/forume2" method="POST">
11031109
@ <input type="hidden" name="fpid" value="%h(P("fpid"))">
11041110
@ <input type="hidden" name="edit" value="1">
@@ -1117,14 +1123,14 @@
11171123
zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate);
11181124
zDisplayName = display_name_from_login(pPost->zUser);
11191125
@ <h3 class='forumPostHdr'>By %h(zDisplayName) on %h(zDate)</h3>
11201126
fossil_free(zDisplayName);
11211127
fossil_free(zDate);
1122
- forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit");
1128
+ forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit", 1);
11231129
if( P("preview") ){
11241130
@ <h2>Preview:</h2>
1125
- forum_render(0, zMimetype,zContent, "forumEdit");
1131
+ forum_render(0, zMimetype,zContent, "forumEdit", 1);
11261132
}
11271133
@ <h2>Enter Reply:</h2>
11281134
@ <form action="%R/forume2" method="POST">
11291135
@ <input type="hidden" name="fpid" value="%h(P("fpid"))">
11301136
@ <input type="hidden" name="reply" value="1">
11311137
--- src/forum.c
+++ src/forum.c
@@ -309,11 +309,12 @@
309 */
310 void forum_render(
311 const char *zTitle, /* The title. Might be NULL for no title */
312 const char *zMimetype, /* Mimetype of the message */
313 const char *zContent, /* Content of the message */
314 const char *zClass /* Put in a <div> if not NULL */
 
315 ){
316 if( zClass ){
317 @ <div class='%s(zClass)'>
318 }
319 if( zTitle ){
@@ -323,14 +324,20 @@
323 @ <h1><i>Deleted</i></h1>
324 }
325 }
326 if( zContent && zContent[0] ){
327 Blob x;
 
 
 
 
 
328 blob_init(&x, 0, 0);
329 blob_append(&x, zContent, -1);
330 wiki_render_by_mimetype(&x, zMimetype);
331 blob_reset(&x);
 
332 }else{
333 @ <i>Deleted</i>
334 }
335 if( zClass ){
336 @ </div>
@@ -444,20 +451,21 @@
444 zUuid = p->pLeaf->zUuid;
445 }
446 if( p->fpid!=target ){
447 @ %z(href("%R/forumpost/%S?t=%c",zUuid,cMode))[link]</a>
448 }
449 if( !bRawMode && fossil_strcmp(pPost->zMimetype,"text/plain")!=0 ){
450 @ %z(href("%R/forumpost/%S?raw",zUuid))[source]</a>
451 }
452 isPrivate = content_is_private(p->fpid);
453 sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
454 @ </h3>
455 if( isPrivate && !g.perm.ModForum && !sameUser ){
456 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
457 }else{
458 forum_render(0, bRawMode?"text/plain":pPost->zMimetype, pPost->zWiki, 0);
 
459 }
460 if( g.perm.WrForum && p->pLeaf==0 ){
461 int sameUser = login_is_individual()
462 && fossil_strcmp(pPost->zUser, g.zLogin)==0;
463 @ <p><form action="%R/forumedit" method="POST">
@@ -565,13 +573,11 @@
565 manifest_destroy(pOPost);
566 }
567 if( fpid!=target ){
568 @ %z(href("%R/forumpost/%S",zUuid))[link]</a>
569 }
570 if( fossil_strcmp(pPost->zMimetype,"text/plain")!=0 ){
571 @ %z(href("%R/forumpost/%S?raw",zUuid))[source]</a>
572 }
573 if( p->firt ){
574 ForumEntry *pIrt = p->pPrev;
575 while( pIrt && pIrt->fpid!=p->firt ) pIrt = pIrt->pPrev;
576 if( pIrt ){
577 @ in reply to %z(href("%R/forumpost/%S?t=h",pIrt->zUuid))\
@@ -582,11 +588,11 @@
582 isPrivate = content_is_private(fpid);
583 sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
584 if( isPrivate && !g.perm.ModForum && !sameUser ){
585 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
586 }else{
587 forum_render(0, pPost->zMimetype, pPost->zWiki, 0);
588 }
589 if( g.perm.WrForum ){
590 @ <p><form action="%R/forumedit" method="POST">
591 @ <input type="hidden" name="fpid" value="%s(zUuid)">
592 if( !isPrivate ){
@@ -717,11 +723,11 @@
717 int notAnon = login_is_individual();
718 int sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
719 if( isPrivate && !g.perm.ModForum && !sameUser ){
720 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
721 }else{
722 forum_render(0, "text/plain", pPost->zWiki, 0);
723 }
724 manifest_destroy(pPost);
725 }
726 }else if( zMode[0]=='c' ){
727 style_submenu_element("Hierarchical", "%R/%s/%s?t=h", g.zPath, zName);
@@ -949,11 +955,11 @@
949 if( P("submit") ){
950 if( forum_post(zTitle, 0, 0, 0, zMimetype, zContent) ) return;
951 }
952 if( P("preview") ){
953 @ <h1>Preview:</h1>
954 forum_render(zTitle, zMimetype, zContent, "forumEdit");
955 }
956 style_header("New Forum Thread");
957 @ <form action="%R/forume1" method="POST">
958 @ <h1>New Thread:</h1>
959 forum_from_line();
@@ -1067,13 +1073,13 @@
1067 zContent = "";
1068 if( pPost->zThreadTitle ) zTitle = "";
1069 style_header("Delete %s", zTitle ? "Post" : "Reply");
1070 @ <h1>Original Post:</h1>
1071 forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki,
1072 "forumEdit");
1073 @ <h1>Change Into:</h1>
1074 forum_render(zTitle, zMimetype, zContent,"forumEdit");
1075 @ <form action="%R/forume2" method="POST">
1076 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1077 @ <input type="hidden" name="nullout" value="1">
1078 @ <input type="hidden" name="mimetype" value="%h(zMimetype)">
1079 @ <input type="hidden" name="content" value="%h(zContent)">
@@ -1091,14 +1097,14 @@
1091 zTitle = fossil_strdup(pPost->zThreadTitle);
1092 }
1093 style_header("Edit %s", zTitle ? "Post" : "Reply");
1094 @ <h2>Original Post:</h2>
1095 forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki,
1096 "forumEdit");
1097 if( P("preview") ){
1098 @ <h2>Preview of Edited Post:</h2>
1099 forum_render(zTitle, zMimetype, zContent,"forumEdit");
1100 }
1101 @ <h2>Revised Message:</h2>
1102 @ <form action="%R/forume2" method="POST">
1103 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1104 @ <input type="hidden" name="edit" value="1">
@@ -1117,14 +1123,14 @@
1117 zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate);
1118 zDisplayName = display_name_from_login(pPost->zUser);
1119 @ <h3 class='forumPostHdr'>By %h(zDisplayName) on %h(zDate)</h3>
1120 fossil_free(zDisplayName);
1121 fossil_free(zDate);
1122 forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit");
1123 if( P("preview") ){
1124 @ <h2>Preview:</h2>
1125 forum_render(0, zMimetype,zContent, "forumEdit");
1126 }
1127 @ <h2>Enter Reply:</h2>
1128 @ <form action="%R/forume2" method="POST">
1129 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1130 @ <input type="hidden" name="reply" value="1">
1131
--- src/forum.c
+++ src/forum.c
@@ -309,11 +309,12 @@
309 */
310 void forum_render(
311 const char *zTitle, /* The title. Might be NULL for no title */
312 const char *zMimetype, /* Mimetype of the message */
313 const char *zContent, /* Content of the message */
314 const char *zClass, /* Put in a <div> if not NULL */
315 int bScroll /* Large message content scrolls if true */
316 ){
317 if( zClass ){
318 @ <div class='%s(zClass)'>
319 }
320 if( zTitle ){
@@ -323,14 +324,20 @@
324 @ <h1><i>Deleted</i></h1>
325 }
326 }
327 if( zContent && zContent[0] ){
328 Blob x;
329 if( bScroll ){
330 @ <div class='forumPostBody'>
331 }else{
332 @ <div class='forumPostFullBody'>
333 }
334 blob_init(&x, 0, 0);
335 blob_append(&x, zContent, -1);
336 wiki_render_by_mimetype(&x, zMimetype);
337 blob_reset(&x);
338 @ </div>
339 }else{
340 @ <i>Deleted</i>
341 }
342 if( zClass ){
343 @ </div>
@@ -444,20 +451,21 @@
451 zUuid = p->pLeaf->zUuid;
452 }
453 if( p->fpid!=target ){
454 @ %z(href("%R/forumpost/%S?t=%c",zUuid,cMode))[link]</a>
455 }
456 if( !bRawMode ){
457 @ %z(href("%R/forumpost/%S?raw",zUuid))[source]</a>
458 }
459 isPrivate = content_is_private(p->fpid);
460 sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
461 @ </h3>
462 if( isPrivate && !g.perm.ModForum && !sameUser ){
463 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
464 }else{
465 forum_render(0, bRawMode?"text/plain":pPost->zMimetype, pPost->zWiki,
466 0, 1);
467 }
468 if( g.perm.WrForum && p->pLeaf==0 ){
469 int sameUser = login_is_individual()
470 && fossil_strcmp(pPost->zUser, g.zLogin)==0;
471 @ <p><form action="%R/forumedit" method="POST">
@@ -565,13 +573,11 @@
573 manifest_destroy(pOPost);
574 }
575 if( fpid!=target ){
576 @ %z(href("%R/forumpost/%S",zUuid))[link]</a>
577 }
578 @ %z(href("%R/forumpost/%S?raw",zUuid))[source]</a>
 
 
579 if( p->firt ){
580 ForumEntry *pIrt = p->pPrev;
581 while( pIrt && pIrt->fpid!=p->firt ) pIrt = pIrt->pPrev;
582 if( pIrt ){
583 @ in reply to %z(href("%R/forumpost/%S?t=h",pIrt->zUuid))\
@@ -582,11 +588,11 @@
588 isPrivate = content_is_private(fpid);
589 sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
590 if( isPrivate && !g.perm.ModForum && !sameUser ){
591 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
592 }else{
593 forum_render(0, pPost->zMimetype, pPost->zWiki, 0, 1);
594 }
595 if( g.perm.WrForum ){
596 @ <p><form action="%R/forumedit" method="POST">
597 @ <input type="hidden" name="fpid" value="%s(zUuid)">
598 if( !isPrivate ){
@@ -717,11 +723,11 @@
723 int notAnon = login_is_individual();
724 int sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
725 if( isPrivate && !g.perm.ModForum && !sameUser ){
726 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
727 }else{
728 forum_render(0, "text/plain", pPost->zWiki, 0, 0);
729 }
730 manifest_destroy(pPost);
731 }
732 }else if( zMode[0]=='c' ){
733 style_submenu_element("Hierarchical", "%R/%s/%s?t=h", g.zPath, zName);
@@ -949,11 +955,11 @@
955 if( P("submit") ){
956 if( forum_post(zTitle, 0, 0, 0, zMimetype, zContent) ) return;
957 }
958 if( P("preview") ){
959 @ <h1>Preview:</h1>
960 forum_render(zTitle, zMimetype, zContent, "forumEdit", 1);
961 }
962 style_header("New Forum Thread");
963 @ <form action="%R/forume1" method="POST">
964 @ <h1>New Thread:</h1>
965 forum_from_line();
@@ -1067,13 +1073,13 @@
1073 zContent = "";
1074 if( pPost->zThreadTitle ) zTitle = "";
1075 style_header("Delete %s", zTitle ? "Post" : "Reply");
1076 @ <h1>Original Post:</h1>
1077 forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki,
1078 "forumEdit", 1);
1079 @ <h1>Change Into:</h1>
1080 forum_render(zTitle, zMimetype, zContent,"forumEdit", 1);
1081 @ <form action="%R/forume2" method="POST">
1082 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1083 @ <input type="hidden" name="nullout" value="1">
1084 @ <input type="hidden" name="mimetype" value="%h(zMimetype)">
1085 @ <input type="hidden" name="content" value="%h(zContent)">
@@ -1091,14 +1097,14 @@
1097 zTitle = fossil_strdup(pPost->zThreadTitle);
1098 }
1099 style_header("Edit %s", zTitle ? "Post" : "Reply");
1100 @ <h2>Original Post:</h2>
1101 forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki,
1102 "forumEdit", 1);
1103 if( P("preview") ){
1104 @ <h2>Preview of Edited Post:</h2>
1105 forum_render(zTitle, zMimetype, zContent,"forumEdit", 1);
1106 }
1107 @ <h2>Revised Message:</h2>
1108 @ <form action="%R/forume2" method="POST">
1109 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1110 @ <input type="hidden" name="edit" value="1">
@@ -1117,14 +1123,14 @@
1123 zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate);
1124 zDisplayName = display_name_from_login(pPost->zUser);
1125 @ <h3 class='forumPostHdr'>By %h(zDisplayName) on %h(zDate)</h3>
1126 fossil_free(zDisplayName);
1127 fossil_free(zDate);
1128 forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit", 1);
1129 if( P("preview") ){
1130 @ <h2>Preview:</h2>
1131 forum_render(0, zMimetype,zContent, "forumEdit", 1);
1132 }
1133 @ <h2>Enter Reply:</h2>
1134 @ <form action="%R/forume2" method="POST">
1135 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1136 @ <input type="hidden" name="reply" value="1">
1137
+26 -1
--- src/main.c
+++ src/main.c
@@ -782,11 +782,21 @@
782782
nNewArgc = g.argc+1;
783783
zNewArgv[i+1] = 0;
784784
}
785785
g.argc = nNewArgc;
786786
g.argv = zNewArgv;
787
- }
787
+#if 0
788
+ }else if( g.argc==2 && file_is_repository(g.argv[1]) ){
789
+ char **zNewArgv = fossil_malloc( sizeof(char*)*4 );
790
+ zNewArgv[0] = g.argv[0];
791
+ zNewArgv[1] = "ui";
792
+ zNewArgv[2] = g.argv[1];
793
+ zNewArgv[3] = 0;
794
+ g.argc = 3;
795
+ g.argv = zNewArgv;
796
+#endif
797
+ }
788798
zCmdName = g.argv[1];
789799
}
790800
#ifndef _WIN32
791801
/* There is a bug in stunnel4 in which it sometimes starts up client
792802
** processes without first opening file descriptor 2 (standard error).
@@ -812,10 +822,25 @@
812822
}
813823
}
814824
#endif
815825
g.zCmdName = zCmdName;
816826
rc = dispatch_name_search(zCmdName, CMDFLAG_COMMAND|CMDFLAG_PREFIX, &pCmd);
827
+ if( rc==1 && g.argc==2 && file_is_repository(g.argv[1]) ){
828
+ /* If the command-line is "fossil ABC" and "ABC" is no a valid command,
829
+ ** but "ABC" is the name of a repository file, make the command be
830
+ ** "fossil ui ABC" instead.
831
+ */
832
+ char **zNewArgv = fossil_malloc( sizeof(char*)*4 );
833
+ zNewArgv[0] = g.argv[0];
834
+ zNewArgv[1] = "ui";
835
+ zNewArgv[2] = g.argv[1];
836
+ zNewArgv[3] = 0;
837
+ g.argc = 3;
838
+ g.argv = zNewArgv;
839
+ g.zCmdName = zCmdName = "ui";
840
+ rc = dispatch_name_search(zCmdName, CMDFLAG_COMMAND|CMDFLAG_PREFIX, &pCmd);
841
+ }
817842
if( rc==1 ){
818843
#ifdef FOSSIL_ENABLE_TH1_HOOKS
819844
if( !g.isHTTP && !g.fNoThHook ){
820845
rc = Th_CommandHook(zCmdName, 0);
821846
}else{
822847
--- src/main.c
+++ src/main.c
@@ -782,11 +782,21 @@
782 nNewArgc = g.argc+1;
783 zNewArgv[i+1] = 0;
784 }
785 g.argc = nNewArgc;
786 g.argv = zNewArgv;
787 }
 
 
 
 
 
 
 
 
 
 
788 zCmdName = g.argv[1];
789 }
790 #ifndef _WIN32
791 /* There is a bug in stunnel4 in which it sometimes starts up client
792 ** processes without first opening file descriptor 2 (standard error).
@@ -812,10 +822,25 @@
812 }
813 }
814 #endif
815 g.zCmdName = zCmdName;
816 rc = dispatch_name_search(zCmdName, CMDFLAG_COMMAND|CMDFLAG_PREFIX, &pCmd);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
817 if( rc==1 ){
818 #ifdef FOSSIL_ENABLE_TH1_HOOKS
819 if( !g.isHTTP && !g.fNoThHook ){
820 rc = Th_CommandHook(zCmdName, 0);
821 }else{
822
--- src/main.c
+++ src/main.c
@@ -782,11 +782,21 @@
782 nNewArgc = g.argc+1;
783 zNewArgv[i+1] = 0;
784 }
785 g.argc = nNewArgc;
786 g.argv = zNewArgv;
787 #if 0
788 }else if( g.argc==2 && file_is_repository(g.argv[1]) ){
789 char **zNewArgv = fossil_malloc( sizeof(char*)*4 );
790 zNewArgv[0] = g.argv[0];
791 zNewArgv[1] = "ui";
792 zNewArgv[2] = g.argv[1];
793 zNewArgv[3] = 0;
794 g.argc = 3;
795 g.argv = zNewArgv;
796 #endif
797 }
798 zCmdName = g.argv[1];
799 }
800 #ifndef _WIN32
801 /* There is a bug in stunnel4 in which it sometimes starts up client
802 ** processes without first opening file descriptor 2 (standard error).
@@ -812,10 +822,25 @@
822 }
823 }
824 #endif
825 g.zCmdName = zCmdName;
826 rc = dispatch_name_search(zCmdName, CMDFLAG_COMMAND|CMDFLAG_PREFIX, &pCmd);
827 if( rc==1 && g.argc==2 && file_is_repository(g.argv[1]) ){
828 /* If the command-line is "fossil ABC" and "ABC" is no a valid command,
829 ** but "ABC" is the name of a repository file, make the command be
830 ** "fossil ui ABC" instead.
831 */
832 char **zNewArgv = fossil_malloc( sizeof(char*)*4 );
833 zNewArgv[0] = g.argv[0];
834 zNewArgv[1] = "ui";
835 zNewArgv[2] = g.argv[1];
836 zNewArgv[3] = 0;
837 g.argc = 3;
838 g.argv = zNewArgv;
839 g.zCmdName = zCmdName = "ui";
840 rc = dispatch_name_search(zCmdName, CMDFLAG_COMMAND|CMDFLAG_PREFIX, &pCmd);
841 }
842 if( rc==1 ){
843 #ifdef FOSSIL_ENABLE_TH1_HOOKS
844 if( !g.isHTTP && !g.fNoThHook ){
845 rc = Th_CommandHook(zCmdName, 0);
846 }else{
847
+26 -1
--- src/main.c
+++ src/main.c
@@ -782,11 +782,21 @@
782782
nNewArgc = g.argc+1;
783783
zNewArgv[i+1] = 0;
784784
}
785785
g.argc = nNewArgc;
786786
g.argv = zNewArgv;
787
- }
787
+#if 0
788
+ }else if( g.argc==2 && file_is_repository(g.argv[1]) ){
789
+ char **zNewArgv = fossil_malloc( sizeof(char*)*4 );
790
+ zNewArgv[0] = g.argv[0];
791
+ zNewArgv[1] = "ui";
792
+ zNewArgv[2] = g.argv[1];
793
+ zNewArgv[3] = 0;
794
+ g.argc = 3;
795
+ g.argv = zNewArgv;
796
+#endif
797
+ }
788798
zCmdName = g.argv[1];
789799
}
790800
#ifndef _WIN32
791801
/* There is a bug in stunnel4 in which it sometimes starts up client
792802
** processes without first opening file descriptor 2 (standard error).
@@ -812,10 +822,25 @@
812822
}
813823
}
814824
#endif
815825
g.zCmdName = zCmdName;
816826
rc = dispatch_name_search(zCmdName, CMDFLAG_COMMAND|CMDFLAG_PREFIX, &pCmd);
827
+ if( rc==1 && g.argc==2 && file_is_repository(g.argv[1]) ){
828
+ /* If the command-line is "fossil ABC" and "ABC" is no a valid command,
829
+ ** but "ABC" is the name of a repository file, make the command be
830
+ ** "fossil ui ABC" instead.
831
+ */
832
+ char **zNewArgv = fossil_malloc( sizeof(char*)*4 );
833
+ zNewArgv[0] = g.argv[0];
834
+ zNewArgv[1] = "ui";
835
+ zNewArgv[2] = g.argv[1];
836
+ zNewArgv[3] = 0;
837
+ g.argc = 3;
838
+ g.argv = zNewArgv;
839
+ g.zCmdName = zCmdName = "ui";
840
+ rc = dispatch_name_search(zCmdName, CMDFLAG_COMMAND|CMDFLAG_PREFIX, &pCmd);
841
+ }
817842
if( rc==1 ){
818843
#ifdef FOSSIL_ENABLE_TH1_HOOKS
819844
if( !g.isHTTP && !g.fNoThHook ){
820845
rc = Th_CommandHook(zCmdName, 0);
821846
}else{
822847
--- src/main.c
+++ src/main.c
@@ -782,11 +782,21 @@
782 nNewArgc = g.argc+1;
783 zNewArgv[i+1] = 0;
784 }
785 g.argc = nNewArgc;
786 g.argv = zNewArgv;
787 }
 
 
 
 
 
 
 
 
 
 
788 zCmdName = g.argv[1];
789 }
790 #ifndef _WIN32
791 /* There is a bug in stunnel4 in which it sometimes starts up client
792 ** processes without first opening file descriptor 2 (standard error).
@@ -812,10 +822,25 @@
812 }
813 }
814 #endif
815 g.zCmdName = zCmdName;
816 rc = dispatch_name_search(zCmdName, CMDFLAG_COMMAND|CMDFLAG_PREFIX, &pCmd);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
817 if( rc==1 ){
818 #ifdef FOSSIL_ENABLE_TH1_HOOKS
819 if( !g.isHTTP && !g.fNoThHook ){
820 rc = Th_CommandHook(zCmdName, 0);
821 }else{
822
--- src/main.c
+++ src/main.c
@@ -782,11 +782,21 @@
782 nNewArgc = g.argc+1;
783 zNewArgv[i+1] = 0;
784 }
785 g.argc = nNewArgc;
786 g.argv = zNewArgv;
787 #if 0
788 }else if( g.argc==2 && file_is_repository(g.argv[1]) ){
789 char **zNewArgv = fossil_malloc( sizeof(char*)*4 );
790 zNewArgv[0] = g.argv[0];
791 zNewArgv[1] = "ui";
792 zNewArgv[2] = g.argv[1];
793 zNewArgv[3] = 0;
794 g.argc = 3;
795 g.argv = zNewArgv;
796 #endif
797 }
798 zCmdName = g.argv[1];
799 }
800 #ifndef _WIN32
801 /* There is a bug in stunnel4 in which it sometimes starts up client
802 ** processes without first opening file descriptor 2 (standard error).
@@ -812,10 +822,25 @@
822 }
823 }
824 #endif
825 g.zCmdName = zCmdName;
826 rc = dispatch_name_search(zCmdName, CMDFLAG_COMMAND|CMDFLAG_PREFIX, &pCmd);
827 if( rc==1 && g.argc==2 && file_is_repository(g.argv[1]) ){
828 /* If the command-line is "fossil ABC" and "ABC" is no a valid command,
829 ** but "ABC" is the name of a repository file, make the command be
830 ** "fossil ui ABC" instead.
831 */
832 char **zNewArgv = fossil_malloc( sizeof(char*)*4 );
833 zNewArgv[0] = g.argv[0];
834 zNewArgv[1] = "ui";
835 zNewArgv[2] = g.argv[1];
836 zNewArgv[3] = 0;
837 g.argc = 3;
838 g.argv = zNewArgv;
839 g.zCmdName = zCmdName = "ui";
840 rc = dispatch_name_search(zCmdName, CMDFLAG_COMMAND|CMDFLAG_PREFIX, &pCmd);
841 }
842 if( rc==1 ){
843 #ifdef FOSSIL_ENABLE_TH1_HOOKS
844 if( !g.isHTTP && !g.fNoThHook ){
845 rc = Th_CommandHook(zCmdName, 0);
846 }else{
847
--- src/main.mk
+++ src/main.mk
@@ -211,10 +211,11 @@
211211
$(SRCDIR)/../skins/rounded1/header.txt \
212212
$(SRCDIR)/../skins/xekri/css.txt \
213213
$(SRCDIR)/../skins/xekri/details.txt \
214214
$(SRCDIR)/../skins/xekri/footer.txt \
215215
$(SRCDIR)/../skins/xekri/header.txt \
216
+ $(SRCDIR)/accordion.js \
216217
$(SRCDIR)/ci_edit.js \
217218
$(SRCDIR)/copybtn.js \
218219
$(SRCDIR)/diff.tcl \
219220
$(SRCDIR)/forum.js \
220221
$(SRCDIR)/graph.js \
221222
--- src/main.mk
+++ src/main.mk
@@ -211,10 +211,11 @@
211 $(SRCDIR)/../skins/rounded1/header.txt \
212 $(SRCDIR)/../skins/xekri/css.txt \
213 $(SRCDIR)/../skins/xekri/details.txt \
214 $(SRCDIR)/../skins/xekri/footer.txt \
215 $(SRCDIR)/../skins/xekri/header.txt \
 
216 $(SRCDIR)/ci_edit.js \
217 $(SRCDIR)/copybtn.js \
218 $(SRCDIR)/diff.tcl \
219 $(SRCDIR)/forum.js \
220 $(SRCDIR)/graph.js \
221
--- src/main.mk
+++ src/main.mk
@@ -211,10 +211,11 @@
211 $(SRCDIR)/../skins/rounded1/header.txt \
212 $(SRCDIR)/../skins/xekri/css.txt \
213 $(SRCDIR)/../skins/xekri/details.txt \
214 $(SRCDIR)/../skins/xekri/footer.txt \
215 $(SRCDIR)/../skins/xekri/header.txt \
216 $(SRCDIR)/accordion.js \
217 $(SRCDIR)/ci_edit.js \
218 $(SRCDIR)/copybtn.js \
219 $(SRCDIR)/diff.tcl \
220 $(SRCDIR)/forum.js \
221 $(SRCDIR)/graph.js \
222
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -713,11 +713,11 @@
713713
#### The directories where the OpenSSL include and library files are located.
714714
# The recommended usage here is to use the Sysinternals junction tool
715715
# to create a hard link between an "openssl-1.x" sub-directory of the
716716
# Fossil source code directory and the target OpenSSL source directory.
717717
#
718
-OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1e
718
+OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1f
719719
OPENSSLINCDIR = $(OPENSSLDIR)/include
720720
OPENSSLLIBDIR = $(OPENSSLDIR)
721721
722722
#### Either the directory where the Tcl library is installed or the Tcl
723723
# source code directory resides (depending on the value of the macro
@@ -1570,11 +1570,11 @@
15701570
!ifndef USE_SEE
15711571
USE_SEE = 0
15721572
!endif
15731573
15741574
!if $(FOSSIL_ENABLE_SSL)!=0
1575
-SSLDIR = $(B)\compat\openssl-1.1.1e
1575
+SSLDIR = $(B)\compat\openssl-1.1.1f
15761576
SSLINCDIR = $(SSLDIR)\include
15771577
!if $(FOSSIL_DYNAMIC_BUILD)!=0
15781578
SSLLIBDIR = $(SSLDIR)
15791579
!else
15801580
SSLLIBDIR = $(SSLDIR)
15811581
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -713,11 +713,11 @@
713 #### The directories where the OpenSSL include and library files are located.
714 # The recommended usage here is to use the Sysinternals junction tool
715 # to create a hard link between an "openssl-1.x" sub-directory of the
716 # Fossil source code directory and the target OpenSSL source directory.
717 #
718 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1e
719 OPENSSLINCDIR = $(OPENSSLDIR)/include
720 OPENSSLLIBDIR = $(OPENSSLDIR)
721
722 #### Either the directory where the Tcl library is installed or the Tcl
723 # source code directory resides (depending on the value of the macro
@@ -1570,11 +1570,11 @@
1570 !ifndef USE_SEE
1571 USE_SEE = 0
1572 !endif
1573
1574 !if $(FOSSIL_ENABLE_SSL)!=0
1575 SSLDIR = $(B)\compat\openssl-1.1.1e
1576 SSLINCDIR = $(SSLDIR)\include
1577 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1578 SSLLIBDIR = $(SSLDIR)
1579 !else
1580 SSLLIBDIR = $(SSLDIR)
1581
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -713,11 +713,11 @@
713 #### The directories where the OpenSSL include and library files are located.
714 # The recommended usage here is to use the Sysinternals junction tool
715 # to create a hard link between an "openssl-1.x" sub-directory of the
716 # Fossil source code directory and the target OpenSSL source directory.
717 #
718 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1f
719 OPENSSLINCDIR = $(OPENSSLDIR)/include
720 OPENSSLLIBDIR = $(OPENSSLDIR)
721
722 #### Either the directory where the Tcl library is installed or the Tcl
723 # source code directory resides (depending on the value of the macro
@@ -1570,11 +1570,11 @@
1570 !ifndef USE_SEE
1571 USE_SEE = 0
1572 !endif
1573
1574 !if $(FOSSIL_ENABLE_SSL)!=0
1575 SSLDIR = $(B)\compat\openssl-1.1.1f
1576 SSLINCDIR = $(SSLDIR)\include
1577 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1578 SSLLIBDIR = $(SSLDIR)
1579 !else
1580 SSLLIBDIR = $(SSLDIR)
1581
+11
--- src/style.c
+++ src/style.c
@@ -91,10 +91,11 @@
9191
*/
9292
static int needHrefJs = 0; /* href.js */
9393
static int needSortJs = 0; /* sorttable.js */
9494
static int needGraphJs = 0; /* graph.js */
9595
static int needCopyBtnJs = 0; /* copybtn.js */
96
+static int needAccordionJs = 0; /* accordion.js */
9697
9798
/*
9899
** Extra JS added to the end of the file.
99100
*/
100101
static Blob blobOnLoad = BLOB_INITIALIZER;
@@ -680,10 +681,17 @@
680681
** Indicate that the table-sorting javascript is needed.
681682
*/
682683
void style_table_sorter(void){
683684
needSortJs = 1;
684685
}
686
+
687
+/*
688
+** Indicate that the accordion javascript is needed.
689
+*/
690
+void style_accordion(void){
691
+ needAccordionJs = 1;
692
+}
685693
686694
/*
687695
** Indicate that the timeline graph javascript is needed.
688696
*/
689697
void style_graph_generator(void){
@@ -750,10 +758,13 @@
750758
cgi_append_content(builtin_text("graph.js"),-1);
751759
}
752760
if( needCopyBtnJs ){
753761
cgi_append_content(builtin_text("copybtn.js"),-1);
754762
}
763
+ if( needAccordionJs ){
764
+ cgi_append_content(builtin_text("accordion.js"),-1);
765
+ }
755766
for(i=0; i<nJsToLoad; i++){
756767
cgi_append_content(builtin_text(azJsToLoad[i]),-1);
757768
}
758769
if( blob_size(&blobOnLoad)>0 ){
759770
@ window.onload = function(){
760771
--- src/style.c
+++ src/style.c
@@ -91,10 +91,11 @@
91 */
92 static int needHrefJs = 0; /* href.js */
93 static int needSortJs = 0; /* sorttable.js */
94 static int needGraphJs = 0; /* graph.js */
95 static int needCopyBtnJs = 0; /* copybtn.js */
 
96
97 /*
98 ** Extra JS added to the end of the file.
99 */
100 static Blob blobOnLoad = BLOB_INITIALIZER;
@@ -680,10 +681,17 @@
680 ** Indicate that the table-sorting javascript is needed.
681 */
682 void style_table_sorter(void){
683 needSortJs = 1;
684 }
 
 
 
 
 
 
 
685
686 /*
687 ** Indicate that the timeline graph javascript is needed.
688 */
689 void style_graph_generator(void){
@@ -750,10 +758,13 @@
750 cgi_append_content(builtin_text("graph.js"),-1);
751 }
752 if( needCopyBtnJs ){
753 cgi_append_content(builtin_text("copybtn.js"),-1);
754 }
 
 
 
755 for(i=0; i<nJsToLoad; i++){
756 cgi_append_content(builtin_text(azJsToLoad[i]),-1);
757 }
758 if( blob_size(&blobOnLoad)>0 ){
759 @ window.onload = function(){
760
--- src/style.c
+++ src/style.c
@@ -91,10 +91,11 @@
91 */
92 static int needHrefJs = 0; /* href.js */
93 static int needSortJs = 0; /* sorttable.js */
94 static int needGraphJs = 0; /* graph.js */
95 static int needCopyBtnJs = 0; /* copybtn.js */
96 static int needAccordionJs = 0; /* accordion.js */
97
98 /*
99 ** Extra JS added to the end of the file.
100 */
101 static Blob blobOnLoad = BLOB_INITIALIZER;
@@ -680,10 +681,17 @@
681 ** Indicate that the table-sorting javascript is needed.
682 */
683 void style_table_sorter(void){
684 needSortJs = 1;
685 }
686
687 /*
688 ** Indicate that the accordion javascript is needed.
689 */
690 void style_accordion(void){
691 needAccordionJs = 1;
692 }
693
694 /*
695 ** Indicate that the timeline graph javascript is needed.
696 */
697 void style_graph_generator(void){
@@ -750,10 +758,13 @@
758 cgi_append_content(builtin_text("graph.js"),-1);
759 }
760 if( needCopyBtnJs ){
761 cgi_append_content(builtin_text("copybtn.js"),-1);
762 }
763 if( needAccordionJs ){
764 cgi_append_content(builtin_text("accordion.js"),-1);
765 }
766 for(i=0; i<nJsToLoad; i++){
767 cgi_append_content(builtin_text(azJsToLoad[i]),-1);
768 }
769 if( blob_size(&blobOnLoad)>0 ){
770 @ window.onload = function(){
771
+11
--- src/style.c
+++ src/style.c
@@ -91,10 +91,11 @@
9191
*/
9292
static int needHrefJs = 0; /* href.js */
9393
static int needSortJs = 0; /* sorttable.js */
9494
static int needGraphJs = 0; /* graph.js */
9595
static int needCopyBtnJs = 0; /* copybtn.js */
96
+static int needAccordionJs = 0; /* accordion.js */
9697
9798
/*
9899
** Extra JS added to the end of the file.
99100
*/
100101
static Blob blobOnLoad = BLOB_INITIALIZER;
@@ -680,10 +681,17 @@
680681
** Indicate that the table-sorting javascript is needed.
681682
*/
682683
void style_table_sorter(void){
683684
needSortJs = 1;
684685
}
686
+
687
+/*
688
+** Indicate that the accordion javascript is needed.
689
+*/
690
+void style_accordion(void){
691
+ needAccordionJs = 1;
692
+}
685693
686694
/*
687695
** Indicate that the timeline graph javascript is needed.
688696
*/
689697
void style_graph_generator(void){
@@ -750,10 +758,13 @@
750758
cgi_append_content(builtin_text("graph.js"),-1);
751759
}
752760
if( needCopyBtnJs ){
753761
cgi_append_content(builtin_text("copybtn.js"),-1);
754762
}
763
+ if( needAccordionJs ){
764
+ cgi_append_content(builtin_text("accordion.js"),-1);
765
+ }
755766
for(i=0; i<nJsToLoad; i++){
756767
cgi_append_content(builtin_text(azJsToLoad[i]),-1);
757768
}
758769
if( blob_size(&blobOnLoad)>0 ){
759770
@ window.onload = function(){
760771
--- src/style.c
+++ src/style.c
@@ -91,10 +91,11 @@
91 */
92 static int needHrefJs = 0; /* href.js */
93 static int needSortJs = 0; /* sorttable.js */
94 static int needGraphJs = 0; /* graph.js */
95 static int needCopyBtnJs = 0; /* copybtn.js */
 
96
97 /*
98 ** Extra JS added to the end of the file.
99 */
100 static Blob blobOnLoad = BLOB_INITIALIZER;
@@ -680,10 +681,17 @@
680 ** Indicate that the table-sorting javascript is needed.
681 */
682 void style_table_sorter(void){
683 needSortJs = 1;
684 }
 
 
 
 
 
 
 
685
686 /*
687 ** Indicate that the timeline graph javascript is needed.
688 */
689 void style_graph_generator(void){
@@ -750,10 +758,13 @@
750 cgi_append_content(builtin_text("graph.js"),-1);
751 }
752 if( needCopyBtnJs ){
753 cgi_append_content(builtin_text("copybtn.js"),-1);
754 }
 
 
 
755 for(i=0; i<nJsToLoad; i++){
756 cgi_append_content(builtin_text(azJsToLoad[i]),-1);
757 }
758 if( blob_size(&blobOnLoad)>0 ){
759 @ window.onload = function(){
760
--- src/style.c
+++ src/style.c
@@ -91,10 +91,11 @@
91 */
92 static int needHrefJs = 0; /* href.js */
93 static int needSortJs = 0; /* sorttable.js */
94 static int needGraphJs = 0; /* graph.js */
95 static int needCopyBtnJs = 0; /* copybtn.js */
96 static int needAccordionJs = 0; /* accordion.js */
97
98 /*
99 ** Extra JS added to the end of the file.
100 */
101 static Blob blobOnLoad = BLOB_INITIALIZER;
@@ -680,10 +681,17 @@
681 ** Indicate that the table-sorting javascript is needed.
682 */
683 void style_table_sorter(void){
684 needSortJs = 1;
685 }
686
687 /*
688 ** Indicate that the accordion javascript is needed.
689 */
690 void style_accordion(void){
691 needAccordionJs = 1;
692 }
693
694 /*
695 ** Indicate that the timeline graph javascript is needed.
696 */
697 void style_graph_generator(void){
@@ -750,10 +758,13 @@
758 cgi_append_content(builtin_text("graph.js"),-1);
759 }
760 if( needCopyBtnJs ){
761 cgi_append_content(builtin_text("copybtn.js"),-1);
762 }
763 if( needAccordionJs ){
764 cgi_append_content(builtin_text("accordion.js"),-1);
765 }
766 for(i=0; i<nJsToLoad; i++){
767 cgi_append_content(builtin_text(azJsToLoad[i]),-1);
768 }
769 if( blob_size(&blobOnLoad)>0 ){
770 @ window.onload = function(){
771
+1 -1
--- src/timeline.c
+++ src/timeline.c
@@ -798,11 +798,11 @@
798798
if( pPost ){
799799
const char *zClass = "forumTimeline";
800800
if( forum_rid_has_been_edited(rid) ){
801801
zClass = "forumTimeline forumObs";
802802
}
803
- forum_render(0, pPost->zMimetype, pPost->zWiki, zClass);
803
+ forum_render(0, pPost->zMimetype, pPost->zWiki, zClass, 1);
804804
manifest_destroy(pPost);
805805
}
806806
}
807807
}
808808
if( suppressCnt ){
809809
--- src/timeline.c
+++ src/timeline.c
@@ -798,11 +798,11 @@
798 if( pPost ){
799 const char *zClass = "forumTimeline";
800 if( forum_rid_has_been_edited(rid) ){
801 zClass = "forumTimeline forumObs";
802 }
803 forum_render(0, pPost->zMimetype, pPost->zWiki, zClass);
804 manifest_destroy(pPost);
805 }
806 }
807 }
808 if( suppressCnt ){
809
--- src/timeline.c
+++ src/timeline.c
@@ -798,11 +798,11 @@
798 if( pPost ){
799 const char *zClass = "forumTimeline";
800 if( forum_rid_has_been_edited(rid) ){
801 zClass = "forumTimeline forumObs";
802 }
803 forum_render(0, pPost->zMimetype, pPost->zWiki, zClass, 1);
804 manifest_destroy(pPost);
805 }
806 }
807 }
808 if( suppressCnt ){
809
+1 -1
--- src/timeline.c
+++ src/timeline.c
@@ -798,11 +798,11 @@
798798
if( pPost ){
799799
const char *zClass = "forumTimeline";
800800
if( forum_rid_has_been_edited(rid) ){
801801
zClass = "forumTimeline forumObs";
802802
}
803
- forum_render(0, pPost->zMimetype, pPost->zWiki, zClass);
803
+ forum_render(0, pPost->zMimetype, pPost->zWiki, zClass, 1);
804804
manifest_destroy(pPost);
805805
}
806806
}
807807
}
808808
if( suppressCnt ){
809809
--- src/timeline.c
+++ src/timeline.c
@@ -798,11 +798,11 @@
798 if( pPost ){
799 const char *zClass = "forumTimeline";
800 if( forum_rid_has_been_edited(rid) ){
801 zClass = "forumTimeline forumObs";
802 }
803 forum_render(0, pPost->zMimetype, pPost->zWiki, zClass);
804 manifest_destroy(pPost);
805 }
806 }
807 }
808 if( suppressCnt ){
809
--- src/timeline.c
+++ src/timeline.c
@@ -798,11 +798,11 @@
798 if( pPost ){
799 const char *zClass = "forumTimeline";
800 if( forum_rid_has_been_edited(rid) ){
801 zClass = "forumTimeline forumObs";
802 }
803 forum_render(0, pPost->zMimetype, pPost->zWiki, zClass, 1);
804 manifest_destroy(pPost);
805 }
806 }
807 }
808 if( suppressCnt ){
809
+49 -25
--- src/wiki.c
+++ src/wiki.c
@@ -394,40 +394,58 @@
394394
return WIKITYPE_NORMAL;
395395
}
396396
397397
/*
398398
** Add an appropriate style_header() for either the /wiki or /wikiedit page
399
-** for zPageName.
399
+** for zPageName. zExtra is an empty string for /wiki but has the text
400
+** "Edit: " for /wikiedit.
401
+**
402
+** If the page is /wiki and the page is one of the special times (check-in,
403
+** branch, or tag) and the "p" query parameter is omitted, then do a
404
+** redirect to the display of the check-in, branch, or tag rather than
405
+** continuing to the plain wiki display.
400406
*/
401407
static int wiki_page_header(
402
- int eType, /* Page type. -1 for unknown */
408
+ int eType, /* Page type. Might be WIKITYPE_UNKNOWN */
403409
const char *zPageName, /* Name of the page */
404410
const char *zExtra /* Extra prefix text on the page header */
405411
){
406
- if( eType<0 ) eType = wiki_page_type(zPageName);
412
+ if( eType==WIKITYPE_UNKNOWN ) eType = wiki_page_type(zPageName);
407413
switch( eType ){
408414
case WIKITYPE_NORMAL: {
409415
style_header("%s%s", zExtra, zPageName);
410416
break;
411417
}
412418
case WIKITYPE_CHECKIN: {
413419
zPageName += 8;
414
- style_header("Notes About Checkin %S", zPageName);
415
- style_submenu_element("Checkin Timeline","%R/timeline?f=%s", zPageName);
416
- style_submenu_element("Checkin Info","%R/info/%s", zPageName);
420
+ if( zExtra[0]==0 && !P("p") ){
421
+ cgi_redirectf("%R/info/%s",zPageName);
422
+ }else{
423
+ style_header("Notes About Checkin %S", zPageName);
424
+ style_submenu_element("Checkin Timeline","%R/timeline?f=%s", zPageName);
425
+ style_submenu_element("Checkin Info","%R/info/%s", zPageName);
426
+ }
417427
break;
418428
}
419429
case WIKITYPE_BRANCH: {
420430
zPageName += 7;
421
- style_header("Notes About Branch %h", zPageName);
422
- style_submenu_element("Branch Timeline","%R/timeline?r=%t", zPageName);
431
+ if( zExtra[0]==0 && !P("p") ){
432
+ cgi_redirectf("%R/timeline?r=%t", zPageName);
433
+ }else{
434
+ style_header("Notes About Branch %h", zPageName);
435
+ style_submenu_element("Branch Timeline","%R/timeline?r=%t", zPageName);
436
+ }
423437
break;
424438
}
425439
case WIKITYPE_TAG: {
426440
zPageName += 4;
427
- style_header("Notes About Tag %h", zPageName);
428
- style_submenu_element("Tag Timeline","%R/timeline?t=%t",zPageName);
441
+ if( zExtra[0]==0 && !P("p") ){
442
+ cgi_redirectf("%R/timeline?t=%t",zPageName);
443
+ }else{
444
+ style_header("Notes About Tag %h", zPageName);
445
+ style_submenu_element("Tag Timeline","%R/timeline?t=%t",zPageName);
446
+ }
429447
break;
430448
}
431449
}
432450
return eType;
433451
}
@@ -459,11 +477,14 @@
459477
**
460478
** Query parameters:
461479
**
462480
** name=NAME Name of the wiki page to display. Required.
463481
** nsm Omit the submenu if present. (Mnemonic: No SubMenu)
464
-**
482
+** p Always show just the wiki page. For special
483
+** pages for check-ins, branches, or tags, there will
484
+** be a redirect to the associated /info page unless
485
+** this query parameter is present.
465486
*/
466487
void wiki_page(void){
467488
char *zTag;
468489
int rid = 0;
469490
int isSandbox;
@@ -1713,28 +1734,28 @@
17131734
const char *zPrefix, /* "branch", "tag", or "checkin" */
17141735
const char *zName, /* Name of the object */
17151736
unsigned int mFlags /* Zero or more WIKIASSOC_* flags */
17161737
){
17171738
if( (mFlags & WIKIASSOC_FULL_TITLE)==0 ){
1718
- @ <div class="section">About</div>
1739
+ @ <div class="section accordion">About</div>
17191740
}else if( zPrefix[0]=='c' ){ /* checkin/... */
1720
- @ <div class="section">About checkin %.20h(zName)</div>
1741
+ @ <div class="section accordion">About checkin %.20h(zName)</div>
17211742
}else{
1722
- @ <div class="section">About %s(zPrefix) %h(zName)</div>
1743
+ @ <div class="section accordion">About %s(zPrefix) %h(zName)</div>
17231744
}
17241745
}
17251746
17261747
/*
17271748
** Add an "Wiki" button in a submenu that links to the read-wiki page.
17281749
*/
1729
-static void wiki_submenu_to_read_wiki(
1750
+static void wiki_submenu_to_edit_wiki(
17301751
const char *zPrefix, /* "branch", "tag", or "checkin" */
17311752
const char *zName, /* Name of the object */
17321753
unsigned int mFlags /* Zero or more WIKIASSOC_* flags */
17331754
){
17341755
if( g.perm.RdWiki && (mFlags & WIKIASSOC_MENU_READ)!=0 ){
1735
- style_submenu_element("Wiki", "%R/wiki?name=%s/%t", zPrefix, zName);
1756
+ style_submenu_element("Wiki", "%R/wikiedit?name=%s/%t", zPrefix, zName);
17361757
}
17371758
}
17381759
17391760
/*
17401761
** Check to see if there exists a wiki page with a name zPrefix/zName.
@@ -1770,44 +1791,47 @@
17701791
Blob title = BLOB_INITIALIZER;
17711792
Blob markdown;
17721793
blob_init(&markdown, pWiki->zWiki, -1);
17731794
markdown_to_html(&markdown, &title, &tail);
17741795
if( blob_size(&title) ){
1775
- @ <div class="section">%h(blob_str(&title))</div>
1796
+ @ <div class="section accordion">%h(blob_str(&title))</div>
17761797
}else{
17771798
wiki_section_label(zPrefix, zName, mFlags);
17781799
}
1779
- wiki_submenu_to_read_wiki(zPrefix, zName, mFlags);
1800
+ wiki_submenu_to_edit_wiki(zPrefix, zName, mFlags);
1801
+ @ <div class="accordion_panel">
17801802
convert_href_and_output(&tail);
1803
+ @ </div>
17811804
blob_reset(&tail);
17821805
blob_reset(&title);
17831806
blob_reset(&markdown);
17841807
}else if( fossil_strcmp(pWiki->zMimetype, "text/plain")==0 ){
17851808
wiki_section_label(zPrefix, zName, mFlags);
1786
- wiki_submenu_to_read_wiki(zPrefix, zName, mFlags);
1787
- @ <pre>
1809
+ wiki_submenu_to_edit_wiki(zPrefix, zName, mFlags);
1810
+ @ <div class="accordion_panel"><pre>
17881811
@ %h(pWiki->zWiki)
1789
- @ </pre>
1812
+ @ </pre></div>
17901813
}else{
17911814
Blob tail = BLOB_INITIALIZER;
17921815
Blob title = BLOB_INITIALIZER;
17931816
Blob wiki;
17941817
Blob *pBody;
17951818
blob_init(&wiki, pWiki->zWiki, -1);
17961819
if( wiki_find_title(&wiki, &title, &tail) ){
1797
- @ <div class="section">%h(blob_str(&title))</div>
1820
+ @ <div class="section accordion">%h(blob_str(&title))</div>
17981821
pBody = &tail;
17991822
}else{
18001823
wiki_section_label(zPrefix, zName, mFlags);
18011824
pBody = &wiki;
18021825
}
1803
- wiki_submenu_to_read_wiki(zPrefix, zName, mFlags);
1804
- @ <div class="wiki">
1826
+ wiki_submenu_to_edit_wiki(zPrefix, zName, mFlags);
1827
+ @ <div class="accordion_panel"><div class="wiki">
18051828
wiki_convert(pBody, 0, WIKI_BUTTONS);
1806
- @ </div>
1829
+ @ </div></div>
18071830
blob_reset(&tail);
18081831
blob_reset(&title);
18091832
blob_reset(&wiki);
18101833
}
18111834
manifest_destroy(pWiki);
1835
+ style_accordion();
18121836
return 1;
18131837
}
18141838
--- src/wiki.c
+++ src/wiki.c
@@ -394,40 +394,58 @@
394 return WIKITYPE_NORMAL;
395 }
396
397 /*
398 ** Add an appropriate style_header() for either the /wiki or /wikiedit page
399 ** for zPageName.
 
 
 
 
 
 
400 */
401 static int wiki_page_header(
402 int eType, /* Page type. -1 for unknown */
403 const char *zPageName, /* Name of the page */
404 const char *zExtra /* Extra prefix text on the page header */
405 ){
406 if( eType<0 ) eType = wiki_page_type(zPageName);
407 switch( eType ){
408 case WIKITYPE_NORMAL: {
409 style_header("%s%s", zExtra, zPageName);
410 break;
411 }
412 case WIKITYPE_CHECKIN: {
413 zPageName += 8;
414 style_header("Notes About Checkin %S", zPageName);
415 style_submenu_element("Checkin Timeline","%R/timeline?f=%s", zPageName);
416 style_submenu_element("Checkin Info","%R/info/%s", zPageName);
 
 
 
 
417 break;
418 }
419 case WIKITYPE_BRANCH: {
420 zPageName += 7;
421 style_header("Notes About Branch %h", zPageName);
422 style_submenu_element("Branch Timeline","%R/timeline?r=%t", zPageName);
 
 
 
 
423 break;
424 }
425 case WIKITYPE_TAG: {
426 zPageName += 4;
427 style_header("Notes About Tag %h", zPageName);
428 style_submenu_element("Tag Timeline","%R/timeline?t=%t",zPageName);
 
 
 
 
429 break;
430 }
431 }
432 return eType;
433 }
@@ -459,11 +477,14 @@
459 **
460 ** Query parameters:
461 **
462 ** name=NAME Name of the wiki page to display. Required.
463 ** nsm Omit the submenu if present. (Mnemonic: No SubMenu)
464 **
 
 
 
465 */
466 void wiki_page(void){
467 char *zTag;
468 int rid = 0;
469 int isSandbox;
@@ -1713,28 +1734,28 @@
1713 const char *zPrefix, /* "branch", "tag", or "checkin" */
1714 const char *zName, /* Name of the object */
1715 unsigned int mFlags /* Zero or more WIKIASSOC_* flags */
1716 ){
1717 if( (mFlags & WIKIASSOC_FULL_TITLE)==0 ){
1718 @ <div class="section">About</div>
1719 }else if( zPrefix[0]=='c' ){ /* checkin/... */
1720 @ <div class="section">About checkin %.20h(zName)</div>
1721 }else{
1722 @ <div class="section">About %s(zPrefix) %h(zName)</div>
1723 }
1724 }
1725
1726 /*
1727 ** Add an "Wiki" button in a submenu that links to the read-wiki page.
1728 */
1729 static void wiki_submenu_to_read_wiki(
1730 const char *zPrefix, /* "branch", "tag", or "checkin" */
1731 const char *zName, /* Name of the object */
1732 unsigned int mFlags /* Zero or more WIKIASSOC_* flags */
1733 ){
1734 if( g.perm.RdWiki && (mFlags & WIKIASSOC_MENU_READ)!=0 ){
1735 style_submenu_element("Wiki", "%R/wiki?name=%s/%t", zPrefix, zName);
1736 }
1737 }
1738
1739 /*
1740 ** Check to see if there exists a wiki page with a name zPrefix/zName.
@@ -1770,44 +1791,47 @@
1770 Blob title = BLOB_INITIALIZER;
1771 Blob markdown;
1772 blob_init(&markdown, pWiki->zWiki, -1);
1773 markdown_to_html(&markdown, &title, &tail);
1774 if( blob_size(&title) ){
1775 @ <div class="section">%h(blob_str(&title))</div>
1776 }else{
1777 wiki_section_label(zPrefix, zName, mFlags);
1778 }
1779 wiki_submenu_to_read_wiki(zPrefix, zName, mFlags);
 
1780 convert_href_and_output(&tail);
 
1781 blob_reset(&tail);
1782 blob_reset(&title);
1783 blob_reset(&markdown);
1784 }else if( fossil_strcmp(pWiki->zMimetype, "text/plain")==0 ){
1785 wiki_section_label(zPrefix, zName, mFlags);
1786 wiki_submenu_to_read_wiki(zPrefix, zName, mFlags);
1787 @ <pre>
1788 @ %h(pWiki->zWiki)
1789 @ </pre>
1790 }else{
1791 Blob tail = BLOB_INITIALIZER;
1792 Blob title = BLOB_INITIALIZER;
1793 Blob wiki;
1794 Blob *pBody;
1795 blob_init(&wiki, pWiki->zWiki, -1);
1796 if( wiki_find_title(&wiki, &title, &tail) ){
1797 @ <div class="section">%h(blob_str(&title))</div>
1798 pBody = &tail;
1799 }else{
1800 wiki_section_label(zPrefix, zName, mFlags);
1801 pBody = &wiki;
1802 }
1803 wiki_submenu_to_read_wiki(zPrefix, zName, mFlags);
1804 @ <div class="wiki">
1805 wiki_convert(pBody, 0, WIKI_BUTTONS);
1806 @ </div>
1807 blob_reset(&tail);
1808 blob_reset(&title);
1809 blob_reset(&wiki);
1810 }
1811 manifest_destroy(pWiki);
 
1812 return 1;
1813 }
1814
--- src/wiki.c
+++ src/wiki.c
@@ -394,40 +394,58 @@
394 return WIKITYPE_NORMAL;
395 }
396
397 /*
398 ** Add an appropriate style_header() for either the /wiki or /wikiedit page
399 ** for zPageName. zExtra is an empty string for /wiki but has the text
400 ** "Edit: " for /wikiedit.
401 **
402 ** If the page is /wiki and the page is one of the special times (check-in,
403 ** branch, or tag) and the "p" query parameter is omitted, then do a
404 ** redirect to the display of the check-in, branch, or tag rather than
405 ** continuing to the plain wiki display.
406 */
407 static int wiki_page_header(
408 int eType, /* Page type. Might be WIKITYPE_UNKNOWN */
409 const char *zPageName, /* Name of the page */
410 const char *zExtra /* Extra prefix text on the page header */
411 ){
412 if( eType==WIKITYPE_UNKNOWN ) eType = wiki_page_type(zPageName);
413 switch( eType ){
414 case WIKITYPE_NORMAL: {
415 style_header("%s%s", zExtra, zPageName);
416 break;
417 }
418 case WIKITYPE_CHECKIN: {
419 zPageName += 8;
420 if( zExtra[0]==0 && !P("p") ){
421 cgi_redirectf("%R/info/%s",zPageName);
422 }else{
423 style_header("Notes About Checkin %S", zPageName);
424 style_submenu_element("Checkin Timeline","%R/timeline?f=%s", zPageName);
425 style_submenu_element("Checkin Info","%R/info/%s", zPageName);
426 }
427 break;
428 }
429 case WIKITYPE_BRANCH: {
430 zPageName += 7;
431 if( zExtra[0]==0 && !P("p") ){
432 cgi_redirectf("%R/timeline?r=%t", zPageName);
433 }else{
434 style_header("Notes About Branch %h", zPageName);
435 style_submenu_element("Branch Timeline","%R/timeline?r=%t", zPageName);
436 }
437 break;
438 }
439 case WIKITYPE_TAG: {
440 zPageName += 4;
441 if( zExtra[0]==0 && !P("p") ){
442 cgi_redirectf("%R/timeline?t=%t",zPageName);
443 }else{
444 style_header("Notes About Tag %h", zPageName);
445 style_submenu_element("Tag Timeline","%R/timeline?t=%t",zPageName);
446 }
447 break;
448 }
449 }
450 return eType;
451 }
@@ -459,11 +477,14 @@
477 **
478 ** Query parameters:
479 **
480 ** name=NAME Name of the wiki page to display. Required.
481 ** nsm Omit the submenu if present. (Mnemonic: No SubMenu)
482 ** p Always show just the wiki page. For special
483 ** pages for check-ins, branches, or tags, there will
484 ** be a redirect to the associated /info page unless
485 ** this query parameter is present.
486 */
487 void wiki_page(void){
488 char *zTag;
489 int rid = 0;
490 int isSandbox;
@@ -1713,28 +1734,28 @@
1734 const char *zPrefix, /* "branch", "tag", or "checkin" */
1735 const char *zName, /* Name of the object */
1736 unsigned int mFlags /* Zero or more WIKIASSOC_* flags */
1737 ){
1738 if( (mFlags & WIKIASSOC_FULL_TITLE)==0 ){
1739 @ <div class="section accordion">About</div>
1740 }else if( zPrefix[0]=='c' ){ /* checkin/... */
1741 @ <div class="section accordion">About checkin %.20h(zName)</div>
1742 }else{
1743 @ <div class="section accordion">About %s(zPrefix) %h(zName)</div>
1744 }
1745 }
1746
1747 /*
1748 ** Add an "Wiki" button in a submenu that links to the read-wiki page.
1749 */
1750 static void wiki_submenu_to_edit_wiki(
1751 const char *zPrefix, /* "branch", "tag", or "checkin" */
1752 const char *zName, /* Name of the object */
1753 unsigned int mFlags /* Zero or more WIKIASSOC_* flags */
1754 ){
1755 if( g.perm.RdWiki && (mFlags & WIKIASSOC_MENU_READ)!=0 ){
1756 style_submenu_element("Wiki", "%R/wikiedit?name=%s/%t", zPrefix, zName);
1757 }
1758 }
1759
1760 /*
1761 ** Check to see if there exists a wiki page with a name zPrefix/zName.
@@ -1770,44 +1791,47 @@
1791 Blob title = BLOB_INITIALIZER;
1792 Blob markdown;
1793 blob_init(&markdown, pWiki->zWiki, -1);
1794 markdown_to_html(&markdown, &title, &tail);
1795 if( blob_size(&title) ){
1796 @ <div class="section accordion">%h(blob_str(&title))</div>
1797 }else{
1798 wiki_section_label(zPrefix, zName, mFlags);
1799 }
1800 wiki_submenu_to_edit_wiki(zPrefix, zName, mFlags);
1801 @ <div class="accordion_panel">
1802 convert_href_and_output(&tail);
1803 @ </div>
1804 blob_reset(&tail);
1805 blob_reset(&title);
1806 blob_reset(&markdown);
1807 }else if( fossil_strcmp(pWiki->zMimetype, "text/plain")==0 ){
1808 wiki_section_label(zPrefix, zName, mFlags);
1809 wiki_submenu_to_edit_wiki(zPrefix, zName, mFlags);
1810 @ <div class="accordion_panel"><pre>
1811 @ %h(pWiki->zWiki)
1812 @ </pre></div>
1813 }else{
1814 Blob tail = BLOB_INITIALIZER;
1815 Blob title = BLOB_INITIALIZER;
1816 Blob wiki;
1817 Blob *pBody;
1818 blob_init(&wiki, pWiki->zWiki, -1);
1819 if( wiki_find_title(&wiki, &title, &tail) ){
1820 @ <div class="section accordion">%h(blob_str(&title))</div>
1821 pBody = &tail;
1822 }else{
1823 wiki_section_label(zPrefix, zName, mFlags);
1824 pBody = &wiki;
1825 }
1826 wiki_submenu_to_edit_wiki(zPrefix, zName, mFlags);
1827 @ <div class="accordion_panel"><div class="wiki">
1828 wiki_convert(pBody, 0, WIKI_BUTTONS);
1829 @ </div></div>
1830 blob_reset(&tail);
1831 blob_reset(&title);
1832 blob_reset(&wiki);
1833 }
1834 manifest_destroy(pWiki);
1835 style_accordion();
1836 return 1;
1837 }
1838
+49 -25
--- src/wiki.c
+++ src/wiki.c
@@ -394,40 +394,58 @@
394394
return WIKITYPE_NORMAL;
395395
}
396396
397397
/*
398398
** Add an appropriate style_header() for either the /wiki or /wikiedit page
399
-** for zPageName.
399
+** for zPageName. zExtra is an empty string for /wiki but has the text
400
+** "Edit: " for /wikiedit.
401
+**
402
+** If the page is /wiki and the page is one of the special times (check-in,
403
+** branch, or tag) and the "p" query parameter is omitted, then do a
404
+** redirect to the display of the check-in, branch, or tag rather than
405
+** continuing to the plain wiki display.
400406
*/
401407
static int wiki_page_header(
402
- int eType, /* Page type. -1 for unknown */
408
+ int eType, /* Page type. Might be WIKITYPE_UNKNOWN */
403409
const char *zPageName, /* Name of the page */
404410
const char *zExtra /* Extra prefix text on the page header */
405411
){
406
- if( eType<0 ) eType = wiki_page_type(zPageName);
412
+ if( eType==WIKITYPE_UNKNOWN ) eType = wiki_page_type(zPageName);
407413
switch( eType ){
408414
case WIKITYPE_NORMAL: {
409415
style_header("%s%s", zExtra, zPageName);
410416
break;
411417
}
412418
case WIKITYPE_CHECKIN: {
413419
zPageName += 8;
414
- style_header("Notes About Checkin %S", zPageName);
415
- style_submenu_element("Checkin Timeline","%R/timeline?f=%s", zPageName);
416
- style_submenu_element("Checkin Info","%R/info/%s", zPageName);
420
+ if( zExtra[0]==0 && !P("p") ){
421
+ cgi_redirectf("%R/info/%s",zPageName);
422
+ }else{
423
+ style_header("Notes About Checkin %S", zPageName);
424
+ style_submenu_element("Checkin Timeline","%R/timeline?f=%s", zPageName);
425
+ style_submenu_element("Checkin Info","%R/info/%s", zPageName);
426
+ }
417427
break;
418428
}
419429
case WIKITYPE_BRANCH: {
420430
zPageName += 7;
421
- style_header("Notes About Branch %h", zPageName);
422
- style_submenu_element("Branch Timeline","%R/timeline?r=%t", zPageName);
431
+ if( zExtra[0]==0 && !P("p") ){
432
+ cgi_redirectf("%R/timeline?r=%t", zPageName);
433
+ }else{
434
+ style_header("Notes About Branch %h", zPageName);
435
+ style_submenu_element("Branch Timeline","%R/timeline?r=%t", zPageName);
436
+ }
423437
break;
424438
}
425439
case WIKITYPE_TAG: {
426440
zPageName += 4;
427
- style_header("Notes About Tag %h", zPageName);
428
- style_submenu_element("Tag Timeline","%R/timeline?t=%t",zPageName);
441
+ if( zExtra[0]==0 && !P("p") ){
442
+ cgi_redirectf("%R/timeline?t=%t",zPageName);
443
+ }else{
444
+ style_header("Notes About Tag %h", zPageName);
445
+ style_submenu_element("Tag Timeline","%R/timeline?t=%t",zPageName);
446
+ }
429447
break;
430448
}
431449
}
432450
return eType;
433451
}
@@ -459,11 +477,14 @@
459477
**
460478
** Query parameters:
461479
**
462480
** name=NAME Name of the wiki page to display. Required.
463481
** nsm Omit the submenu if present. (Mnemonic: No SubMenu)
464
-**
482
+** p Always show just the wiki page. For special
483
+** pages for check-ins, branches, or tags, there will
484
+** be a redirect to the associated /info page unless
485
+** this query parameter is present.
465486
*/
466487
void wiki_page(void){
467488
char *zTag;
468489
int rid = 0;
469490
int isSandbox;
@@ -1713,28 +1734,28 @@
17131734
const char *zPrefix, /* "branch", "tag", or "checkin" */
17141735
const char *zName, /* Name of the object */
17151736
unsigned int mFlags /* Zero or more WIKIASSOC_* flags */
17161737
){
17171738
if( (mFlags & WIKIASSOC_FULL_TITLE)==0 ){
1718
- @ <div class="section">About</div>
1739
+ @ <div class="section accordion">About</div>
17191740
}else if( zPrefix[0]=='c' ){ /* checkin/... */
1720
- @ <div class="section">About checkin %.20h(zName)</div>
1741
+ @ <div class="section accordion">About checkin %.20h(zName)</div>
17211742
}else{
1722
- @ <div class="section">About %s(zPrefix) %h(zName)</div>
1743
+ @ <div class="section accordion">About %s(zPrefix) %h(zName)</div>
17231744
}
17241745
}
17251746
17261747
/*
17271748
** Add an "Wiki" button in a submenu that links to the read-wiki page.
17281749
*/
1729
-static void wiki_submenu_to_read_wiki(
1750
+static void wiki_submenu_to_edit_wiki(
17301751
const char *zPrefix, /* "branch", "tag", or "checkin" */
17311752
const char *zName, /* Name of the object */
17321753
unsigned int mFlags /* Zero or more WIKIASSOC_* flags */
17331754
){
17341755
if( g.perm.RdWiki && (mFlags & WIKIASSOC_MENU_READ)!=0 ){
1735
- style_submenu_element("Wiki", "%R/wiki?name=%s/%t", zPrefix, zName);
1756
+ style_submenu_element("Wiki", "%R/wikiedit?name=%s/%t", zPrefix, zName);
17361757
}
17371758
}
17381759
17391760
/*
17401761
** Check to see if there exists a wiki page with a name zPrefix/zName.
@@ -1770,44 +1791,47 @@
17701791
Blob title = BLOB_INITIALIZER;
17711792
Blob markdown;
17721793
blob_init(&markdown, pWiki->zWiki, -1);
17731794
markdown_to_html(&markdown, &title, &tail);
17741795
if( blob_size(&title) ){
1775
- @ <div class="section">%h(blob_str(&title))</div>
1796
+ @ <div class="section accordion">%h(blob_str(&title))</div>
17761797
}else{
17771798
wiki_section_label(zPrefix, zName, mFlags);
17781799
}
1779
- wiki_submenu_to_read_wiki(zPrefix, zName, mFlags);
1800
+ wiki_submenu_to_edit_wiki(zPrefix, zName, mFlags);
1801
+ @ <div class="accordion_panel">
17801802
convert_href_and_output(&tail);
1803
+ @ </div>
17811804
blob_reset(&tail);
17821805
blob_reset(&title);
17831806
blob_reset(&markdown);
17841807
}else if( fossil_strcmp(pWiki->zMimetype, "text/plain")==0 ){
17851808
wiki_section_label(zPrefix, zName, mFlags);
1786
- wiki_submenu_to_read_wiki(zPrefix, zName, mFlags);
1787
- @ <pre>
1809
+ wiki_submenu_to_edit_wiki(zPrefix, zName, mFlags);
1810
+ @ <div class="accordion_panel"><pre>
17881811
@ %h(pWiki->zWiki)
1789
- @ </pre>
1812
+ @ </pre></div>
17901813
}else{
17911814
Blob tail = BLOB_INITIALIZER;
17921815
Blob title = BLOB_INITIALIZER;
17931816
Blob wiki;
17941817
Blob *pBody;
17951818
blob_init(&wiki, pWiki->zWiki, -1);
17961819
if( wiki_find_title(&wiki, &title, &tail) ){
1797
- @ <div class="section">%h(blob_str(&title))</div>
1820
+ @ <div class="section accordion">%h(blob_str(&title))</div>
17981821
pBody = &tail;
17991822
}else{
18001823
wiki_section_label(zPrefix, zName, mFlags);
18011824
pBody = &wiki;
18021825
}
1803
- wiki_submenu_to_read_wiki(zPrefix, zName, mFlags);
1804
- @ <div class="wiki">
1826
+ wiki_submenu_to_edit_wiki(zPrefix, zName, mFlags);
1827
+ @ <div class="accordion_panel"><div class="wiki">
18051828
wiki_convert(pBody, 0, WIKI_BUTTONS);
1806
- @ </div>
1829
+ @ </div></div>
18071830
blob_reset(&tail);
18081831
blob_reset(&title);
18091832
blob_reset(&wiki);
18101833
}
18111834
manifest_destroy(pWiki);
1835
+ style_accordion();
18121836
return 1;
18131837
}
18141838
--- src/wiki.c
+++ src/wiki.c
@@ -394,40 +394,58 @@
394 return WIKITYPE_NORMAL;
395 }
396
397 /*
398 ** Add an appropriate style_header() for either the /wiki or /wikiedit page
399 ** for zPageName.
 
 
 
 
 
 
400 */
401 static int wiki_page_header(
402 int eType, /* Page type. -1 for unknown */
403 const char *zPageName, /* Name of the page */
404 const char *zExtra /* Extra prefix text on the page header */
405 ){
406 if( eType<0 ) eType = wiki_page_type(zPageName);
407 switch( eType ){
408 case WIKITYPE_NORMAL: {
409 style_header("%s%s", zExtra, zPageName);
410 break;
411 }
412 case WIKITYPE_CHECKIN: {
413 zPageName += 8;
414 style_header("Notes About Checkin %S", zPageName);
415 style_submenu_element("Checkin Timeline","%R/timeline?f=%s", zPageName);
416 style_submenu_element("Checkin Info","%R/info/%s", zPageName);
 
 
 
 
417 break;
418 }
419 case WIKITYPE_BRANCH: {
420 zPageName += 7;
421 style_header("Notes About Branch %h", zPageName);
422 style_submenu_element("Branch Timeline","%R/timeline?r=%t", zPageName);
 
 
 
 
423 break;
424 }
425 case WIKITYPE_TAG: {
426 zPageName += 4;
427 style_header("Notes About Tag %h", zPageName);
428 style_submenu_element("Tag Timeline","%R/timeline?t=%t",zPageName);
 
 
 
 
429 break;
430 }
431 }
432 return eType;
433 }
@@ -459,11 +477,14 @@
459 **
460 ** Query parameters:
461 **
462 ** name=NAME Name of the wiki page to display. Required.
463 ** nsm Omit the submenu if present. (Mnemonic: No SubMenu)
464 **
 
 
 
465 */
466 void wiki_page(void){
467 char *zTag;
468 int rid = 0;
469 int isSandbox;
@@ -1713,28 +1734,28 @@
1713 const char *zPrefix, /* "branch", "tag", or "checkin" */
1714 const char *zName, /* Name of the object */
1715 unsigned int mFlags /* Zero or more WIKIASSOC_* flags */
1716 ){
1717 if( (mFlags & WIKIASSOC_FULL_TITLE)==0 ){
1718 @ <div class="section">About</div>
1719 }else if( zPrefix[0]=='c' ){ /* checkin/... */
1720 @ <div class="section">About checkin %.20h(zName)</div>
1721 }else{
1722 @ <div class="section">About %s(zPrefix) %h(zName)</div>
1723 }
1724 }
1725
1726 /*
1727 ** Add an "Wiki" button in a submenu that links to the read-wiki page.
1728 */
1729 static void wiki_submenu_to_read_wiki(
1730 const char *zPrefix, /* "branch", "tag", or "checkin" */
1731 const char *zName, /* Name of the object */
1732 unsigned int mFlags /* Zero or more WIKIASSOC_* flags */
1733 ){
1734 if( g.perm.RdWiki && (mFlags & WIKIASSOC_MENU_READ)!=0 ){
1735 style_submenu_element("Wiki", "%R/wiki?name=%s/%t", zPrefix, zName);
1736 }
1737 }
1738
1739 /*
1740 ** Check to see if there exists a wiki page with a name zPrefix/zName.
@@ -1770,44 +1791,47 @@
1770 Blob title = BLOB_INITIALIZER;
1771 Blob markdown;
1772 blob_init(&markdown, pWiki->zWiki, -1);
1773 markdown_to_html(&markdown, &title, &tail);
1774 if( blob_size(&title) ){
1775 @ <div class="section">%h(blob_str(&title))</div>
1776 }else{
1777 wiki_section_label(zPrefix, zName, mFlags);
1778 }
1779 wiki_submenu_to_read_wiki(zPrefix, zName, mFlags);
 
1780 convert_href_and_output(&tail);
 
1781 blob_reset(&tail);
1782 blob_reset(&title);
1783 blob_reset(&markdown);
1784 }else if( fossil_strcmp(pWiki->zMimetype, "text/plain")==0 ){
1785 wiki_section_label(zPrefix, zName, mFlags);
1786 wiki_submenu_to_read_wiki(zPrefix, zName, mFlags);
1787 @ <pre>
1788 @ %h(pWiki->zWiki)
1789 @ </pre>
1790 }else{
1791 Blob tail = BLOB_INITIALIZER;
1792 Blob title = BLOB_INITIALIZER;
1793 Blob wiki;
1794 Blob *pBody;
1795 blob_init(&wiki, pWiki->zWiki, -1);
1796 if( wiki_find_title(&wiki, &title, &tail) ){
1797 @ <div class="section">%h(blob_str(&title))</div>
1798 pBody = &tail;
1799 }else{
1800 wiki_section_label(zPrefix, zName, mFlags);
1801 pBody = &wiki;
1802 }
1803 wiki_submenu_to_read_wiki(zPrefix, zName, mFlags);
1804 @ <div class="wiki">
1805 wiki_convert(pBody, 0, WIKI_BUTTONS);
1806 @ </div>
1807 blob_reset(&tail);
1808 blob_reset(&title);
1809 blob_reset(&wiki);
1810 }
1811 manifest_destroy(pWiki);
 
1812 return 1;
1813 }
1814
--- src/wiki.c
+++ src/wiki.c
@@ -394,40 +394,58 @@
394 return WIKITYPE_NORMAL;
395 }
396
397 /*
398 ** Add an appropriate style_header() for either the /wiki or /wikiedit page
399 ** for zPageName. zExtra is an empty string for /wiki but has the text
400 ** "Edit: " for /wikiedit.
401 **
402 ** If the page is /wiki and the page is one of the special times (check-in,
403 ** branch, or tag) and the "p" query parameter is omitted, then do a
404 ** redirect to the display of the check-in, branch, or tag rather than
405 ** continuing to the plain wiki display.
406 */
407 static int wiki_page_header(
408 int eType, /* Page type. Might be WIKITYPE_UNKNOWN */
409 const char *zPageName, /* Name of the page */
410 const char *zExtra /* Extra prefix text on the page header */
411 ){
412 if( eType==WIKITYPE_UNKNOWN ) eType = wiki_page_type(zPageName);
413 switch( eType ){
414 case WIKITYPE_NORMAL: {
415 style_header("%s%s", zExtra, zPageName);
416 break;
417 }
418 case WIKITYPE_CHECKIN: {
419 zPageName += 8;
420 if( zExtra[0]==0 && !P("p") ){
421 cgi_redirectf("%R/info/%s",zPageName);
422 }else{
423 style_header("Notes About Checkin %S", zPageName);
424 style_submenu_element("Checkin Timeline","%R/timeline?f=%s", zPageName);
425 style_submenu_element("Checkin Info","%R/info/%s", zPageName);
426 }
427 break;
428 }
429 case WIKITYPE_BRANCH: {
430 zPageName += 7;
431 if( zExtra[0]==0 && !P("p") ){
432 cgi_redirectf("%R/timeline?r=%t", zPageName);
433 }else{
434 style_header("Notes About Branch %h", zPageName);
435 style_submenu_element("Branch Timeline","%R/timeline?r=%t", zPageName);
436 }
437 break;
438 }
439 case WIKITYPE_TAG: {
440 zPageName += 4;
441 if( zExtra[0]==0 && !P("p") ){
442 cgi_redirectf("%R/timeline?t=%t",zPageName);
443 }else{
444 style_header("Notes About Tag %h", zPageName);
445 style_submenu_element("Tag Timeline","%R/timeline?t=%t",zPageName);
446 }
447 break;
448 }
449 }
450 return eType;
451 }
@@ -459,11 +477,14 @@
477 **
478 ** Query parameters:
479 **
480 ** name=NAME Name of the wiki page to display. Required.
481 ** nsm Omit the submenu if present. (Mnemonic: No SubMenu)
482 ** p Always show just the wiki page. For special
483 ** pages for check-ins, branches, or tags, there will
484 ** be a redirect to the associated /info page unless
485 ** this query parameter is present.
486 */
487 void wiki_page(void){
488 char *zTag;
489 int rid = 0;
490 int isSandbox;
@@ -1713,28 +1734,28 @@
1734 const char *zPrefix, /* "branch", "tag", or "checkin" */
1735 const char *zName, /* Name of the object */
1736 unsigned int mFlags /* Zero or more WIKIASSOC_* flags */
1737 ){
1738 if( (mFlags & WIKIASSOC_FULL_TITLE)==0 ){
1739 @ <div class="section accordion">About</div>
1740 }else if( zPrefix[0]=='c' ){ /* checkin/... */
1741 @ <div class="section accordion">About checkin %.20h(zName)</div>
1742 }else{
1743 @ <div class="section accordion">About %s(zPrefix) %h(zName)</div>
1744 }
1745 }
1746
1747 /*
1748 ** Add an "Wiki" button in a submenu that links to the read-wiki page.
1749 */
1750 static void wiki_submenu_to_edit_wiki(
1751 const char *zPrefix, /* "branch", "tag", or "checkin" */
1752 const char *zName, /* Name of the object */
1753 unsigned int mFlags /* Zero or more WIKIASSOC_* flags */
1754 ){
1755 if( g.perm.RdWiki && (mFlags & WIKIASSOC_MENU_READ)!=0 ){
1756 style_submenu_element("Wiki", "%R/wikiedit?name=%s/%t", zPrefix, zName);
1757 }
1758 }
1759
1760 /*
1761 ** Check to see if there exists a wiki page with a name zPrefix/zName.
@@ -1770,44 +1791,47 @@
1791 Blob title = BLOB_INITIALIZER;
1792 Blob markdown;
1793 blob_init(&markdown, pWiki->zWiki, -1);
1794 markdown_to_html(&markdown, &title, &tail);
1795 if( blob_size(&title) ){
1796 @ <div class="section accordion">%h(blob_str(&title))</div>
1797 }else{
1798 wiki_section_label(zPrefix, zName, mFlags);
1799 }
1800 wiki_submenu_to_edit_wiki(zPrefix, zName, mFlags);
1801 @ <div class="accordion_panel">
1802 convert_href_and_output(&tail);
1803 @ </div>
1804 blob_reset(&tail);
1805 blob_reset(&title);
1806 blob_reset(&markdown);
1807 }else if( fossil_strcmp(pWiki->zMimetype, "text/plain")==0 ){
1808 wiki_section_label(zPrefix, zName, mFlags);
1809 wiki_submenu_to_edit_wiki(zPrefix, zName, mFlags);
1810 @ <div class="accordion_panel"><pre>
1811 @ %h(pWiki->zWiki)
1812 @ </pre></div>
1813 }else{
1814 Blob tail = BLOB_INITIALIZER;
1815 Blob title = BLOB_INITIALIZER;
1816 Blob wiki;
1817 Blob *pBody;
1818 blob_init(&wiki, pWiki->zWiki, -1);
1819 if( wiki_find_title(&wiki, &title, &tail) ){
1820 @ <div class="section accordion">%h(blob_str(&title))</div>
1821 pBody = &tail;
1822 }else{
1823 wiki_section_label(zPrefix, zName, mFlags);
1824 pBody = &wiki;
1825 }
1826 wiki_submenu_to_edit_wiki(zPrefix, zName, mFlags);
1827 @ <div class="accordion_panel"><div class="wiki">
1828 wiki_convert(pBody, 0, WIKI_BUTTONS);
1829 @ </div></div>
1830 blob_reset(&tail);
1831 blob_reset(&title);
1832 blob_reset(&wiki);
1833 }
1834 manifest_destroy(pWiki);
1835 style_accordion();
1836 return 1;
1837 }
1838
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -174,11 +174,11 @@
174174
#### The directories where the OpenSSL include and library files are located.
175175
# The recommended usage here is to use the Sysinternals junction tool
176176
# to create a hard link between an "openssl-1.x" sub-directory of the
177177
# Fossil source code directory and the target OpenSSL source directory.
178178
#
179
-OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1e
179
+OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1f
180180
OPENSSLINCDIR = $(OPENSSLDIR)/include
181181
OPENSSLLIBDIR = $(OPENSSLDIR)
182182
183183
#### Either the directory where the Tcl library is installed or the Tcl
184184
# source code directory resides (depending on the value of the macro
@@ -633,10 +633,11 @@
633633
$(SRCDIR)/../skins/rounded1/header.txt \
634634
$(SRCDIR)/../skins/xekri/css.txt \
635635
$(SRCDIR)/../skins/xekri/details.txt \
636636
$(SRCDIR)/../skins/xekri/footer.txt \
637637
$(SRCDIR)/../skins/xekri/header.txt \
638
+ $(SRCDIR)/accordion.js \
638639
$(SRCDIR)/ci_edit.js \
639640
$(SRCDIR)/copybtn.js \
640641
$(SRCDIR)/diff.tcl \
641642
$(SRCDIR)/forum.js \
642643
$(SRCDIR)/graph.js \
643644
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -174,11 +174,11 @@
174 #### The directories where the OpenSSL include and library files are located.
175 # The recommended usage here is to use the Sysinternals junction tool
176 # to create a hard link between an "openssl-1.x" sub-directory of the
177 # Fossil source code directory and the target OpenSSL source directory.
178 #
179 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1e
180 OPENSSLINCDIR = $(OPENSSLDIR)/include
181 OPENSSLLIBDIR = $(OPENSSLDIR)
182
183 #### Either the directory where the Tcl library is installed or the Tcl
184 # source code directory resides (depending on the value of the macro
@@ -633,10 +633,11 @@
633 $(SRCDIR)/../skins/rounded1/header.txt \
634 $(SRCDIR)/../skins/xekri/css.txt \
635 $(SRCDIR)/../skins/xekri/details.txt \
636 $(SRCDIR)/../skins/xekri/footer.txt \
637 $(SRCDIR)/../skins/xekri/header.txt \
 
638 $(SRCDIR)/ci_edit.js \
639 $(SRCDIR)/copybtn.js \
640 $(SRCDIR)/diff.tcl \
641 $(SRCDIR)/forum.js \
642 $(SRCDIR)/graph.js \
643
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -174,11 +174,11 @@
174 #### The directories where the OpenSSL include and library files are located.
175 # The recommended usage here is to use the Sysinternals junction tool
176 # to create a hard link between an "openssl-1.x" sub-directory of the
177 # Fossil source code directory and the target OpenSSL source directory.
178 #
179 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1f
180 OPENSSLINCDIR = $(OPENSSLDIR)/include
181 OPENSSLLIBDIR = $(OPENSSLDIR)
182
183 #### Either the directory where the Tcl library is installed or the Tcl
184 # source code directory resides (depending on the value of the macro
@@ -633,10 +633,11 @@
633 $(SRCDIR)/../skins/rounded1/header.txt \
634 $(SRCDIR)/../skins/xekri/css.txt \
635 $(SRCDIR)/../skins/xekri/details.txt \
636 $(SRCDIR)/../skins/xekri/footer.txt \
637 $(SRCDIR)/../skins/xekri/header.txt \
638 $(SRCDIR)/accordion.js \
639 $(SRCDIR)/ci_edit.js \
640 $(SRCDIR)/copybtn.js \
641 $(SRCDIR)/diff.tcl \
642 $(SRCDIR)/forum.js \
643 $(SRCDIR)/graph.js \
644
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -174,11 +174,11 @@
174174
#### The directories where the OpenSSL include and library files are located.
175175
# The recommended usage here is to use the Sysinternals junction tool
176176
# to create a hard link between an "openssl-1.x" sub-directory of the
177177
# Fossil source code directory and the target OpenSSL source directory.
178178
#
179
-OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1e
179
+OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1f
180180
OPENSSLINCDIR = $(OPENSSLDIR)/include
181181
OPENSSLLIBDIR = $(OPENSSLDIR)
182182
183183
#### Either the directory where the Tcl library is installed or the Tcl
184184
# source code directory resides (depending on the value of the macro
185185
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -174,11 +174,11 @@
174 #### The directories where the OpenSSL include and library files are located.
175 # The recommended usage here is to use the Sysinternals junction tool
176 # to create a hard link between an "openssl-1.x" sub-directory of the
177 # Fossil source code directory and the target OpenSSL source directory.
178 #
179 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1e
180 OPENSSLINCDIR = $(OPENSSLDIR)/include
181 OPENSSLLIBDIR = $(OPENSSLDIR)
182
183 #### Either the directory where the Tcl library is installed or the Tcl
184 # source code directory resides (depending on the value of the macro
185
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -174,11 +174,11 @@
174 #### The directories where the OpenSSL include and library files are located.
175 # The recommended usage here is to use the Sysinternals junction tool
176 # to create a hard link between an "openssl-1.x" sub-directory of the
177 # Fossil source code directory and the target OpenSSL source directory.
178 #
179 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1f
180 OPENSSLINCDIR = $(OPENSSLDIR)/include
181 OPENSSLLIBDIR = $(OPENSSLDIR)
182
183 #### Either the directory where the Tcl library is installed or the Tcl
184 # source code directory resides (depending on the value of the macro
185
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -98,11 +98,11 @@
9898
!ifndef USE_SEE
9999
USE_SEE = 0
100100
!endif
101101
102102
!if $(FOSSIL_ENABLE_SSL)!=0
103
-SSLDIR = $(B)\compat\openssl-1.1.1e
103
+SSLDIR = $(B)\compat\openssl-1.1.1f
104104
SSLINCDIR = $(SSLDIR)\include
105105
!if $(FOSSIL_DYNAMIC_BUILD)!=0
106106
SSLLIBDIR = $(SSLDIR)
107107
!else
108108
SSLLIBDIR = $(SSLDIR)
@@ -540,10 +540,11 @@
540540
$(SRCDIR)\..\skins\rounded1\header.txt \
541541
$(SRCDIR)\..\skins\xekri\css.txt \
542542
$(SRCDIR)\..\skins\xekri\details.txt \
543543
$(SRCDIR)\..\skins\xekri\footer.txt \
544544
$(SRCDIR)\..\skins\xekri\header.txt \
545
+ $(SRCDIR)\accordion.js \
545546
$(SRCDIR)\ci_edit.js \
546547
$(SRCDIR)\copybtn.js \
547548
$(SRCDIR)\diff.tcl \
548549
$(SRCDIR)\forum.js \
549550
$(SRCDIR)\graph.js \
550551
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -98,11 +98,11 @@
98 !ifndef USE_SEE
99 USE_SEE = 0
100 !endif
101
102 !if $(FOSSIL_ENABLE_SSL)!=0
103 SSLDIR = $(B)\compat\openssl-1.1.1e
104 SSLINCDIR = $(SSLDIR)\include
105 !if $(FOSSIL_DYNAMIC_BUILD)!=0
106 SSLLIBDIR = $(SSLDIR)
107 !else
108 SSLLIBDIR = $(SSLDIR)
@@ -540,10 +540,11 @@
540 $(SRCDIR)\..\skins\rounded1\header.txt \
541 $(SRCDIR)\..\skins\xekri\css.txt \
542 $(SRCDIR)\..\skins\xekri\details.txt \
543 $(SRCDIR)\..\skins\xekri\footer.txt \
544 $(SRCDIR)\..\skins\xekri\header.txt \
 
545 $(SRCDIR)\ci_edit.js \
546 $(SRCDIR)\copybtn.js \
547 $(SRCDIR)\diff.tcl \
548 $(SRCDIR)\forum.js \
549 $(SRCDIR)\graph.js \
550
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -98,11 +98,11 @@
98 !ifndef USE_SEE
99 USE_SEE = 0
100 !endif
101
102 !if $(FOSSIL_ENABLE_SSL)!=0
103 SSLDIR = $(B)\compat\openssl-1.1.1f
104 SSLINCDIR = $(SSLDIR)\include
105 !if $(FOSSIL_DYNAMIC_BUILD)!=0
106 SSLLIBDIR = $(SSLDIR)
107 !else
108 SSLLIBDIR = $(SSLDIR)
@@ -540,10 +540,11 @@
540 $(SRCDIR)\..\skins\rounded1\header.txt \
541 $(SRCDIR)\..\skins\xekri\css.txt \
542 $(SRCDIR)\..\skins\xekri\details.txt \
543 $(SRCDIR)\..\skins\xekri\footer.txt \
544 $(SRCDIR)\..\skins\xekri\header.txt \
545 $(SRCDIR)\accordion.js \
546 $(SRCDIR)\ci_edit.js \
547 $(SRCDIR)\copybtn.js \
548 $(SRCDIR)\diff.tcl \
549 $(SRCDIR)\forum.js \
550 $(SRCDIR)\graph.js \
551
--- www/antibot.wiki
+++ www/antibot.wiki
@@ -1,11 +1,11 @@
11
<title>Defense Against Spiders</title>
22
33
The website presented by a Fossil server has many hyperlinks.
44
Even a modest project can have millions of pages in its
55
tree, and many of those pages (for example diffs and annotations
6
-and ZIP archive of older check-ins) can be expensive to compute.
6
+and ZIP archives of older check-ins) can be expensive to compute.
77
If a spider or bot tries to walk a website implemented by
88
Fossil, it can present a crippling bandwidth and CPU load.
99
1010
The website presented by a Fossil server is intended to be used
1111
interactively by humans, not walked by spiders. This article
1212
--- www/antibot.wiki
+++ www/antibot.wiki
@@ -1,11 +1,11 @@
1 <title>Defense Against Spiders</title>
2
3 The website presented by a Fossil server has many hyperlinks.
4 Even a modest project can have millions of pages in its
5 tree, and many of those pages (for example diffs and annotations
6 and ZIP archive of older check-ins) can be expensive to compute.
7 If a spider or bot tries to walk a website implemented by
8 Fossil, it can present a crippling bandwidth and CPU load.
9
10 The website presented by a Fossil server is intended to be used
11 interactively by humans, not walked by spiders. This article
12
--- www/antibot.wiki
+++ www/antibot.wiki
@@ -1,11 +1,11 @@
1 <title>Defense Against Spiders</title>
2
3 The website presented by a Fossil server has many hyperlinks.
4 Even a modest project can have millions of pages in its
5 tree, and many of those pages (for example diffs and annotations
6 and ZIP archives of older check-ins) can be expensive to compute.
7 If a spider or bot tries to walk a website implemented by
8 Fossil, it can present a crippling bandwidth and CPU load.
9
10 The website presented by a Fossil server is intended to be used
11 interactively by humans, not walked by spiders. This article
12
+1 -1
--- www/build.wiki
+++ www/build.wiki
@@ -161,11 +161,11 @@
161161
the optional <a href="https://www.openssl.org/">OpenSSL</a> support,
162162
first <a href="https://www.openssl.org/source/">download the official
163163
source code for OpenSSL</a> and extract it to an appropriately named
164164
"<b>openssl-X.Y.ZA</b>" subdirectory within the local
165165
[/tree?ci=trunk&name=compat | compat] directory (e.g.
166
-"<b>compat/openssl-1.1.1e</b>"), then make sure that some recent
166
+"<b>compat/openssl-1.1.1f</b>"), then make sure that some recent
167167
<a href="http://www.perl.org/">Perl</a> binaries are installed locally,
168168
and finally run one of the following commands:
169169
<blockquote><pre>
170170
nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin
171171
</pre></blockquote>
172172
173173
ADDED www/css-tricks.md
--- www/build.wiki
+++ www/build.wiki
@@ -161,11 +161,11 @@
161 the optional <a href="https://www.openssl.org/">OpenSSL</a> support,
162 first <a href="https://www.openssl.org/source/">download the official
163 source code for OpenSSL</a> and extract it to an appropriately named
164 "<b>openssl-X.Y.ZA</b>" subdirectory within the local
165 [/tree?ci=trunk&name=compat | compat] directory (e.g.
166 "<b>compat/openssl-1.1.1e</b>"), then make sure that some recent
167 <a href="http://www.perl.org/">Perl</a> binaries are installed locally,
168 and finally run one of the following commands:
169 <blockquote><pre>
170 nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin
171 </pre></blockquote>
172
173 DDED www/css-tricks.md
--- www/build.wiki
+++ www/build.wiki
@@ -161,11 +161,11 @@
161 the optional <a href="https://www.openssl.org/">OpenSSL</a> support,
162 first <a href="https://www.openssl.org/source/">download the official
163 source code for OpenSSL</a> and extract it to an appropriately named
164 "<b>openssl-X.Y.ZA</b>" subdirectory within the local
165 [/tree?ci=trunk&name=compat | compat] directory (e.g.
166 "<b>compat/openssl-1.1.1f</b>"), then make sure that some recent
167 <a href="http://www.perl.org/">Perl</a> binaries are installed locally,
168 and finally run one of the following commands:
169 <blockquote><pre>
170 nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin
171 </pre></blockquote>
172
173 DDED www/css-tricks.md
--- a/www/css-tricks.md
+++ b/www/css-tricks.md
@@ -0,0 +1,35 @@
1
+# Fossil CSS Tips and Tricks
2
+
3
+Many Overriding Default Rules
4
+
5
+One behavior of the skinning system works considerably differently
6
+from the cascading nature of CSS: if a skin appliand Tricks
7
+
8
+Many has a built-in default value, Fossil elides the entire
9
+default definition for that rule. i.e., the skin's definition is the
10
+only one which is applied, rather than cascading the definition from
11
+the default value.
12
+
13
+For example, if Fossil has a default CSS rule which looks like:
14
+
15
+```css
16
+div.foo {
17
+ font-size: 120%;
18
+ margin-left: 1em;
19
+}
20
+```
21
+
22
+And a skin has:
23
+
24
+```css
25
+div.foo {}
26
+```
27
+
28
+Then Fossil will *not* emit its default rule and the user's copy will
29
+become the only definition of that CSS rule. This is different from
30
+normal CSS cascading rules, in which the above sequence would result
31
+in, effectively, the top set of rules being applied because the second
32
+(empty) one does not override anything from the first.
33
+
34
+If a skin applies a given selector more than once, or imports external
35
+style sheets which do, those cascade following CSS's normal rulesr
--- a/www/css-tricks.md
+++ b/www/css-tricks.md
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/www/css-tricks.md
+++ b/www/css-tricks.md
@@ -0,0 +1,35 @@
1 # Fossil CSS Tips and Tricks
2
3 Many Overriding Default Rules
4
5 One behavior of the skinning system works considerably differently
6 from the cascading nature of CSS: if a skin appliand Tricks
7
8 Many has a built-in default value, Fossil elides the entire
9 default definition for that rule. i.e., the skin's definition is the
10 only one which is applied, rather than cascading the definition from
11 the default value.
12
13 For example, if Fossil has a default CSS rule which looks like:
14
15 ```css
16 div.foo {
17 font-size: 120%;
18 margin-left: 1em;
19 }
20 ```
21
22 And a skin has:
23
24 ```css
25 div.foo {}
26 ```
27
28 Then Fossil will *not* emit its default rule and the user's copy will
29 become the only definition of that CSS rule. This is different from
30 normal CSS cascading rules, in which the above sequence would result
31 in, effectively, the top set of rules being applied because the second
32 (empty) one does not override anything from the first.
33
34 If a skin applies a given selector more than once, or imports external
35 style sheets which do, those cascade following CSS's normal rulesr
+2 -2
--- www/defcsp.md
+++ www/defcsp.md
@@ -319,20 +319,20 @@
319319
320320
The best place to do that is from the [`th1-setup`
321321
script](./th1-hooks.md), which runs before TH1 processing happens during
322322
skin processing:
323323
324
- $ fossil set th1-setup "set default_csp {default-src: 'self'}"
324
+ $ fossil set th1-setup "set default_csp {default-src 'self'}"
325325
326326
This is the cleanest method, allowing you to set a custom CSP without
327327
recompiling Fossil or providing a hand-written `<head>` section in the
328328
Header section of a custom skin.
329329
330330
You can’t remove the CSP entirely with this method, but you can get the
331331
same effect by telling the browser there are no content restrictions:
332332
333
- $ fossil set th1-setup 'set default_csp {default-src: *}'
333
+ $ fossil set th1-setup 'set default_csp {default-src *}'
334334
335335
336336
### <a name="header"></a>Custom Skin Header
337337
338338
Fossil only inserts a CSP into the HTML pages it generates when the
339339
--- www/defcsp.md
+++ www/defcsp.md
@@ -319,20 +319,20 @@
319
320 The best place to do that is from the [`th1-setup`
321 script](./th1-hooks.md), which runs before TH1 processing happens during
322 skin processing:
323
324 $ fossil set th1-setup "set default_csp {default-src: 'self'}"
325
326 This is the cleanest method, allowing you to set a custom CSP without
327 recompiling Fossil or providing a hand-written `<head>` section in the
328 Header section of a custom skin.
329
330 You can’t remove the CSP entirely with this method, but you can get the
331 same effect by telling the browser there are no content restrictions:
332
333 $ fossil set th1-setup 'set default_csp {default-src: *}'
334
335
336 ### <a name="header"></a>Custom Skin Header
337
338 Fossil only inserts a CSP into the HTML pages it generates when the
339
--- www/defcsp.md
+++ www/defcsp.md
@@ -319,20 +319,20 @@
319
320 The best place to do that is from the [`th1-setup`
321 script](./th1-hooks.md), which runs before TH1 processing happens during
322 skin processing:
323
324 $ fossil set th1-setup "set default_csp {default-src 'self'}"
325
326 This is the cleanest method, allowing you to set a custom CSP without
327 recompiling Fossil or providing a hand-written `<head>` section in the
328 Header section of a custom skin.
329
330 You can’t remove the CSP entirely with this method, but you can get the
331 same effect by telling the browser there are no content restrictions:
332
333 $ fossil set th1-setup 'set default_csp {default-src *}'
334
335
336 ### <a name="header"></a>Custom Skin Header
337
338 Fossil only inserts a CSP into the HTML pages it generates when the
339
+3 -1
--- www/faq.wiki
+++ www/faq.wiki
@@ -1,9 +1,11 @@
11
<title>Fossil FAQ</title>
22
<h1 align="center">Frequently Asked Questions</h1>
33
4
-<p>Note: See also <a href="qandc.wiki">Questions and Criticisms</a>.
4
+<p>Note:
5
+This page is old and has not been kept up-to-date. See the
6
+[/finfo?name=www/faq.wiki|change history of this page].</p>
57
68
<ol>
79
<li><a href="#q1">What GUIs are available for fossil?</a></li>
810
<li><a href="#q2">What is the difference between a "branch" and a "fork"?</a></li>
911
<li><a href="#q3">How do I create a new branch?</a></li>
1012
1113
ADDED www/history.md
--- www/faq.wiki
+++ www/faq.wiki
@@ -1,9 +1,11 @@
1 <title>Fossil FAQ</title>
2 <h1 align="center">Frequently Asked Questions</h1>
3
4 <p>Note: See also <a href="qandc.wiki">Questions and Criticisms</a>.
 
 
5
6 <ol>
7 <li><a href="#q1">What GUIs are available for fossil?</a></li>
8 <li><a href="#q2">What is the difference between a "branch" and a "fork"?</a></li>
9 <li><a href="#q3">How do I create a new branch?</a></li>
10
11 DDED www/history.md
--- www/faq.wiki
+++ www/faq.wiki
@@ -1,9 +1,11 @@
1 <title>Fossil FAQ</title>
2 <h1 align="center">Frequently Asked Questions</h1>
3
4 <p>Note:
5 This page is old and has not been kept up-to-date. See the
6 [/finfo?name=www/faq.wiki|change history of this page].</p>
7
8 <ol>
9 <li><a href="#q1">What GUIs are available for fossil?</a></li>
10 <li><a href="#q2">What is the difference between a "branch" and a "fork"?</a></li>
11 <li><a href="#q3">How do I create a new branch?</a></li>
12
13 DDED www/history.md
--- a/www/history.md
+++ b/www/history.md
@@ -0,0 +1,3 @@
1
+# The History And Purpose Of Fossil
2
+
3
+Fossil is a [distributed versi
--- a/www/history.md
+++ b/www/history.md
@@ -0,0 +1,3 @@
 
 
 
--- a/www/history.md
+++ b/www/history.md
@@ -0,0 +1,3 @@
1 # The History And Purpose Of Fossil
2
3 Fossil is a [distributed versi
+5 -5
--- www/index.wiki
+++ www/index.wiki
@@ -108,15 +108,15 @@
108108
* Fossil contains a [./wikitheory.wiki | built-in wiki].
109109
* An [./event.wiki | Event] is a special kind of wiki page associated
110110
with a point in time rather than a name.
111111
* [./settings.wiki | Settings] control the behaviour of Fossil.
112112
* [./ssl.wiki | Use SSL] to encrypt communication with the server.
113
- * There is a
114
- [http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users | mailing list]
115
- (with publicly readable
116
- [http://www.mail-archive.com/[email protected] | archives])
117
- available for discussing Fossil issues.
113
+ * The [https://fossil-scm.org/forum|Fossil forum] is, as of mid-2018,
114
+ the project's central communication channel. The
115
+ [https://www.mail-archive.com/[email protected]
116
+ | read-only mailing list archives] house discussions spanning Fossil's
117
+ first decade.
118118
* [./stats.wiki | Performance statistics] taken from real-world projects
119119
hosted on Fossil.
120120
* How to [./shunning.wiki | delete content] from a Fossil repository.
121121
* How Fossil does [./password.wiki | password management].
122122
* On-line [/help | help].
123123
--- www/index.wiki
+++ www/index.wiki
@@ -108,15 +108,15 @@
108 * Fossil contains a [./wikitheory.wiki | built-in wiki].
109 * An [./event.wiki | Event] is a special kind of wiki page associated
110 with a point in time rather than a name.
111 * [./settings.wiki | Settings] control the behaviour of Fossil.
112 * [./ssl.wiki | Use SSL] to encrypt communication with the server.
113 * There is a
114 [http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users | mailing list]
115 (with publicly readable
116 [http://www.mail-archive.com/[email protected] | archives])
117 available for discussing Fossil issues.
118 * [./stats.wiki | Performance statistics] taken from real-world projects
119 hosted on Fossil.
120 * How to [./shunning.wiki | delete content] from a Fossil repository.
121 * How Fossil does [./password.wiki | password management].
122 * On-line [/help | help].
123
--- www/index.wiki
+++ www/index.wiki
@@ -108,15 +108,15 @@
108 * Fossil contains a [./wikitheory.wiki | built-in wiki].
109 * An [./event.wiki | Event] is a special kind of wiki page associated
110 with a point in time rather than a name.
111 * [./settings.wiki | Settings] control the behaviour of Fossil.
112 * [./ssl.wiki | Use SSL] to encrypt communication with the server.
113 * The [https://fossil-scm.org/forum|Fossil forum] is, as of mid-2018,
114 the project's central communication channel. The
115 [https://www.mail-archive.com/[email protected]
116 | read-only mailing list archives] house discussions spanning Fossil's
117 first decade.
118 * [./stats.wiki | Performance statistics] taken from real-world projects
119 hosted on Fossil.
120 * How to [./shunning.wiki | delete content] from a Fossil repository.
121 * How Fossil does [./password.wiki | password management].
122 * On-line [/help | help].
123
--- www/mkindex.tcl
+++ www/mkindex.tcl
@@ -28,10 +28,11 @@
2828
checkin.wiki {Check-in Checklist}
2929
childprojects.wiki {Child Projects}
3030
copyright-release.html {Contributor License Agreement}
3131
concepts.wiki {Fossil Core Concepts}
3232
contribute.wiki {Contributing Code or Documentation To The Fossil Project}
33
+ css-tricks.md {Fossil CSS Tips and Tricks}
3334
customgraph.md {Theming: Customizing the Timeline Graph}
3435
customskin.md {Theming: Customizing The Appearance of Web Pages}
3536
customskin.md {Custom Skins}
3637
custom_ticket.wiki {Customizing The Ticket System}
3738
defcsp.md {The Default Content Security Policy}
3839
--- www/mkindex.tcl
+++ www/mkindex.tcl
@@ -28,10 +28,11 @@
28 checkin.wiki {Check-in Checklist}
29 childprojects.wiki {Child Projects}
30 copyright-release.html {Contributor License Agreement}
31 concepts.wiki {Fossil Core Concepts}
32 contribute.wiki {Contributing Code or Documentation To The Fossil Project}
 
33 customgraph.md {Theming: Customizing the Timeline Graph}
34 customskin.md {Theming: Customizing The Appearance of Web Pages}
35 customskin.md {Custom Skins}
36 custom_ticket.wiki {Customizing The Ticket System}
37 defcsp.md {The Default Content Security Policy}
38
--- www/mkindex.tcl
+++ www/mkindex.tcl
@@ -28,10 +28,11 @@
28 checkin.wiki {Check-in Checklist}
29 childprojects.wiki {Child Projects}
30 copyright-release.html {Contributor License Agreement}
31 concepts.wiki {Fossil Core Concepts}
32 contribute.wiki {Contributing Code or Documentation To The Fossil Project}
33 css-tricks.md {Fossil CSS Tips and Tricks}
34 customgraph.md {Theming: Customizing the Timeline Graph}
35 customskin.md {Theming: Customizing The Appearance of Web Pages}
36 customskin.md {Custom Skins}
37 custom_ticket.wiki {Customizing The Ticket System}
38 defcsp.md {The Default Content Security Policy}
39
--- www/permutedindex.html
+++ www/permutedindex.html
@@ -76,10 +76,11 @@
7676
<li><a href="whyusefossil.wiki">Control &mdash; Benefits Of Version</a></li>
7777
<li><a href="concepts.wiki">Core Concepts &mdash; Fossil</a></li>
7878
<li><a href="newrepo.wiki">Create A New Fossil Repository &mdash; How To</a></li>
7979
<li><a href="private.wiki"><b>Creating, Syncing, and Deleting Private Branches</b></a></li>
8080
<li><a href="qandc.wiki">Criticisms &mdash; Questions And</a></li>
81
+<li><a href="css-tricks.md">CSS Tips and Tricks &mdash; Fossil</a></li>
8182
<li><a href="customskin.md"><b>Custom Skins</b></a></li>
8283
<li><a href="customskin.md">Customizing The Appearance of Web Pages &mdash; Theming:</a></li>
8384
<li><a href="custom_ticket.wiki"><b>Customizing The Ticket System</b></a></li>
8485
<li><a href="customgraph.md">Customizing the Timeline Graph &mdash; Theming:</a></li>
8586
<li><a href="tech_overview.wiki">Databases Used By Fossil &mdash; SQLite</a></li>
@@ -121,10 +122,11 @@
121122
<li><a href="../../../wiki_rules">Formatting Rules &mdash; Wiki</a></li>
122123
<li><a href="forum.wiki">Forums &mdash; Fossil</a></li>
123124
<li><a href="blockchain.md"><b>Fossil As Blockchain</b></a></li>
124125
<li><a href="changes.wiki"><b>Fossil Changelog</b></a></li>
125126
<li><a href="concepts.wiki"><b>Fossil Core Concepts</b></a></li>
127
+<li><a href="css-tricks.md"><b>Fossil CSS Tips and Tricks</b></a></li>
126128
<li><a href="delta_encoder_algorithm.wiki"><b>Fossil Delta Encoding Algorithm</b></a></li>
127129
<li><a href="delta_format.wiki"><b>Fossil Delta Format</b></a></li>
128130
<li><a href="hacker-howto.wiki"><b>Fossil Developers Guide</b></a></li>
129131
<li><a href="fileformat.wiki"><b>Fossil File Format</b></a></li>
130132
<li><a href="forum.wiki"><b>Fossil Forums</b></a></li>
@@ -284,12 +286,14 @@
284286
<li><a href="customgraph.md"><b>Theming: Customizing the Timeline Graph</b></a></li>
285287
<li><a href="theory1.wiki"><b>Thoughts On The Design Of The Fossil DVCS</b></a></li>
286288
<li><a href="custom_ticket.wiki">Ticket System &mdash; Customizing The</a></li>
287289
<li><a href="tickets.wiki">Ticket System &mdash; The Fossil</a></li>
288290
<li><a href="customgraph.md">Timeline Graph &mdash; Theming: Customizing the</a></li>
291
+<li><a href="css-tricks.md">Tips and Tricks &mdash; Fossil CSS</a></li>
289292
<li><a href="hints.wiki">Tips And Usage Hints &mdash; Fossil</a></li>
290293
<li><a href="bugtheory.wiki">Tracking In Fossil &mdash; Bug</a></li>
294
+<li><a href="css-tricks.md">Tricks &mdash; Fossil CSS Tips and</a></li>
291295
<li><a href="unvers.wiki"><b>Unversioned Files</b></a></li>
292296
<li><a href="fiveminutes.wiki"><b>Up and Running in 5 Minutes as a Single User</b></a></li>
293297
<li><a href="hints.wiki">Usage Hints &mdash; Fossil Tips And</a></li>
294298
<li><a href="javascript.md"><b>Use of JavaScript in Fossil</b></a></li>
295299
<li><a href="fiveminutes.wiki">User &mdash; Up and Running in 5 Minutes as a Single</a></li>
296300
--- www/permutedindex.html
+++ www/permutedindex.html
@@ -76,10 +76,11 @@
76 <li><a href="whyusefossil.wiki">Control &mdash; Benefits Of Version</a></li>
77 <li><a href="concepts.wiki">Core Concepts &mdash; Fossil</a></li>
78 <li><a href="newrepo.wiki">Create A New Fossil Repository &mdash; How To</a></li>
79 <li><a href="private.wiki"><b>Creating, Syncing, and Deleting Private Branches</b></a></li>
80 <li><a href="qandc.wiki">Criticisms &mdash; Questions And</a></li>
 
81 <li><a href="customskin.md"><b>Custom Skins</b></a></li>
82 <li><a href="customskin.md">Customizing The Appearance of Web Pages &mdash; Theming:</a></li>
83 <li><a href="custom_ticket.wiki"><b>Customizing The Ticket System</b></a></li>
84 <li><a href="customgraph.md">Customizing the Timeline Graph &mdash; Theming:</a></li>
85 <li><a href="tech_overview.wiki">Databases Used By Fossil &mdash; SQLite</a></li>
@@ -121,10 +122,11 @@
121 <li><a href="../../../wiki_rules">Formatting Rules &mdash; Wiki</a></li>
122 <li><a href="forum.wiki">Forums &mdash; Fossil</a></li>
123 <li><a href="blockchain.md"><b>Fossil As Blockchain</b></a></li>
124 <li><a href="changes.wiki"><b>Fossil Changelog</b></a></li>
125 <li><a href="concepts.wiki"><b>Fossil Core Concepts</b></a></li>
 
126 <li><a href="delta_encoder_algorithm.wiki"><b>Fossil Delta Encoding Algorithm</b></a></li>
127 <li><a href="delta_format.wiki"><b>Fossil Delta Format</b></a></li>
128 <li><a href="hacker-howto.wiki"><b>Fossil Developers Guide</b></a></li>
129 <li><a href="fileformat.wiki"><b>Fossil File Format</b></a></li>
130 <li><a href="forum.wiki"><b>Fossil Forums</b></a></li>
@@ -284,12 +286,14 @@
284 <li><a href="customgraph.md"><b>Theming: Customizing the Timeline Graph</b></a></li>
285 <li><a href="theory1.wiki"><b>Thoughts On The Design Of The Fossil DVCS</b></a></li>
286 <li><a href="custom_ticket.wiki">Ticket System &mdash; Customizing The</a></li>
287 <li><a href="tickets.wiki">Ticket System &mdash; The Fossil</a></li>
288 <li><a href="customgraph.md">Timeline Graph &mdash; Theming: Customizing the</a></li>
 
289 <li><a href="hints.wiki">Tips And Usage Hints &mdash; Fossil</a></li>
290 <li><a href="bugtheory.wiki">Tracking In Fossil &mdash; Bug</a></li>
 
291 <li><a href="unvers.wiki"><b>Unversioned Files</b></a></li>
292 <li><a href="fiveminutes.wiki"><b>Up and Running in 5 Minutes as a Single User</b></a></li>
293 <li><a href="hints.wiki">Usage Hints &mdash; Fossil Tips And</a></li>
294 <li><a href="javascript.md"><b>Use of JavaScript in Fossil</b></a></li>
295 <li><a href="fiveminutes.wiki">User &mdash; Up and Running in 5 Minutes as a Single</a></li>
296
--- www/permutedindex.html
+++ www/permutedindex.html
@@ -76,10 +76,11 @@
76 <li><a href="whyusefossil.wiki">Control &mdash; Benefits Of Version</a></li>
77 <li><a href="concepts.wiki">Core Concepts &mdash; Fossil</a></li>
78 <li><a href="newrepo.wiki">Create A New Fossil Repository &mdash; How To</a></li>
79 <li><a href="private.wiki"><b>Creating, Syncing, and Deleting Private Branches</b></a></li>
80 <li><a href="qandc.wiki">Criticisms &mdash; Questions And</a></li>
81 <li><a href="css-tricks.md">CSS Tips and Tricks &mdash; Fossil</a></li>
82 <li><a href="customskin.md"><b>Custom Skins</b></a></li>
83 <li><a href="customskin.md">Customizing The Appearance of Web Pages &mdash; Theming:</a></li>
84 <li><a href="custom_ticket.wiki"><b>Customizing The Ticket System</b></a></li>
85 <li><a href="customgraph.md">Customizing the Timeline Graph &mdash; Theming:</a></li>
86 <li><a href="tech_overview.wiki">Databases Used By Fossil &mdash; SQLite</a></li>
@@ -121,10 +122,11 @@
122 <li><a href="../../../wiki_rules">Formatting Rules &mdash; Wiki</a></li>
123 <li><a href="forum.wiki">Forums &mdash; Fossil</a></li>
124 <li><a href="blockchain.md"><b>Fossil As Blockchain</b></a></li>
125 <li><a href="changes.wiki"><b>Fossil Changelog</b></a></li>
126 <li><a href="concepts.wiki"><b>Fossil Core Concepts</b></a></li>
127 <li><a href="css-tricks.md"><b>Fossil CSS Tips and Tricks</b></a></li>
128 <li><a href="delta_encoder_algorithm.wiki"><b>Fossil Delta Encoding Algorithm</b></a></li>
129 <li><a href="delta_format.wiki"><b>Fossil Delta Format</b></a></li>
130 <li><a href="hacker-howto.wiki"><b>Fossil Developers Guide</b></a></li>
131 <li><a href="fileformat.wiki"><b>Fossil File Format</b></a></li>
132 <li><a href="forum.wiki"><b>Fossil Forums</b></a></li>
@@ -284,12 +286,14 @@
286 <li><a href="customgraph.md"><b>Theming: Customizing the Timeline Graph</b></a></li>
287 <li><a href="theory1.wiki"><b>Thoughts On The Design Of The Fossil DVCS</b></a></li>
288 <li><a href="custom_ticket.wiki">Ticket System &mdash; Customizing The</a></li>
289 <li><a href="tickets.wiki">Ticket System &mdash; The Fossil</a></li>
290 <li><a href="customgraph.md">Timeline Graph &mdash; Theming: Customizing the</a></li>
291 <li><a href="css-tricks.md">Tips and Tricks &mdash; Fossil CSS</a></li>
292 <li><a href="hints.wiki">Tips And Usage Hints &mdash; Fossil</a></li>
293 <li><a href="bugtheory.wiki">Tracking In Fossil &mdash; Bug</a></li>
294 <li><a href="css-tricks.md">Tricks &mdash; Fossil CSS Tips and</a></li>
295 <li><a href="unvers.wiki"><b>Unversioned Files</b></a></li>
296 <li><a href="fiveminutes.wiki"><b>Up and Running in 5 Minutes as a Single User</b></a></li>
297 <li><a href="hints.wiki">Usage Hints &mdash; Fossil Tips And</a></li>
298 <li><a href="javascript.md"><b>Use of JavaScript in Fossil</b></a></li>
299 <li><a href="fiveminutes.wiki">User &mdash; Up and Running in 5 Minutes as a Single</a></li>
300
+4 -4
--- www/qandc.wiki
+++ www/qandc.wiki
@@ -1,13 +1,13 @@
11
<title>Questions And Criticisms</title>
22
<nowiki>
33
<h1 align="center">Questions And Criticisms</h1>
44
5
-<p>This page is a collection of real questions and criticisms that have been
6
-raised against fossil together with responses from the program's author.</p>
7
-
8
-<p>Note: See also the <a href="faq.wiki">Frequently Asked Questions</a>.</p>
5
+<p>This page is a collection of real questions and criticisms that were
6
+raised against Fossil early in its history (circa 2008).
7
+This page is old and has not been kept up-to-date. See the
8
+</nowiki>[/finfo?name=www/qandc.wiki|change history of this page]<nowiki>.</p>
99
1010
<b>Fossil sounds like a lot of reinvention of the wheel.
1111
Why create your own DVCS when you could have reused mercurial?</b>
1212
1313
<blockquote>
1414
--- www/qandc.wiki
+++ www/qandc.wiki
@@ -1,13 +1,13 @@
1 <title>Questions And Criticisms</title>
2 <nowiki>
3 <h1 align="center">Questions And Criticisms</h1>
4
5 <p>This page is a collection of real questions and criticisms that have been
6 raised against fossil together with responses from the program's author.</p>
7
8 <p>Note: See also the <a href="faq.wiki">Frequently Asked Questions</a>.</p>
9
10 <b>Fossil sounds like a lot of reinvention of the wheel.
11 Why create your own DVCS when you could have reused mercurial?</b>
12
13 <blockquote>
14
--- www/qandc.wiki
+++ www/qandc.wiki
@@ -1,13 +1,13 @@
1 <title>Questions And Criticisms</title>
2 <nowiki>
3 <h1 align="center">Questions And Criticisms</h1>
4
5 <p>This page is a collection of real questions and criticisms that were
6 raised against Fossil early in its history (circa 2008).
7 This page is old and has not been kept up-to-date. See the
8 </nowiki>[/finfo?name=www/qandc.wiki|change history of this page]<nowiki>.</p>
9
10 <b>Fossil sounds like a lot of reinvention of the wheel.
11 Why create your own DVCS when you could have reused mercurial?</b>
12
13 <blockquote>
14
--- www/wikitheory.wiki
+++ www/wikitheory.wiki
@@ -73,13 +73,13 @@
7373
or "checkin/<i>HASH</i>" are associated with the corresponding
7474
branch or check-in. The wiki text appears in an "About" section of
7575
timelines and info screens. Examples:
7676
7777
* [/timeline?r=graph-test-branch] shows the text of the
78
- [/wiki?name=branch/graph-test-branch|branch/graph-test-branch]
78
+ [/wiki?name=branch/graph-test-branch&p|branch/graph-test-branch]
7979
wiki page at the top of the timeline
8080
* [/info/19c60b7fc9e2] shows the text of the
81
- [/wiki?name=checkin/19c60b7fc9e2400e56a6f938bbad0e34ca746ca2eabdecac10945539f1f5e8c6|checkin/19c60b7fc9e2...]
81
+ [/wiki?name=checkin/19c60b7fc9e2400e56a6f938bbad0e34ca746ca2eabdecac10945539f1f5e8c6&p|checkin/19c60b7fc9e2...]
8282
wiki page in the "About" section.
8383
8484
This special wiki pages are very useful for recording historical
8585
notes.
8686
--- www/wikitheory.wiki
+++ www/wikitheory.wiki
@@ -73,13 +73,13 @@
73 or "checkin/<i>HASH</i>" are associated with the corresponding
74 branch or check-in. The wiki text appears in an "About" section of
75 timelines and info screens. Examples:
76
77 * [/timeline?r=graph-test-branch] shows the text of the
78 [/wiki?name=branch/graph-test-branch|branch/graph-test-branch]
79 wiki page at the top of the timeline
80 * [/info/19c60b7fc9e2] shows the text of the
81 [/wiki?name=checkin/19c60b7fc9e2400e56a6f938bbad0e34ca746ca2eabdecac10945539f1f5e8c6|checkin/19c60b7fc9e2...]
82 wiki page in the "About" section.
83
84 This special wiki pages are very useful for recording historical
85 notes.
86
--- www/wikitheory.wiki
+++ www/wikitheory.wiki
@@ -73,13 +73,13 @@
73 or "checkin/<i>HASH</i>" are associated with the corresponding
74 branch or check-in. The wiki text appears in an "About" section of
75 timelines and info screens. Examples:
76
77 * [/timeline?r=graph-test-branch] shows the text of the
78 [/wiki?name=branch/graph-test-branch&p|branch/graph-test-branch]
79 wiki page at the top of the timeline
80 * [/info/19c60b7fc9e2] shows the text of the
81 [/wiki?name=checkin/19c60b7fc9e2400e56a6f938bbad0e34ca746ca2eabdecac10945539f1f5e8c6&p|checkin/19c60b7fc9e2...]
82 wiki page in the "About" section.
83
84 This special wiki pages are very useful for recording historical
85 notes.
86

Keyboard Shortcuts

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