Fossil SCM
Merged from trunk
Commit
2f24675ab589dca1cef7efd1077bcd982bac916d673295c3deb0c82c44949d69
Parent
06afb7022f6f455…
32 files changed
+27
+3
-1
+3
-1
+31
+43
-1
+43
-1
+21
-15
+21
-15
+26
-1
+26
-1
+1
+2
-2
+11
+11
+1
-1
+1
-1
+49
-25
+49
-25
+2
-1
+1
-1
+2
-1
+1
-1
+1
-1
+35
+2
-2
+3
-1
+3
+5
-5
+1
+4
+4
-4
+2
-2
~
src/accordion.js
~
src/alerts.c
~
src/alerts.c
~
src/default_css.txt
~
src/file.c
~
src/file.c
~
src/forum.c
~
src/forum.c
~
src/main.c
~
src/main.c
~
src/main.mk
~
src/makemake.tcl
~
src/style.c
~
src/style.c
~
src/timeline.c
~
src/timeline.c
~
src/wiki.c
~
src/wiki.c
~
win/Makefile.mingw
~
win/Makefile.mingw.mistachkin
~
win/Makefile.msc
~
www/antibot.wiki
~
www/build.wiki
~
www/css-tricks.md
~
www/defcsp.md
~
www/faq.wiki
~
www/history.md
~
www/index.wiki
~
www/mkindex.tcl
~
www/permutedindex.html
~
www/qandc.wiki
~
www/wikitheory.wiki
+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 |
| --- 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 @@ | ||
| 2214 | 2214 | "SELECT" |
| 2215 | 2215 | " forumpost.fpid," /* 0 */ |
| 2216 | 2216 | " (SELECT uuid FROM blob WHERE rid=forumpost.fpid)," /* 1 */ |
| 2217 | 2217 | " datetime(event.mtime)," /* 2 */ |
| 2218 | 2218 | " 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 */ | |
| 2220 | 2222 | " wantalert.needMod," /* 5 */ |
| 2221 | 2223 | " coalesce(display_name(info),euser,user)," /* 6 */ |
| 2222 | 2224 | " forumpost.fprev IS NULL" /* 7 */ |
| 2223 | 2225 | " FROM temp.wantalert, event, forumpost" |
| 2224 | 2226 | " LEFT JOIN user ON (login=coalesce(euser,user))" |
| 2225 | 2227 |
| --- 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 @@ | ||
| 2214 | 2214 | "SELECT" |
| 2215 | 2215 | " forumpost.fpid," /* 0 */ |
| 2216 | 2216 | " (SELECT uuid FROM blob WHERE rid=forumpost.fpid)," /* 1 */ |
| 2217 | 2217 | " datetime(event.mtime)," /* 2 */ |
| 2218 | 2218 | " 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 */ | |
| 2220 | 2222 | " wantalert.needMod," /* 5 */ |
| 2221 | 2223 | " coalesce(display_name(info),euser,user)," /* 6 */ |
| 2222 | 2224 | " forumpost.fprev IS NULL" /* 7 */ |
| 2223 | 2225 | " FROM temp.wantalert, event, forumpost" |
| 2224 | 2226 | " LEFT JOIN user ON (login=coalesce(euser,user))" |
| 2225 | 2227 |
| --- 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 |
+31
| --- src/default_css.txt | ||
| +++ src/default_css.txt | ||
| @@ -745,10 +745,12 @@ | ||
| 745 | 745 | } |
| 746 | 746 | div.forumTimeline { |
| 747 | 747 | border: 1px solid black; |
| 748 | 748 | padding-left: 1ex; |
| 749 | 749 | padding-right: 1ex; |
| 750 | + max-width: 50em; | |
| 751 | + overflow: auto; | |
| 750 | 752 | } |
| 751 | 753 | div.forumTimeline code { |
| 752 | 754 | white-space: pre-wrap; |
| 753 | 755 | } |
| 754 | 756 | div.markdown code { |
| @@ -757,10 +759,14 @@ | ||
| 757 | 759 | div.forumHier, div.forumTime { |
| 758 | 760 | border: 1px solid black; |
| 759 | 761 | padding-left: 1ex; |
| 760 | 762 | padding-right: 1ex; |
| 761 | 763 | margin-top: 1ex; |
| 764 | +} | |
| 765 | +div.forumPostBody { | |
| 766 | + max-height: 40em; | |
| 767 | + overflow: auto; | |
| 762 | 768 | } |
| 763 | 769 | div.forumSel { |
| 764 | 770 | background-color: #cef; |
| 765 | 771 | } |
| 766 | 772 | div.forumObs { |
| @@ -810,5 +816,30 @@ | ||
| 810 | 816 | margin-right: 0; |
| 811 | 817 | } |
| 812 | 818 | .nobr { |
| 813 | 819 | white-space: nowrap; |
| 814 | 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 | +} | |
| 815 | 846 |
| --- 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 @@ | ||
| 347 | 347 | } |
| 348 | 348 | free(zFN); |
| 349 | 349 | return rc; |
| 350 | 350 | } |
| 351 | 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 | + | |
| 352 | 392 | |
| 353 | 393 | /* |
| 354 | 394 | ** Wrapper around the access() system call. |
| 355 | 395 | */ |
| 356 | 396 | int file_access(const char *zFilename, int flags){ |
| @@ -1126,10 +1166,11 @@ | ||
| 1126 | 1166 | memset(&testFileStat, 0, sizeof(struct fossilStat)); |
| 1127 | 1167 | rc = fossil_stat(zPath, &testFileStat, 0); |
| 1128 | 1168 | fossil_print(" stat_rc = %d\n", rc); |
| 1129 | 1169 | sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_size); |
| 1130 | 1170 | fossil_print(" stat_size = %s\n", zBuf); |
| 1171 | + if( g.db==0 ) sqlite3_open(":memory:", &g.db); | |
| 1131 | 1172 | z = db_text(0, "SELECT datetime(%lld, 'unixepoch')", testFileStat.st_mtime); |
| 1132 | 1173 | sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld (%s)", testFileStat.st_mtime, z); |
| 1133 | 1174 | fossil_free(z); |
| 1134 | 1175 | fossil_print(" stat_mtime = %s\n", zBuf); |
| 1135 | 1176 | fossil_print(" stat_mode = 0%o\n", testFileStat.st_mode); |
| @@ -1166,10 +1207,11 @@ | ||
| 1166 | 1207 | fossil_print(" file_isfile(RepoFILE) = %d\n", file_isfile(zPath,RepoFILE)); |
| 1167 | 1208 | fossil_print(" file_isfile_or_link = %d\n", file_isfile_or_link(zPath)); |
| 1168 | 1209 | fossil_print(" file_islink = %d\n", file_islink(zPath)); |
| 1169 | 1210 | fossil_print(" file_isexe(RepoFILE) = %d\n", file_isexe(zPath,RepoFILE)); |
| 1170 | 1211 | fossil_print(" file_isdir(RepoFILE) = %d\n", file_isdir(zPath,RepoFILE)); |
| 1212 | + fossil_print(" file_is_repository = %d\n", file_is_repository(zPath)); | |
| 1171 | 1213 | if( reset ) resetStat(); |
| 1172 | 1214 | } |
| 1173 | 1215 | |
| 1174 | 1216 | /* |
| 1175 | 1217 | ** COMMAND: test-file-environment |
| @@ -1192,11 +1234,11 @@ | ||
| 1192 | 1234 | int resetFlag = find_option("reset",0,0)!=0; |
| 1193 | 1235 | const char *zAllow = find_option("allow-symlinks",0,1); |
| 1194 | 1236 | if( find_option("open-config", 0, 0)!=0 ){ |
| 1195 | 1237 | Th_OpenConfig(1); |
| 1196 | 1238 | } |
| 1197 | - db_find_and_open_repository(OPEN_ANY_SCHEMA, 0); | |
| 1239 | + db_find_and_open_repository(OPEN_ANY_SCHEMA|OPEN_OK_NOT_FOUND, 0); | |
| 1198 | 1240 | fossil_print("filenames_are_case_sensitive() = %d\n", |
| 1199 | 1241 | filenames_are_case_sensitive()); |
| 1200 | 1242 | fossil_print("db_allow_symlinks_by_default() = %d\n", |
| 1201 | 1243 | db_allow_symlinks_by_default()); |
| 1202 | 1244 | if( zAllow ){ |
| 1203 | 1245 |
| --- 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 @@ | ||
| 347 | 347 | } |
| 348 | 348 | free(zFN); |
| 349 | 349 | return rc; |
| 350 | 350 | } |
| 351 | 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 | + | |
| 352 | 392 | |
| 353 | 393 | /* |
| 354 | 394 | ** Wrapper around the access() system call. |
| 355 | 395 | */ |
| 356 | 396 | int file_access(const char *zFilename, int flags){ |
| @@ -1126,10 +1166,11 @@ | ||
| 1126 | 1166 | memset(&testFileStat, 0, sizeof(struct fossilStat)); |
| 1127 | 1167 | rc = fossil_stat(zPath, &testFileStat, 0); |
| 1128 | 1168 | fossil_print(" stat_rc = %d\n", rc); |
| 1129 | 1169 | sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_size); |
| 1130 | 1170 | fossil_print(" stat_size = %s\n", zBuf); |
| 1171 | + if( g.db==0 ) sqlite3_open(":memory:", &g.db); | |
| 1131 | 1172 | z = db_text(0, "SELECT datetime(%lld, 'unixepoch')", testFileStat.st_mtime); |
| 1132 | 1173 | sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld (%s)", testFileStat.st_mtime, z); |
| 1133 | 1174 | fossil_free(z); |
| 1134 | 1175 | fossil_print(" stat_mtime = %s\n", zBuf); |
| 1135 | 1176 | fossil_print(" stat_mode = 0%o\n", testFileStat.st_mode); |
| @@ -1166,10 +1207,11 @@ | ||
| 1166 | 1207 | fossil_print(" file_isfile(RepoFILE) = %d\n", file_isfile(zPath,RepoFILE)); |
| 1167 | 1208 | fossil_print(" file_isfile_or_link = %d\n", file_isfile_or_link(zPath)); |
| 1168 | 1209 | fossil_print(" file_islink = %d\n", file_islink(zPath)); |
| 1169 | 1210 | fossil_print(" file_isexe(RepoFILE) = %d\n", file_isexe(zPath,RepoFILE)); |
| 1170 | 1211 | fossil_print(" file_isdir(RepoFILE) = %d\n", file_isdir(zPath,RepoFILE)); |
| 1212 | + fossil_print(" file_is_repository = %d\n", file_is_repository(zPath)); | |
| 1171 | 1213 | if( reset ) resetStat(); |
| 1172 | 1214 | } |
| 1173 | 1215 | |
| 1174 | 1216 | /* |
| 1175 | 1217 | ** COMMAND: test-file-environment |
| @@ -1192,11 +1234,11 @@ | ||
| 1192 | 1234 | int resetFlag = find_option("reset",0,0)!=0; |
| 1193 | 1235 | const char *zAllow = find_option("allow-symlinks",0,1); |
| 1194 | 1236 | if( find_option("open-config", 0, 0)!=0 ){ |
| 1195 | 1237 | Th_OpenConfig(1); |
| 1196 | 1238 | } |
| 1197 | - db_find_and_open_repository(OPEN_ANY_SCHEMA, 0); | |
| 1239 | + db_find_and_open_repository(OPEN_ANY_SCHEMA|OPEN_OK_NOT_FOUND, 0); | |
| 1198 | 1240 | fossil_print("filenames_are_case_sensitive() = %d\n", |
| 1199 | 1241 | filenames_are_case_sensitive()); |
| 1200 | 1242 | fossil_print("db_allow_symlinks_by_default() = %d\n", |
| 1201 | 1243 | db_allow_symlinks_by_default()); |
| 1202 | 1244 | if( zAllow ){ |
| 1203 | 1245 |
| --- 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 @@ | ||
| 309 | 309 | */ |
| 310 | 310 | void forum_render( |
| 311 | 311 | const char *zTitle, /* The title. Might be NULL for no title */ |
| 312 | 312 | const char *zMimetype, /* Mimetype of the message */ |
| 313 | 313 | 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 */ | |
| 315 | 316 | ){ |
| 316 | 317 | if( zClass ){ |
| 317 | 318 | @ <div class='%s(zClass)'> |
| 318 | 319 | } |
| 319 | 320 | if( zTitle ){ |
| @@ -323,14 +324,20 @@ | ||
| 323 | 324 | @ <h1><i>Deleted</i></h1> |
| 324 | 325 | } |
| 325 | 326 | } |
| 326 | 327 | if( zContent && zContent[0] ){ |
| 327 | 328 | Blob x; |
| 329 | + if( bScroll ){ | |
| 330 | + @ <div class='forumPostBody'> | |
| 331 | + }else{ | |
| 332 | + @ <div class='forumPostFullBody'> | |
| 333 | + } | |
| 328 | 334 | blob_init(&x, 0, 0); |
| 329 | 335 | blob_append(&x, zContent, -1); |
| 330 | 336 | wiki_render_by_mimetype(&x, zMimetype); |
| 331 | 337 | blob_reset(&x); |
| 338 | + @ </div> | |
| 332 | 339 | }else{ |
| 333 | 340 | @ <i>Deleted</i> |
| 334 | 341 | } |
| 335 | 342 | if( zClass ){ |
| 336 | 343 | @ </div> |
| @@ -444,20 +451,21 @@ | ||
| 444 | 451 | zUuid = p->pLeaf->zUuid; |
| 445 | 452 | } |
| 446 | 453 | if( p->fpid!=target ){ |
| 447 | 454 | @ %z(href("%R/forumpost/%S?t=%c",zUuid,cMode))[link]</a> |
| 448 | 455 | } |
| 449 | - if( !bRawMode && fossil_strcmp(pPost->zMimetype,"text/plain")!=0 ){ | |
| 456 | + if( !bRawMode ){ | |
| 450 | 457 | @ %z(href("%R/forumpost/%S?raw",zUuid))[source]</a> |
| 451 | 458 | } |
| 452 | 459 | isPrivate = content_is_private(p->fpid); |
| 453 | 460 | sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 454 | 461 | @ </h3> |
| 455 | 462 | if( isPrivate && !g.perm.ModForum && !sameUser ){ |
| 456 | 463 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 457 | 464 | }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); | |
| 459 | 467 | } |
| 460 | 468 | if( g.perm.WrForum && p->pLeaf==0 ){ |
| 461 | 469 | int sameUser = login_is_individual() |
| 462 | 470 | && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 463 | 471 | @ <p><form action="%R/forumedit" method="POST"> |
| @@ -565,13 +573,11 @@ | ||
| 565 | 573 | manifest_destroy(pOPost); |
| 566 | 574 | } |
| 567 | 575 | if( fpid!=target ){ |
| 568 | 576 | @ %z(href("%R/forumpost/%S",zUuid))[link]</a> |
| 569 | 577 | } |
| 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> | |
| 573 | 579 | if( p->firt ){ |
| 574 | 580 | ForumEntry *pIrt = p->pPrev; |
| 575 | 581 | while( pIrt && pIrt->fpid!=p->firt ) pIrt = pIrt->pPrev; |
| 576 | 582 | if( pIrt ){ |
| 577 | 583 | @ in reply to %z(href("%R/forumpost/%S?t=h",pIrt->zUuid))\ |
| @@ -582,11 +588,11 @@ | ||
| 582 | 588 | isPrivate = content_is_private(fpid); |
| 583 | 589 | sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 584 | 590 | if( isPrivate && !g.perm.ModForum && !sameUser ){ |
| 585 | 591 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 586 | 592 | }else{ |
| 587 | - forum_render(0, pPost->zMimetype, pPost->zWiki, 0); | |
| 593 | + forum_render(0, pPost->zMimetype, pPost->zWiki, 0, 1); | |
| 588 | 594 | } |
| 589 | 595 | if( g.perm.WrForum ){ |
| 590 | 596 | @ <p><form action="%R/forumedit" method="POST"> |
| 591 | 597 | @ <input type="hidden" name="fpid" value="%s(zUuid)"> |
| 592 | 598 | if( !isPrivate ){ |
| @@ -717,11 +723,11 @@ | ||
| 717 | 723 | int notAnon = login_is_individual(); |
| 718 | 724 | int sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 719 | 725 | if( isPrivate && !g.perm.ModForum && !sameUser ){ |
| 720 | 726 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 721 | 727 | }else{ |
| 722 | - forum_render(0, "text/plain", pPost->zWiki, 0); | |
| 728 | + forum_render(0, "text/plain", pPost->zWiki, 0, 0); | |
| 723 | 729 | } |
| 724 | 730 | manifest_destroy(pPost); |
| 725 | 731 | } |
| 726 | 732 | }else if( zMode[0]=='c' ){ |
| 727 | 733 | style_submenu_element("Hierarchical", "%R/%s/%s?t=h", g.zPath, zName); |
| @@ -949,11 +955,11 @@ | ||
| 949 | 955 | if( P("submit") ){ |
| 950 | 956 | if( forum_post(zTitle, 0, 0, 0, zMimetype, zContent) ) return; |
| 951 | 957 | } |
| 952 | 958 | if( P("preview") ){ |
| 953 | 959 | @ <h1>Preview:</h1> |
| 954 | - forum_render(zTitle, zMimetype, zContent, "forumEdit"); | |
| 960 | + forum_render(zTitle, zMimetype, zContent, "forumEdit", 1); | |
| 955 | 961 | } |
| 956 | 962 | style_header("New Forum Thread"); |
| 957 | 963 | @ <form action="%R/forume1" method="POST"> |
| 958 | 964 | @ <h1>New Thread:</h1> |
| 959 | 965 | forum_from_line(); |
| @@ -1067,13 +1073,13 @@ | ||
| 1067 | 1073 | zContent = ""; |
| 1068 | 1074 | if( pPost->zThreadTitle ) zTitle = ""; |
| 1069 | 1075 | style_header("Delete %s", zTitle ? "Post" : "Reply"); |
| 1070 | 1076 | @ <h1>Original Post:</h1> |
| 1071 | 1077 | forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki, |
| 1072 | - "forumEdit"); | |
| 1078 | + "forumEdit", 1); | |
| 1073 | 1079 | @ <h1>Change Into:</h1> |
| 1074 | - forum_render(zTitle, zMimetype, zContent,"forumEdit"); | |
| 1080 | + forum_render(zTitle, zMimetype, zContent,"forumEdit", 1); | |
| 1075 | 1081 | @ <form action="%R/forume2" method="POST"> |
| 1076 | 1082 | @ <input type="hidden" name="fpid" value="%h(P("fpid"))"> |
| 1077 | 1083 | @ <input type="hidden" name="nullout" value="1"> |
| 1078 | 1084 | @ <input type="hidden" name="mimetype" value="%h(zMimetype)"> |
| 1079 | 1085 | @ <input type="hidden" name="content" value="%h(zContent)"> |
| @@ -1091,14 +1097,14 @@ | ||
| 1091 | 1097 | zTitle = fossil_strdup(pPost->zThreadTitle); |
| 1092 | 1098 | } |
| 1093 | 1099 | style_header("Edit %s", zTitle ? "Post" : "Reply"); |
| 1094 | 1100 | @ <h2>Original Post:</h2> |
| 1095 | 1101 | forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki, |
| 1096 | - "forumEdit"); | |
| 1102 | + "forumEdit", 1); | |
| 1097 | 1103 | if( P("preview") ){ |
| 1098 | 1104 | @ <h2>Preview of Edited Post:</h2> |
| 1099 | - forum_render(zTitle, zMimetype, zContent,"forumEdit"); | |
| 1105 | + forum_render(zTitle, zMimetype, zContent,"forumEdit", 1); | |
| 1100 | 1106 | } |
| 1101 | 1107 | @ <h2>Revised Message:</h2> |
| 1102 | 1108 | @ <form action="%R/forume2" method="POST"> |
| 1103 | 1109 | @ <input type="hidden" name="fpid" value="%h(P("fpid"))"> |
| 1104 | 1110 | @ <input type="hidden" name="edit" value="1"> |
| @@ -1117,14 +1123,14 @@ | ||
| 1117 | 1123 | zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate); |
| 1118 | 1124 | zDisplayName = display_name_from_login(pPost->zUser); |
| 1119 | 1125 | @ <h3 class='forumPostHdr'>By %h(zDisplayName) on %h(zDate)</h3> |
| 1120 | 1126 | fossil_free(zDisplayName); |
| 1121 | 1127 | fossil_free(zDate); |
| 1122 | - forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit"); | |
| 1128 | + forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit", 1); | |
| 1123 | 1129 | if( P("preview") ){ |
| 1124 | 1130 | @ <h2>Preview:</h2> |
| 1125 | - forum_render(0, zMimetype,zContent, "forumEdit"); | |
| 1131 | + forum_render(0, zMimetype,zContent, "forumEdit", 1); | |
| 1126 | 1132 | } |
| 1127 | 1133 | @ <h2>Enter Reply:</h2> |
| 1128 | 1134 | @ <form action="%R/forume2" method="POST"> |
| 1129 | 1135 | @ <input type="hidden" name="fpid" value="%h(P("fpid"))"> |
| 1130 | 1136 | @ <input type="hidden" name="reply" value="1"> |
| 1131 | 1137 |
| --- 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 @@ | ||
| 309 | 309 | */ |
| 310 | 310 | void forum_render( |
| 311 | 311 | const char *zTitle, /* The title. Might be NULL for no title */ |
| 312 | 312 | const char *zMimetype, /* Mimetype of the message */ |
| 313 | 313 | 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 */ | |
| 315 | 316 | ){ |
| 316 | 317 | if( zClass ){ |
| 317 | 318 | @ <div class='%s(zClass)'> |
| 318 | 319 | } |
| 319 | 320 | if( zTitle ){ |
| @@ -323,14 +324,20 @@ | ||
| 323 | 324 | @ <h1><i>Deleted</i></h1> |
| 324 | 325 | } |
| 325 | 326 | } |
| 326 | 327 | if( zContent && zContent[0] ){ |
| 327 | 328 | Blob x; |
| 329 | + if( bScroll ){ | |
| 330 | + @ <div class='forumPostBody'> | |
| 331 | + }else{ | |
| 332 | + @ <div class='forumPostFullBody'> | |
| 333 | + } | |
| 328 | 334 | blob_init(&x, 0, 0); |
| 329 | 335 | blob_append(&x, zContent, -1); |
| 330 | 336 | wiki_render_by_mimetype(&x, zMimetype); |
| 331 | 337 | blob_reset(&x); |
| 338 | + @ </div> | |
| 332 | 339 | }else{ |
| 333 | 340 | @ <i>Deleted</i> |
| 334 | 341 | } |
| 335 | 342 | if( zClass ){ |
| 336 | 343 | @ </div> |
| @@ -444,20 +451,21 @@ | ||
| 444 | 451 | zUuid = p->pLeaf->zUuid; |
| 445 | 452 | } |
| 446 | 453 | if( p->fpid!=target ){ |
| 447 | 454 | @ %z(href("%R/forumpost/%S?t=%c",zUuid,cMode))[link]</a> |
| 448 | 455 | } |
| 449 | - if( !bRawMode && fossil_strcmp(pPost->zMimetype,"text/plain")!=0 ){ | |
| 456 | + if( !bRawMode ){ | |
| 450 | 457 | @ %z(href("%R/forumpost/%S?raw",zUuid))[source]</a> |
| 451 | 458 | } |
| 452 | 459 | isPrivate = content_is_private(p->fpid); |
| 453 | 460 | sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 454 | 461 | @ </h3> |
| 455 | 462 | if( isPrivate && !g.perm.ModForum && !sameUser ){ |
| 456 | 463 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 457 | 464 | }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); | |
| 459 | 467 | } |
| 460 | 468 | if( g.perm.WrForum && p->pLeaf==0 ){ |
| 461 | 469 | int sameUser = login_is_individual() |
| 462 | 470 | && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 463 | 471 | @ <p><form action="%R/forumedit" method="POST"> |
| @@ -565,13 +573,11 @@ | ||
| 565 | 573 | manifest_destroy(pOPost); |
| 566 | 574 | } |
| 567 | 575 | if( fpid!=target ){ |
| 568 | 576 | @ %z(href("%R/forumpost/%S",zUuid))[link]</a> |
| 569 | 577 | } |
| 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> | |
| 573 | 579 | if( p->firt ){ |
| 574 | 580 | ForumEntry *pIrt = p->pPrev; |
| 575 | 581 | while( pIrt && pIrt->fpid!=p->firt ) pIrt = pIrt->pPrev; |
| 576 | 582 | if( pIrt ){ |
| 577 | 583 | @ in reply to %z(href("%R/forumpost/%S?t=h",pIrt->zUuid))\ |
| @@ -582,11 +588,11 @@ | ||
| 582 | 588 | isPrivate = content_is_private(fpid); |
| 583 | 589 | sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 584 | 590 | if( isPrivate && !g.perm.ModForum && !sameUser ){ |
| 585 | 591 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 586 | 592 | }else{ |
| 587 | - forum_render(0, pPost->zMimetype, pPost->zWiki, 0); | |
| 593 | + forum_render(0, pPost->zMimetype, pPost->zWiki, 0, 1); | |
| 588 | 594 | } |
| 589 | 595 | if( g.perm.WrForum ){ |
| 590 | 596 | @ <p><form action="%R/forumedit" method="POST"> |
| 591 | 597 | @ <input type="hidden" name="fpid" value="%s(zUuid)"> |
| 592 | 598 | if( !isPrivate ){ |
| @@ -717,11 +723,11 @@ | ||
| 717 | 723 | int notAnon = login_is_individual(); |
| 718 | 724 | int sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 719 | 725 | if( isPrivate && !g.perm.ModForum && !sameUser ){ |
| 720 | 726 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 721 | 727 | }else{ |
| 722 | - forum_render(0, "text/plain", pPost->zWiki, 0); | |
| 728 | + forum_render(0, "text/plain", pPost->zWiki, 0, 0); | |
| 723 | 729 | } |
| 724 | 730 | manifest_destroy(pPost); |
| 725 | 731 | } |
| 726 | 732 | }else if( zMode[0]=='c' ){ |
| 727 | 733 | style_submenu_element("Hierarchical", "%R/%s/%s?t=h", g.zPath, zName); |
| @@ -949,11 +955,11 @@ | ||
| 949 | 955 | if( P("submit") ){ |
| 950 | 956 | if( forum_post(zTitle, 0, 0, 0, zMimetype, zContent) ) return; |
| 951 | 957 | } |
| 952 | 958 | if( P("preview") ){ |
| 953 | 959 | @ <h1>Preview:</h1> |
| 954 | - forum_render(zTitle, zMimetype, zContent, "forumEdit"); | |
| 960 | + forum_render(zTitle, zMimetype, zContent, "forumEdit", 1); | |
| 955 | 961 | } |
| 956 | 962 | style_header("New Forum Thread"); |
| 957 | 963 | @ <form action="%R/forume1" method="POST"> |
| 958 | 964 | @ <h1>New Thread:</h1> |
| 959 | 965 | forum_from_line(); |
| @@ -1067,13 +1073,13 @@ | ||
| 1067 | 1073 | zContent = ""; |
| 1068 | 1074 | if( pPost->zThreadTitle ) zTitle = ""; |
| 1069 | 1075 | style_header("Delete %s", zTitle ? "Post" : "Reply"); |
| 1070 | 1076 | @ <h1>Original Post:</h1> |
| 1071 | 1077 | forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki, |
| 1072 | - "forumEdit"); | |
| 1078 | + "forumEdit", 1); | |
| 1073 | 1079 | @ <h1>Change Into:</h1> |
| 1074 | - forum_render(zTitle, zMimetype, zContent,"forumEdit"); | |
| 1080 | + forum_render(zTitle, zMimetype, zContent,"forumEdit", 1); | |
| 1075 | 1081 | @ <form action="%R/forume2" method="POST"> |
| 1076 | 1082 | @ <input type="hidden" name="fpid" value="%h(P("fpid"))"> |
| 1077 | 1083 | @ <input type="hidden" name="nullout" value="1"> |
| 1078 | 1084 | @ <input type="hidden" name="mimetype" value="%h(zMimetype)"> |
| 1079 | 1085 | @ <input type="hidden" name="content" value="%h(zContent)"> |
| @@ -1091,14 +1097,14 @@ | ||
| 1091 | 1097 | zTitle = fossil_strdup(pPost->zThreadTitle); |
| 1092 | 1098 | } |
| 1093 | 1099 | style_header("Edit %s", zTitle ? "Post" : "Reply"); |
| 1094 | 1100 | @ <h2>Original Post:</h2> |
| 1095 | 1101 | forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki, |
| 1096 | - "forumEdit"); | |
| 1102 | + "forumEdit", 1); | |
| 1097 | 1103 | if( P("preview") ){ |
| 1098 | 1104 | @ <h2>Preview of Edited Post:</h2> |
| 1099 | - forum_render(zTitle, zMimetype, zContent,"forumEdit"); | |
| 1105 | + forum_render(zTitle, zMimetype, zContent,"forumEdit", 1); | |
| 1100 | 1106 | } |
| 1101 | 1107 | @ <h2>Revised Message:</h2> |
| 1102 | 1108 | @ <form action="%R/forume2" method="POST"> |
| 1103 | 1109 | @ <input type="hidden" name="fpid" value="%h(P("fpid"))"> |
| 1104 | 1110 | @ <input type="hidden" name="edit" value="1"> |
| @@ -1117,14 +1123,14 @@ | ||
| 1117 | 1123 | zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate); |
| 1118 | 1124 | zDisplayName = display_name_from_login(pPost->zUser); |
| 1119 | 1125 | @ <h3 class='forumPostHdr'>By %h(zDisplayName) on %h(zDate)</h3> |
| 1120 | 1126 | fossil_free(zDisplayName); |
| 1121 | 1127 | fossil_free(zDate); |
| 1122 | - forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit"); | |
| 1128 | + forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit", 1); | |
| 1123 | 1129 | if( P("preview") ){ |
| 1124 | 1130 | @ <h2>Preview:</h2> |
| 1125 | - forum_render(0, zMimetype,zContent, "forumEdit"); | |
| 1131 | + forum_render(0, zMimetype,zContent, "forumEdit", 1); | |
| 1126 | 1132 | } |
| 1127 | 1133 | @ <h2>Enter Reply:</h2> |
| 1128 | 1134 | @ <form action="%R/forume2" method="POST"> |
| 1129 | 1135 | @ <input type="hidden" name="fpid" value="%h(P("fpid"))"> |
| 1130 | 1136 | @ <input type="hidden" name="reply" value="1"> |
| 1131 | 1137 |
| --- 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 @@ | ||
| 782 | 782 | nNewArgc = g.argc+1; |
| 783 | 783 | zNewArgv[i+1] = 0; |
| 784 | 784 | } |
| 785 | 785 | g.argc = nNewArgc; |
| 786 | 786 | 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 | + } | |
| 788 | 798 | zCmdName = g.argv[1]; |
| 789 | 799 | } |
| 790 | 800 | #ifndef _WIN32 |
| 791 | 801 | /* There is a bug in stunnel4 in which it sometimes starts up client |
| 792 | 802 | ** processes without first opening file descriptor 2 (standard error). |
| @@ -812,10 +822,25 @@ | ||
| 812 | 822 | } |
| 813 | 823 | } |
| 814 | 824 | #endif |
| 815 | 825 | g.zCmdName = zCmdName; |
| 816 | 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 | + } | |
| 817 | 842 | if( rc==1 ){ |
| 818 | 843 | #ifdef FOSSIL_ENABLE_TH1_HOOKS |
| 819 | 844 | if( !g.isHTTP && !g.fNoThHook ){ |
| 820 | 845 | rc = Th_CommandHook(zCmdName, 0); |
| 821 | 846 | }else{ |
| 822 | 847 |
| --- 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 @@ | ||
| 782 | 782 | nNewArgc = g.argc+1; |
| 783 | 783 | zNewArgv[i+1] = 0; |
| 784 | 784 | } |
| 785 | 785 | g.argc = nNewArgc; |
| 786 | 786 | 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 | + } | |
| 788 | 798 | zCmdName = g.argv[1]; |
| 789 | 799 | } |
| 790 | 800 | #ifndef _WIN32 |
| 791 | 801 | /* There is a bug in stunnel4 in which it sometimes starts up client |
| 792 | 802 | ** processes without first opening file descriptor 2 (standard error). |
| @@ -812,10 +822,25 @@ | ||
| 812 | 822 | } |
| 813 | 823 | } |
| 814 | 824 | #endif |
| 815 | 825 | g.zCmdName = zCmdName; |
| 816 | 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 | + } | |
| 817 | 842 | if( rc==1 ){ |
| 818 | 843 | #ifdef FOSSIL_ENABLE_TH1_HOOKS |
| 819 | 844 | if( !g.isHTTP && !g.fNoThHook ){ |
| 820 | 845 | rc = Th_CommandHook(zCmdName, 0); |
| 821 | 846 | }else{ |
| 822 | 847 |
| --- 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 |
+1
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -211,10 +211,11 @@ | ||
| 211 | 211 | $(SRCDIR)/../skins/rounded1/header.txt \ |
| 212 | 212 | $(SRCDIR)/../skins/xekri/css.txt \ |
| 213 | 213 | $(SRCDIR)/../skins/xekri/details.txt \ |
| 214 | 214 | $(SRCDIR)/../skins/xekri/footer.txt \ |
| 215 | 215 | $(SRCDIR)/../skins/xekri/header.txt \ |
| 216 | + $(SRCDIR)/accordion.js \ | |
| 216 | 217 | $(SRCDIR)/ci_edit.js \ |
| 217 | 218 | $(SRCDIR)/copybtn.js \ |
| 218 | 219 | $(SRCDIR)/diff.tcl \ |
| 219 | 220 | $(SRCDIR)/forum.js \ |
| 220 | 221 | $(SRCDIR)/graph.js \ |
| 221 | 222 |
| --- 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 |
+2
-2
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -713,11 +713,11 @@ | ||
| 713 | 713 | #### The directories where the OpenSSL include and library files are located. |
| 714 | 714 | # The recommended usage here is to use the Sysinternals junction tool |
| 715 | 715 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 716 | 716 | # Fossil source code directory and the target OpenSSL source directory. |
| 717 | 717 | # |
| 718 | -OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1e | |
| 718 | +OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1f | |
| 719 | 719 | OPENSSLINCDIR = $(OPENSSLDIR)/include |
| 720 | 720 | OPENSSLLIBDIR = $(OPENSSLDIR) |
| 721 | 721 | |
| 722 | 722 | #### Either the directory where the Tcl library is installed or the Tcl |
| 723 | 723 | # source code directory resides (depending on the value of the macro |
| @@ -1570,11 +1570,11 @@ | ||
| 1570 | 1570 | !ifndef USE_SEE |
| 1571 | 1571 | USE_SEE = 0 |
| 1572 | 1572 | !endif |
| 1573 | 1573 | |
| 1574 | 1574 | !if $(FOSSIL_ENABLE_SSL)!=0 |
| 1575 | -SSLDIR = $(B)\compat\openssl-1.1.1e | |
| 1575 | +SSLDIR = $(B)\compat\openssl-1.1.1f | |
| 1576 | 1576 | SSLINCDIR = $(SSLDIR)\include |
| 1577 | 1577 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| 1578 | 1578 | SSLLIBDIR = $(SSLDIR) |
| 1579 | 1579 | !else |
| 1580 | 1580 | SSLLIBDIR = $(SSLDIR) |
| 1581 | 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.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 @@ | ||
| 91 | 91 | */ |
| 92 | 92 | static int needHrefJs = 0; /* href.js */ |
| 93 | 93 | static int needSortJs = 0; /* sorttable.js */ |
| 94 | 94 | static int needGraphJs = 0; /* graph.js */ |
| 95 | 95 | static int needCopyBtnJs = 0; /* copybtn.js */ |
| 96 | +static int needAccordionJs = 0; /* accordion.js */ | |
| 96 | 97 | |
| 97 | 98 | /* |
| 98 | 99 | ** Extra JS added to the end of the file. |
| 99 | 100 | */ |
| 100 | 101 | static Blob blobOnLoad = BLOB_INITIALIZER; |
| @@ -680,10 +681,17 @@ | ||
| 680 | 681 | ** Indicate that the table-sorting javascript is needed. |
| 681 | 682 | */ |
| 682 | 683 | void style_table_sorter(void){ |
| 683 | 684 | needSortJs = 1; |
| 684 | 685 | } |
| 686 | + | |
| 687 | +/* | |
| 688 | +** Indicate that the accordion javascript is needed. | |
| 689 | +*/ | |
| 690 | +void style_accordion(void){ | |
| 691 | + needAccordionJs = 1; | |
| 692 | +} | |
| 685 | 693 | |
| 686 | 694 | /* |
| 687 | 695 | ** Indicate that the timeline graph javascript is needed. |
| 688 | 696 | */ |
| 689 | 697 | void style_graph_generator(void){ |
| @@ -750,10 +758,13 @@ | ||
| 750 | 758 | cgi_append_content(builtin_text("graph.js"),-1); |
| 751 | 759 | } |
| 752 | 760 | if( needCopyBtnJs ){ |
| 753 | 761 | cgi_append_content(builtin_text("copybtn.js"),-1); |
| 754 | 762 | } |
| 763 | + if( needAccordionJs ){ | |
| 764 | + cgi_append_content(builtin_text("accordion.js"),-1); | |
| 765 | + } | |
| 755 | 766 | for(i=0; i<nJsToLoad; i++){ |
| 756 | 767 | cgi_append_content(builtin_text(azJsToLoad[i]),-1); |
| 757 | 768 | } |
| 758 | 769 | if( blob_size(&blobOnLoad)>0 ){ |
| 759 | 770 | @ window.onload = function(){ |
| 760 | 771 |
| --- 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 @@ | ||
| 91 | 91 | */ |
| 92 | 92 | static int needHrefJs = 0; /* href.js */ |
| 93 | 93 | static int needSortJs = 0; /* sorttable.js */ |
| 94 | 94 | static int needGraphJs = 0; /* graph.js */ |
| 95 | 95 | static int needCopyBtnJs = 0; /* copybtn.js */ |
| 96 | +static int needAccordionJs = 0; /* accordion.js */ | |
| 96 | 97 | |
| 97 | 98 | /* |
| 98 | 99 | ** Extra JS added to the end of the file. |
| 99 | 100 | */ |
| 100 | 101 | static Blob blobOnLoad = BLOB_INITIALIZER; |
| @@ -680,10 +681,17 @@ | ||
| 680 | 681 | ** Indicate that the table-sorting javascript is needed. |
| 681 | 682 | */ |
| 682 | 683 | void style_table_sorter(void){ |
| 683 | 684 | needSortJs = 1; |
| 684 | 685 | } |
| 686 | + | |
| 687 | +/* | |
| 688 | +** Indicate that the accordion javascript is needed. | |
| 689 | +*/ | |
| 690 | +void style_accordion(void){ | |
| 691 | + needAccordionJs = 1; | |
| 692 | +} | |
| 685 | 693 | |
| 686 | 694 | /* |
| 687 | 695 | ** Indicate that the timeline graph javascript is needed. |
| 688 | 696 | */ |
| 689 | 697 | void style_graph_generator(void){ |
| @@ -750,10 +758,13 @@ | ||
| 750 | 758 | cgi_append_content(builtin_text("graph.js"),-1); |
| 751 | 759 | } |
| 752 | 760 | if( needCopyBtnJs ){ |
| 753 | 761 | cgi_append_content(builtin_text("copybtn.js"),-1); |
| 754 | 762 | } |
| 763 | + if( needAccordionJs ){ | |
| 764 | + cgi_append_content(builtin_text("accordion.js"),-1); | |
| 765 | + } | |
| 755 | 766 | for(i=0; i<nJsToLoad; i++){ |
| 756 | 767 | cgi_append_content(builtin_text(azJsToLoad[i]),-1); |
| 757 | 768 | } |
| 758 | 769 | if( blob_size(&blobOnLoad)>0 ){ |
| 759 | 770 | @ window.onload = function(){ |
| 760 | 771 |
| --- 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 @@ | ||
| 798 | 798 | if( pPost ){ |
| 799 | 799 | const char *zClass = "forumTimeline"; |
| 800 | 800 | if( forum_rid_has_been_edited(rid) ){ |
| 801 | 801 | zClass = "forumTimeline forumObs"; |
| 802 | 802 | } |
| 803 | - forum_render(0, pPost->zMimetype, pPost->zWiki, zClass); | |
| 803 | + forum_render(0, pPost->zMimetype, pPost->zWiki, zClass, 1); | |
| 804 | 804 | manifest_destroy(pPost); |
| 805 | 805 | } |
| 806 | 806 | } |
| 807 | 807 | } |
| 808 | 808 | if( suppressCnt ){ |
| 809 | 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); |
| 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 @@ | ||
| 798 | 798 | if( pPost ){ |
| 799 | 799 | const char *zClass = "forumTimeline"; |
| 800 | 800 | if( forum_rid_has_been_edited(rid) ){ |
| 801 | 801 | zClass = "forumTimeline forumObs"; |
| 802 | 802 | } |
| 803 | - forum_render(0, pPost->zMimetype, pPost->zWiki, zClass); | |
| 803 | + forum_render(0, pPost->zMimetype, pPost->zWiki, zClass, 1); | |
| 804 | 804 | manifest_destroy(pPost); |
| 805 | 805 | } |
| 806 | 806 | } |
| 807 | 807 | } |
| 808 | 808 | if( suppressCnt ){ |
| 809 | 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); |
| 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 @@ | ||
| 394 | 394 | return WIKITYPE_NORMAL; |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | 397 | /* |
| 398 | 398 | ** 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. | |
| 400 | 406 | */ |
| 401 | 407 | static int wiki_page_header( |
| 402 | - int eType, /* Page type. -1 for unknown */ | |
| 408 | + int eType, /* Page type. Might be WIKITYPE_UNKNOWN */ | |
| 403 | 409 | const char *zPageName, /* Name of the page */ |
| 404 | 410 | const char *zExtra /* Extra prefix text on the page header */ |
| 405 | 411 | ){ |
| 406 | - if( eType<0 ) eType = wiki_page_type(zPageName); | |
| 412 | + if( eType==WIKITYPE_UNKNOWN ) eType = wiki_page_type(zPageName); | |
| 407 | 413 | switch( eType ){ |
| 408 | 414 | case WIKITYPE_NORMAL: { |
| 409 | 415 | style_header("%s%s", zExtra, zPageName); |
| 410 | 416 | break; |
| 411 | 417 | } |
| 412 | 418 | case WIKITYPE_CHECKIN: { |
| 413 | 419 | 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 | + } | |
| 417 | 427 | break; |
| 418 | 428 | } |
| 419 | 429 | case WIKITYPE_BRANCH: { |
| 420 | 430 | 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 | + } | |
| 423 | 437 | break; |
| 424 | 438 | } |
| 425 | 439 | case WIKITYPE_TAG: { |
| 426 | 440 | 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 | + } | |
| 429 | 447 | break; |
| 430 | 448 | } |
| 431 | 449 | } |
| 432 | 450 | return eType; |
| 433 | 451 | } |
| @@ -459,11 +477,14 @@ | ||
| 459 | 477 | ** |
| 460 | 478 | ** Query parameters: |
| 461 | 479 | ** |
| 462 | 480 | ** name=NAME Name of the wiki page to display. Required. |
| 463 | 481 | ** 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. | |
| 465 | 486 | */ |
| 466 | 487 | void wiki_page(void){ |
| 467 | 488 | char *zTag; |
| 468 | 489 | int rid = 0; |
| 469 | 490 | int isSandbox; |
| @@ -1713,28 +1734,28 @@ | ||
| 1713 | 1734 | const char *zPrefix, /* "branch", "tag", or "checkin" */ |
| 1714 | 1735 | const char *zName, /* Name of the object */ |
| 1715 | 1736 | unsigned int mFlags /* Zero or more WIKIASSOC_* flags */ |
| 1716 | 1737 | ){ |
| 1717 | 1738 | if( (mFlags & WIKIASSOC_FULL_TITLE)==0 ){ |
| 1718 | - @ <div class="section">About</div> | |
| 1739 | + @ <div class="section accordion">About</div> | |
| 1719 | 1740 | }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> | |
| 1721 | 1742 | }else{ |
| 1722 | - @ <div class="section">About %s(zPrefix) %h(zName)</div> | |
| 1743 | + @ <div class="section accordion">About %s(zPrefix) %h(zName)</div> | |
| 1723 | 1744 | } |
| 1724 | 1745 | } |
| 1725 | 1746 | |
| 1726 | 1747 | /* |
| 1727 | 1748 | ** Add an "Wiki" button in a submenu that links to the read-wiki page. |
| 1728 | 1749 | */ |
| 1729 | -static void wiki_submenu_to_read_wiki( | |
| 1750 | +static void wiki_submenu_to_edit_wiki( | |
| 1730 | 1751 | const char *zPrefix, /* "branch", "tag", or "checkin" */ |
| 1731 | 1752 | const char *zName, /* Name of the object */ |
| 1732 | 1753 | unsigned int mFlags /* Zero or more WIKIASSOC_* flags */ |
| 1733 | 1754 | ){ |
| 1734 | 1755 | 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); | |
| 1736 | 1757 | } |
| 1737 | 1758 | } |
| 1738 | 1759 | |
| 1739 | 1760 | /* |
| 1740 | 1761 | ** Check to see if there exists a wiki page with a name zPrefix/zName. |
| @@ -1770,44 +1791,47 @@ | ||
| 1770 | 1791 | Blob title = BLOB_INITIALIZER; |
| 1771 | 1792 | Blob markdown; |
| 1772 | 1793 | blob_init(&markdown, pWiki->zWiki, -1); |
| 1773 | 1794 | markdown_to_html(&markdown, &title, &tail); |
| 1774 | 1795 | if( blob_size(&title) ){ |
| 1775 | - @ <div class="section">%h(blob_str(&title))</div> | |
| 1796 | + @ <div class="section accordion">%h(blob_str(&title))</div> | |
| 1776 | 1797 | }else{ |
| 1777 | 1798 | wiki_section_label(zPrefix, zName, mFlags); |
| 1778 | 1799 | } |
| 1779 | - wiki_submenu_to_read_wiki(zPrefix, zName, mFlags); | |
| 1800 | + wiki_submenu_to_edit_wiki(zPrefix, zName, mFlags); | |
| 1801 | + @ <div class="accordion_panel"> | |
| 1780 | 1802 | convert_href_and_output(&tail); |
| 1803 | + @ </div> | |
| 1781 | 1804 | blob_reset(&tail); |
| 1782 | 1805 | blob_reset(&title); |
| 1783 | 1806 | blob_reset(&markdown); |
| 1784 | 1807 | }else if( fossil_strcmp(pWiki->zMimetype, "text/plain")==0 ){ |
| 1785 | 1808 | 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> | |
| 1788 | 1811 | @ %h(pWiki->zWiki) |
| 1789 | - @ </pre> | |
| 1812 | + @ </pre></div> | |
| 1790 | 1813 | }else{ |
| 1791 | 1814 | Blob tail = BLOB_INITIALIZER; |
| 1792 | 1815 | Blob title = BLOB_INITIALIZER; |
| 1793 | 1816 | Blob wiki; |
| 1794 | 1817 | Blob *pBody; |
| 1795 | 1818 | blob_init(&wiki, pWiki->zWiki, -1); |
| 1796 | 1819 | 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> | |
| 1798 | 1821 | pBody = &tail; |
| 1799 | 1822 | }else{ |
| 1800 | 1823 | wiki_section_label(zPrefix, zName, mFlags); |
| 1801 | 1824 | pBody = &wiki; |
| 1802 | 1825 | } |
| 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"> | |
| 1805 | 1828 | wiki_convert(pBody, 0, WIKI_BUTTONS); |
| 1806 | - @ </div> | |
| 1829 | + @ </div></div> | |
| 1807 | 1830 | blob_reset(&tail); |
| 1808 | 1831 | blob_reset(&title); |
| 1809 | 1832 | blob_reset(&wiki); |
| 1810 | 1833 | } |
| 1811 | 1834 | manifest_destroy(pWiki); |
| 1835 | + style_accordion(); | |
| 1812 | 1836 | return 1; |
| 1813 | 1837 | } |
| 1814 | 1838 |
| --- 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 @@ | ||
| 394 | 394 | return WIKITYPE_NORMAL; |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | 397 | /* |
| 398 | 398 | ** 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. | |
| 400 | 406 | */ |
| 401 | 407 | static int wiki_page_header( |
| 402 | - int eType, /* Page type. -1 for unknown */ | |
| 408 | + int eType, /* Page type. Might be WIKITYPE_UNKNOWN */ | |
| 403 | 409 | const char *zPageName, /* Name of the page */ |
| 404 | 410 | const char *zExtra /* Extra prefix text on the page header */ |
| 405 | 411 | ){ |
| 406 | - if( eType<0 ) eType = wiki_page_type(zPageName); | |
| 412 | + if( eType==WIKITYPE_UNKNOWN ) eType = wiki_page_type(zPageName); | |
| 407 | 413 | switch( eType ){ |
| 408 | 414 | case WIKITYPE_NORMAL: { |
| 409 | 415 | style_header("%s%s", zExtra, zPageName); |
| 410 | 416 | break; |
| 411 | 417 | } |
| 412 | 418 | case WIKITYPE_CHECKIN: { |
| 413 | 419 | 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 | + } | |
| 417 | 427 | break; |
| 418 | 428 | } |
| 419 | 429 | case WIKITYPE_BRANCH: { |
| 420 | 430 | 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 | + } | |
| 423 | 437 | break; |
| 424 | 438 | } |
| 425 | 439 | case WIKITYPE_TAG: { |
| 426 | 440 | 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 | + } | |
| 429 | 447 | break; |
| 430 | 448 | } |
| 431 | 449 | } |
| 432 | 450 | return eType; |
| 433 | 451 | } |
| @@ -459,11 +477,14 @@ | ||
| 459 | 477 | ** |
| 460 | 478 | ** Query parameters: |
| 461 | 479 | ** |
| 462 | 480 | ** name=NAME Name of the wiki page to display. Required. |
| 463 | 481 | ** 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. | |
| 465 | 486 | */ |
| 466 | 487 | void wiki_page(void){ |
| 467 | 488 | char *zTag; |
| 468 | 489 | int rid = 0; |
| 469 | 490 | int isSandbox; |
| @@ -1713,28 +1734,28 @@ | ||
| 1713 | 1734 | const char *zPrefix, /* "branch", "tag", or "checkin" */ |
| 1714 | 1735 | const char *zName, /* Name of the object */ |
| 1715 | 1736 | unsigned int mFlags /* Zero or more WIKIASSOC_* flags */ |
| 1716 | 1737 | ){ |
| 1717 | 1738 | if( (mFlags & WIKIASSOC_FULL_TITLE)==0 ){ |
| 1718 | - @ <div class="section">About</div> | |
| 1739 | + @ <div class="section accordion">About</div> | |
| 1719 | 1740 | }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> | |
| 1721 | 1742 | }else{ |
| 1722 | - @ <div class="section">About %s(zPrefix) %h(zName)</div> | |
| 1743 | + @ <div class="section accordion">About %s(zPrefix) %h(zName)</div> | |
| 1723 | 1744 | } |
| 1724 | 1745 | } |
| 1725 | 1746 | |
| 1726 | 1747 | /* |
| 1727 | 1748 | ** Add an "Wiki" button in a submenu that links to the read-wiki page. |
| 1728 | 1749 | */ |
| 1729 | -static void wiki_submenu_to_read_wiki( | |
| 1750 | +static void wiki_submenu_to_edit_wiki( | |
| 1730 | 1751 | const char *zPrefix, /* "branch", "tag", or "checkin" */ |
| 1731 | 1752 | const char *zName, /* Name of the object */ |
| 1732 | 1753 | unsigned int mFlags /* Zero or more WIKIASSOC_* flags */ |
| 1733 | 1754 | ){ |
| 1734 | 1755 | 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); | |
| 1736 | 1757 | } |
| 1737 | 1758 | } |
| 1738 | 1759 | |
| 1739 | 1760 | /* |
| 1740 | 1761 | ** Check to see if there exists a wiki page with a name zPrefix/zName. |
| @@ -1770,44 +1791,47 @@ | ||
| 1770 | 1791 | Blob title = BLOB_INITIALIZER; |
| 1771 | 1792 | Blob markdown; |
| 1772 | 1793 | blob_init(&markdown, pWiki->zWiki, -1); |
| 1773 | 1794 | markdown_to_html(&markdown, &title, &tail); |
| 1774 | 1795 | if( blob_size(&title) ){ |
| 1775 | - @ <div class="section">%h(blob_str(&title))</div> | |
| 1796 | + @ <div class="section accordion">%h(blob_str(&title))</div> | |
| 1776 | 1797 | }else{ |
| 1777 | 1798 | wiki_section_label(zPrefix, zName, mFlags); |
| 1778 | 1799 | } |
| 1779 | - wiki_submenu_to_read_wiki(zPrefix, zName, mFlags); | |
| 1800 | + wiki_submenu_to_edit_wiki(zPrefix, zName, mFlags); | |
| 1801 | + @ <div class="accordion_panel"> | |
| 1780 | 1802 | convert_href_and_output(&tail); |
| 1803 | + @ </div> | |
| 1781 | 1804 | blob_reset(&tail); |
| 1782 | 1805 | blob_reset(&title); |
| 1783 | 1806 | blob_reset(&markdown); |
| 1784 | 1807 | }else if( fossil_strcmp(pWiki->zMimetype, "text/plain")==0 ){ |
| 1785 | 1808 | 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> | |
| 1788 | 1811 | @ %h(pWiki->zWiki) |
| 1789 | - @ </pre> | |
| 1812 | + @ </pre></div> | |
| 1790 | 1813 | }else{ |
| 1791 | 1814 | Blob tail = BLOB_INITIALIZER; |
| 1792 | 1815 | Blob title = BLOB_INITIALIZER; |
| 1793 | 1816 | Blob wiki; |
| 1794 | 1817 | Blob *pBody; |
| 1795 | 1818 | blob_init(&wiki, pWiki->zWiki, -1); |
| 1796 | 1819 | 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> | |
| 1798 | 1821 | pBody = &tail; |
| 1799 | 1822 | }else{ |
| 1800 | 1823 | wiki_section_label(zPrefix, zName, mFlags); |
| 1801 | 1824 | pBody = &wiki; |
| 1802 | 1825 | } |
| 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"> | |
| 1805 | 1828 | wiki_convert(pBody, 0, WIKI_BUTTONS); |
| 1806 | - @ </div> | |
| 1829 | + @ </div></div> | |
| 1807 | 1830 | blob_reset(&tail); |
| 1808 | 1831 | blob_reset(&title); |
| 1809 | 1832 | blob_reset(&wiki); |
| 1810 | 1833 | } |
| 1811 | 1834 | manifest_destroy(pWiki); |
| 1835 | + style_accordion(); | |
| 1812 | 1836 | return 1; |
| 1813 | 1837 | } |
| 1814 | 1838 |
| --- 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 |
+2
-1
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -174,11 +174,11 @@ | ||
| 174 | 174 | #### The directories where the OpenSSL include and library files are located. |
| 175 | 175 | # The recommended usage here is to use the Sysinternals junction tool |
| 176 | 176 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 177 | 177 | # Fossil source code directory and the target OpenSSL source directory. |
| 178 | 178 | # |
| 179 | -OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1e | |
| 179 | +OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1f | |
| 180 | 180 | OPENSSLINCDIR = $(OPENSSLDIR)/include |
| 181 | 181 | OPENSSLLIBDIR = $(OPENSSLDIR) |
| 182 | 182 | |
| 183 | 183 | #### Either the directory where the Tcl library is installed or the Tcl |
| 184 | 184 | # source code directory resides (depending on the value of the macro |
| @@ -633,10 +633,11 @@ | ||
| 633 | 633 | $(SRCDIR)/../skins/rounded1/header.txt \ |
| 634 | 634 | $(SRCDIR)/../skins/xekri/css.txt \ |
| 635 | 635 | $(SRCDIR)/../skins/xekri/details.txt \ |
| 636 | 636 | $(SRCDIR)/../skins/xekri/footer.txt \ |
| 637 | 637 | $(SRCDIR)/../skins/xekri/header.txt \ |
| 638 | + $(SRCDIR)/accordion.js \ | |
| 638 | 639 | $(SRCDIR)/ci_edit.js \ |
| 639 | 640 | $(SRCDIR)/copybtn.js \ |
| 640 | 641 | $(SRCDIR)/diff.tcl \ |
| 641 | 642 | $(SRCDIR)/forum.js \ |
| 642 | 643 | $(SRCDIR)/graph.js \ |
| 643 | 644 |
| --- 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 |
+1
-1
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -174,11 +174,11 @@ | ||
| 174 | 174 | #### The directories where the OpenSSL include and library files are located. |
| 175 | 175 | # The recommended usage here is to use the Sysinternals junction tool |
| 176 | 176 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 177 | 177 | # Fossil source code directory and the target OpenSSL source directory. |
| 178 | 178 | # |
| 179 | -OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1e | |
| 179 | +OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.1.1f | |
| 180 | 180 | OPENSSLINCDIR = $(OPENSSLDIR)/include |
| 181 | 181 | OPENSSLLIBDIR = $(OPENSSLDIR) |
| 182 | 182 | |
| 183 | 183 | #### Either the directory where the Tcl library is installed or the Tcl |
| 184 | 184 | # source code directory resides (depending on the value of the macro |
| 185 | 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.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 |
+2
-1
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -98,11 +98,11 @@ | ||
| 98 | 98 | !ifndef USE_SEE |
| 99 | 99 | USE_SEE = 0 |
| 100 | 100 | !endif |
| 101 | 101 | |
| 102 | 102 | !if $(FOSSIL_ENABLE_SSL)!=0 |
| 103 | -SSLDIR = $(B)\compat\openssl-1.1.1e | |
| 103 | +SSLDIR = $(B)\compat\openssl-1.1.1f | |
| 104 | 104 | SSLINCDIR = $(SSLDIR)\include |
| 105 | 105 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| 106 | 106 | SSLLIBDIR = $(SSLDIR) |
| 107 | 107 | !else |
| 108 | 108 | SSLLIBDIR = $(SSLDIR) |
| @@ -540,10 +540,11 @@ | ||
| 540 | 540 | $(SRCDIR)\..\skins\rounded1\header.txt \ |
| 541 | 541 | $(SRCDIR)\..\skins\xekri\css.txt \ |
| 542 | 542 | $(SRCDIR)\..\skins\xekri\details.txt \ |
| 543 | 543 | $(SRCDIR)\..\skins\xekri\footer.txt \ |
| 544 | 544 | $(SRCDIR)\..\skins\xekri\header.txt \ |
| 545 | + $(SRCDIR)\accordion.js \ | |
| 545 | 546 | $(SRCDIR)\ci_edit.js \ |
| 546 | 547 | $(SRCDIR)\copybtn.js \ |
| 547 | 548 | $(SRCDIR)\diff.tcl \ |
| 548 | 549 | $(SRCDIR)\forum.js \ |
| 549 | 550 | $(SRCDIR)\graph.js \ |
| 550 | 551 |
| --- 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 |
+1
-1
| --- www/antibot.wiki | ||
| +++ www/antibot.wiki | ||
| @@ -1,11 +1,11 @@ | ||
| 1 | 1 | <title>Defense Against Spiders</title> |
| 2 | 2 | |
| 3 | 3 | The website presented by a Fossil server has many hyperlinks. |
| 4 | 4 | Even a modest project can have millions of pages in its |
| 5 | 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. | |
| 6 | +and ZIP archives of older check-ins) can be expensive to compute. | |
| 7 | 7 | If a spider or bot tries to walk a website implemented by |
| 8 | 8 | Fossil, it can present a crippling bandwidth and CPU load. |
| 9 | 9 | |
| 10 | 10 | The website presented by a Fossil server is intended to be used |
| 11 | 11 | interactively by humans, not walked by spiders. This article |
| 12 | 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 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 @@ | ||
| 161 | 161 | the optional <a href="https://www.openssl.org/">OpenSSL</a> support, |
| 162 | 162 | first <a href="https://www.openssl.org/source/">download the official |
| 163 | 163 | source code for OpenSSL</a> and extract it to an appropriately named |
| 164 | 164 | "<b>openssl-X.Y.ZA</b>" subdirectory within the local |
| 165 | 165 | [/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 | |
| 167 | 167 | <a href="http://www.perl.org/">Perl</a> binaries are installed locally, |
| 168 | 168 | and finally run one of the following commands: |
| 169 | 169 | <blockquote><pre> |
| 170 | 170 | nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 171 | 171 | </pre></blockquote> |
| 172 | 172 | |
| 173 | 173 | 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 |
+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 |
| --- 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 @@ | ||
| 319 | 319 | |
| 320 | 320 | The best place to do that is from the [`th1-setup` |
| 321 | 321 | script](./th1-hooks.md), which runs before TH1 processing happens during |
| 322 | 322 | skin processing: |
| 323 | 323 | |
| 324 | - $ fossil set th1-setup "set default_csp {default-src: 'self'}" | |
| 324 | + $ fossil set th1-setup "set default_csp {default-src 'self'}" | |
| 325 | 325 | |
| 326 | 326 | This is the cleanest method, allowing you to set a custom CSP without |
| 327 | 327 | recompiling Fossil or providing a hand-written `<head>` section in the |
| 328 | 328 | Header section of a custom skin. |
| 329 | 329 | |
| 330 | 330 | You can’t remove the CSP entirely with this method, but you can get the |
| 331 | 331 | same effect by telling the browser there are no content restrictions: |
| 332 | 332 | |
| 333 | - $ fossil set th1-setup 'set default_csp {default-src: *}' | |
| 333 | + $ fossil set th1-setup 'set default_csp {default-src *}' | |
| 334 | 334 | |
| 335 | 335 | |
| 336 | 336 | ### <a name="header"></a>Custom Skin Header |
| 337 | 337 | |
| 338 | 338 | Fossil only inserts a CSP into the HTML pages it generates when the |
| 339 | 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 |
| --- 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 @@ | ||
| 1 | 1 | <title>Fossil FAQ</title> |
| 2 | 2 | <h1 align="center">Frequently Asked Questions</h1> |
| 3 | 3 | |
| 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> | |
| 5 | 7 | |
| 6 | 8 | <ol> |
| 7 | 9 | <li><a href="#q1">What GUIs are available for fossil?</a></li> |
| 8 | 10 | <li><a href="#q2">What is the difference between a "branch" and a "fork"?</a></li> |
| 9 | 11 | <li><a href="#q3">How do I create a new branch?</a></li> |
| 10 | 12 | |
| 11 | 13 | 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 |
+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 |
| --- 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 @@ | ||
| 108 | 108 | * Fossil contains a [./wikitheory.wiki | built-in wiki]. |
| 109 | 109 | * An [./event.wiki | Event] is a special kind of wiki page associated |
| 110 | 110 | with a point in time rather than a name. |
| 111 | 111 | * [./settings.wiki | Settings] control the behaviour of Fossil. |
| 112 | 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. | |
| 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 | 118 | * [./stats.wiki | Performance statistics] taken from real-world projects |
| 119 | 119 | hosted on Fossil. |
| 120 | 120 | * How to [./shunning.wiki | delete content] from a Fossil repository. |
| 121 | 121 | * How Fossil does [./password.wiki | password management]. |
| 122 | 122 | * On-line [/help | help]. |
| 123 | 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 | * 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 |
+1
| --- www/mkindex.tcl | ||
| +++ www/mkindex.tcl | ||
| @@ -28,10 +28,11 @@ | ||
| 28 | 28 | checkin.wiki {Check-in Checklist} |
| 29 | 29 | childprojects.wiki {Child Projects} |
| 30 | 30 | copyright-release.html {Contributor License Agreement} |
| 31 | 31 | concepts.wiki {Fossil Core Concepts} |
| 32 | 32 | contribute.wiki {Contributing Code or Documentation To The Fossil Project} |
| 33 | + css-tricks.md {Fossil CSS Tips and Tricks} | |
| 33 | 34 | customgraph.md {Theming: Customizing the Timeline Graph} |
| 34 | 35 | customskin.md {Theming: Customizing The Appearance of Web Pages} |
| 35 | 36 | customskin.md {Custom Skins} |
| 36 | 37 | custom_ticket.wiki {Customizing The Ticket System} |
| 37 | 38 | defcsp.md {The Default Content Security Policy} |
| 38 | 39 |
| --- 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 @@ | ||
| 76 | 76 | <li><a href="whyusefossil.wiki">Control — Benefits Of Version</a></li> |
| 77 | 77 | <li><a href="concepts.wiki">Core Concepts — Fossil</a></li> |
| 78 | 78 | <li><a href="newrepo.wiki">Create A New Fossil Repository — How To</a></li> |
| 79 | 79 | <li><a href="private.wiki"><b>Creating, Syncing, and Deleting Private Branches</b></a></li> |
| 80 | 80 | <li><a href="qandc.wiki">Criticisms — Questions And</a></li> |
| 81 | +<li><a href="css-tricks.md">CSS Tips and Tricks — Fossil</a></li> | |
| 81 | 82 | <li><a href="customskin.md"><b>Custom Skins</b></a></li> |
| 82 | 83 | <li><a href="customskin.md">Customizing The Appearance of Web Pages — Theming:</a></li> |
| 83 | 84 | <li><a href="custom_ticket.wiki"><b>Customizing The Ticket System</b></a></li> |
| 84 | 85 | <li><a href="customgraph.md">Customizing the Timeline Graph — Theming:</a></li> |
| 85 | 86 | <li><a href="tech_overview.wiki">Databases Used By Fossil — SQLite</a></li> |
| @@ -121,10 +122,11 @@ | ||
| 121 | 122 | <li><a href="../../../wiki_rules">Formatting Rules — Wiki</a></li> |
| 122 | 123 | <li><a href="forum.wiki">Forums — Fossil</a></li> |
| 123 | 124 | <li><a href="blockchain.md"><b>Fossil As Blockchain</b></a></li> |
| 124 | 125 | <li><a href="changes.wiki"><b>Fossil Changelog</b></a></li> |
| 125 | 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> | |
| 126 | 128 | <li><a href="delta_encoder_algorithm.wiki"><b>Fossil Delta Encoding Algorithm</b></a></li> |
| 127 | 129 | <li><a href="delta_format.wiki"><b>Fossil Delta Format</b></a></li> |
| 128 | 130 | <li><a href="hacker-howto.wiki"><b>Fossil Developers Guide</b></a></li> |
| 129 | 131 | <li><a href="fileformat.wiki"><b>Fossil File Format</b></a></li> |
| 130 | 132 | <li><a href="forum.wiki"><b>Fossil Forums</b></a></li> |
| @@ -284,12 +286,14 @@ | ||
| 284 | 286 | <li><a href="customgraph.md"><b>Theming: Customizing the Timeline Graph</b></a></li> |
| 285 | 287 | <li><a href="theory1.wiki"><b>Thoughts On The Design Of The Fossil DVCS</b></a></li> |
| 286 | 288 | <li><a href="custom_ticket.wiki">Ticket System — Customizing The</a></li> |
| 287 | 289 | <li><a href="tickets.wiki">Ticket System — The Fossil</a></li> |
| 288 | 290 | <li><a href="customgraph.md">Timeline Graph — Theming: Customizing the</a></li> |
| 291 | +<li><a href="css-tricks.md">Tips and Tricks — Fossil CSS</a></li> | |
| 289 | 292 | <li><a href="hints.wiki">Tips And Usage Hints — Fossil</a></li> |
| 290 | 293 | <li><a href="bugtheory.wiki">Tracking In Fossil — Bug</a></li> |
| 294 | +<li><a href="css-tricks.md">Tricks — Fossil CSS Tips and</a></li> | |
| 291 | 295 | <li><a href="unvers.wiki"><b>Unversioned Files</b></a></li> |
| 292 | 296 | <li><a href="fiveminutes.wiki"><b>Up and Running in 5 Minutes as a Single User</b></a></li> |
| 293 | 297 | <li><a href="hints.wiki">Usage Hints — Fossil Tips And</a></li> |
| 294 | 298 | <li><a href="javascript.md"><b>Use of JavaScript in Fossil</b></a></li> |
| 295 | 299 | <li><a href="fiveminutes.wiki">User — Up and Running in 5 Minutes as a Single</a></li> |
| 296 | 300 |
| --- www/permutedindex.html | |
| +++ www/permutedindex.html | |
| @@ -76,10 +76,11 @@ | |
| 76 | <li><a href="whyusefossil.wiki">Control — Benefits Of Version</a></li> |
| 77 | <li><a href="concepts.wiki">Core Concepts — Fossil</a></li> |
| 78 | <li><a href="newrepo.wiki">Create A New Fossil Repository — 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 — 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 — 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 — Theming:</a></li> |
| 85 | <li><a href="tech_overview.wiki">Databases Used By Fossil — SQLite</a></li> |
| @@ -121,10 +122,11 @@ | |
| 121 | <li><a href="../../../wiki_rules">Formatting Rules — Wiki</a></li> |
| 122 | <li><a href="forum.wiki">Forums — 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 — Customizing The</a></li> |
| 287 | <li><a href="tickets.wiki">Ticket System — The Fossil</a></li> |
| 288 | <li><a href="customgraph.md">Timeline Graph — Theming: Customizing the</a></li> |
| 289 | <li><a href="hints.wiki">Tips And Usage Hints — Fossil</a></li> |
| 290 | <li><a href="bugtheory.wiki">Tracking In Fossil — 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 — 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 — 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 — Benefits Of Version</a></li> |
| 77 | <li><a href="concepts.wiki">Core Concepts — Fossil</a></li> |
| 78 | <li><a href="newrepo.wiki">Create A New Fossil Repository — 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 — Questions And</a></li> |
| 81 | <li><a href="css-tricks.md">CSS Tips and Tricks — 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 — 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 — Theming:</a></li> |
| 86 | <li><a href="tech_overview.wiki">Databases Used By Fossil — SQLite</a></li> |
| @@ -121,10 +122,11 @@ | |
| 122 | <li><a href="../../../wiki_rules">Formatting Rules — Wiki</a></li> |
| 123 | <li><a href="forum.wiki">Forums — 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 — Customizing The</a></li> |
| 289 | <li><a href="tickets.wiki">Ticket System — The Fossil</a></li> |
| 290 | <li><a href="customgraph.md">Timeline Graph — Theming: Customizing the</a></li> |
| 291 | <li><a href="css-tricks.md">Tips and Tricks — Fossil CSS</a></li> |
| 292 | <li><a href="hints.wiki">Tips And Usage Hints — Fossil</a></li> |
| 293 | <li><a href="bugtheory.wiki">Tracking In Fossil — Bug</a></li> |
| 294 | <li><a href="css-tricks.md">Tricks — 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 — 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 — Up and Running in 5 Minutes as a Single</a></li> |
| 300 |
+4
-4
| --- www/qandc.wiki | ||
| +++ www/qandc.wiki | ||
| @@ -1,13 +1,13 @@ | ||
| 1 | 1 | <title>Questions And Criticisms</title> |
| 2 | 2 | <nowiki> |
| 3 | 3 | <h1 align="center">Questions And Criticisms</h1> |
| 4 | 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> | |
| 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 | 9 | |
| 10 | 10 | <b>Fossil sounds like a lot of reinvention of the wheel. |
| 11 | 11 | Why create your own DVCS when you could have reused mercurial?</b> |
| 12 | 12 | |
| 13 | 13 | <blockquote> |
| 14 | 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 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 |
+2
-2
| --- www/wikitheory.wiki | ||
| +++ www/wikitheory.wiki | ||
| @@ -73,13 +73,13 @@ | ||
| 73 | 73 | or "checkin/<i>HASH</i>" are associated with the corresponding |
| 74 | 74 | branch or check-in. The wiki text appears in an "About" section of |
| 75 | 75 | timelines and info screens. Examples: |
| 76 | 76 | |
| 77 | 77 | * [/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] | |
| 79 | 79 | wiki page at the top of the timeline |
| 80 | 80 | * [/info/19c60b7fc9e2] shows the text of the |
| 81 | - [/wiki?name=checkin/19c60b7fc9e2400e56a6f938bbad0e34ca746ca2eabdecac10945539f1f5e8c6|checkin/19c60b7fc9e2...] | |
| 81 | + [/wiki?name=checkin/19c60b7fc9e2400e56a6f938bbad0e34ca746ca2eabdecac10945539f1f5e8c6&p|checkin/19c60b7fc9e2...] | |
| 82 | 82 | wiki page in the "About" section. |
| 83 | 83 | |
| 84 | 84 | This special wiki pages are very useful for recording historical |
| 85 | 85 | notes. |
| 86 | 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|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 |