Fossil SCM
merge trunk
Commit
4b9243f6a04bed4f43b68475d4708a31c1600dbb
Parent
82506434d5056c0…
10 files changed
+10
+1
-1
+1
-1
+1
-1
+2
-2
+1
-1
+7
-3
+3
-3
+1
-1
+33
+10
| --- src/add.c | ||
| +++ src/add.c | ||
| @@ -500,10 +500,20 @@ | ||
| 500 | 500 | ** Rename a single file. |
| 501 | 501 | ** |
| 502 | 502 | ** The original name of the file is zOrig. The new filename is zNew. |
| 503 | 503 | */ |
| 504 | 504 | static void mv_one_file(int vid, const char *zOrig, const char *zNew){ |
| 505 | + int x = db_int(-1, "SELECT deleted FROM vfile WHERE pathname=%Q", zNew); | |
| 506 | + if( x>=0 ){ | |
| 507 | + if( x==0 ){ | |
| 508 | + fossil_fatal("cannot rename '%s' to '%s' since another file named '%s'" | |
| 509 | + " is currently under management", zOrig, zNew, zNew); | |
| 510 | + }else{ | |
| 511 | + fossil_fatal("cannot rename '%s' to '%s' since the delete of '%s' has " | |
| 512 | + "not yet been committed", zOrig, zNew, zNew); | |
| 513 | + } | |
| 514 | + } | |
| 505 | 515 | fossil_print("RENAME %s %s\n", zOrig, zNew); |
| 506 | 516 | db_multi_exec( |
| 507 | 517 | "UPDATE vfile SET pathname='%q' WHERE pathname='%q' AND vid=%d", |
| 508 | 518 | zNew, zOrig, vid |
| 509 | 519 | ); |
| 510 | 520 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -500,10 +500,20 @@ | |
| 500 | ** Rename a single file. |
| 501 | ** |
| 502 | ** The original name of the file is zOrig. The new filename is zNew. |
| 503 | */ |
| 504 | static void mv_one_file(int vid, const char *zOrig, const char *zNew){ |
| 505 | fossil_print("RENAME %s %s\n", zOrig, zNew); |
| 506 | db_multi_exec( |
| 507 | "UPDATE vfile SET pathname='%q' WHERE pathname='%q' AND vid=%d", |
| 508 | zNew, zOrig, vid |
| 509 | ); |
| 510 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -500,10 +500,20 @@ | |
| 500 | ** Rename a single file. |
| 501 | ** |
| 502 | ** The original name of the file is zOrig. The new filename is zNew. |
| 503 | */ |
| 504 | static void mv_one_file(int vid, const char *zOrig, const char *zNew){ |
| 505 | int x = db_int(-1, "SELECT deleted FROM vfile WHERE pathname=%Q", zNew); |
| 506 | if( x>=0 ){ |
| 507 | if( x==0 ){ |
| 508 | fossil_fatal("cannot rename '%s' to '%s' since another file named '%s'" |
| 509 | " is currently under management", zOrig, zNew, zNew); |
| 510 | }else{ |
| 511 | fossil_fatal("cannot rename '%s' to '%s' since the delete of '%s' has " |
| 512 | "not yet been committed", zOrig, zNew, zNew); |
| 513 | } |
| 514 | } |
| 515 | fossil_print("RENAME %s %s\n", zOrig, zNew); |
| 516 | db_multi_exec( |
| 517 | "UPDATE vfile SET pathname='%q' WHERE pathname='%q' AND vid=%d", |
| 518 | zNew, zOrig, vid |
| 519 | ); |
| 520 |
+1
-1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -1723,14 +1723,14 @@ | ||
| 1723 | 1723 | } |
| 1724 | 1724 | @ <tr><th>Ticket:</th> |
| 1725 | 1725 | @ <td>%z(href("%R/tktview/%s",zTktName))%s(zTktName)</a></td></tr> |
| 1726 | 1726 | @ <tr><th>Date:</th><td> |
| 1727 | 1727 | hyperlink_to_date(zDate, "</td></tr>"); |
| 1728 | - free(zDate); | |
| 1729 | 1728 | @ <tr><th>User:</th><td> |
| 1730 | 1729 | hyperlink_to_user(pTktChng->zUser, zDate, "</td></tr>"); |
| 1731 | 1730 | @ </table> |
| 1731 | + free(zDate); | |
| 1732 | 1732 | |
| 1733 | 1733 | if( g.perm.ModTkt && modPending ){ |
| 1734 | 1734 | @ <div class="section">Moderation</div> |
| 1735 | 1735 | @ <blockquote> |
| 1736 | 1736 | @ <form method="POST" action="%R/tinfo/%s(zUuid)"> |
| 1737 | 1737 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1723,14 +1723,14 @@ | |
| 1723 | } |
| 1724 | @ <tr><th>Ticket:</th> |
| 1725 | @ <td>%z(href("%R/tktview/%s",zTktName))%s(zTktName)</a></td></tr> |
| 1726 | @ <tr><th>Date:</th><td> |
| 1727 | hyperlink_to_date(zDate, "</td></tr>"); |
| 1728 | free(zDate); |
| 1729 | @ <tr><th>User:</th><td> |
| 1730 | hyperlink_to_user(pTktChng->zUser, zDate, "</td></tr>"); |
| 1731 | @ </table> |
| 1732 | |
| 1733 | if( g.perm.ModTkt && modPending ){ |
| 1734 | @ <div class="section">Moderation</div> |
| 1735 | @ <blockquote> |
| 1736 | @ <form method="POST" action="%R/tinfo/%s(zUuid)"> |
| 1737 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1723,14 +1723,14 @@ | |
| 1723 | } |
| 1724 | @ <tr><th>Ticket:</th> |
| 1725 | @ <td>%z(href("%R/tktview/%s",zTktName))%s(zTktName)</a></td></tr> |
| 1726 | @ <tr><th>Date:</th><td> |
| 1727 | hyperlink_to_date(zDate, "</td></tr>"); |
| 1728 | @ <tr><th>User:</th><td> |
| 1729 | hyperlink_to_user(pTktChng->zUser, zDate, "</td></tr>"); |
| 1730 | @ </table> |
| 1731 | free(zDate); |
| 1732 | |
| 1733 | if( g.perm.ModTkt && modPending ){ |
| 1734 | @ <div class="section">Moderation</div> |
| 1735 | @ <blockquote> |
| 1736 | @ <form method="POST" action="%R/tinfo/%s(zUuid)"> |
| 1737 |
+1
-1
| --- src/login.c | ||
| +++ src/login.c | ||
| @@ -1145,11 +1145,11 @@ | ||
| 1145 | 1145 | db_exists("SELECT 1 FROM user" |
| 1146 | 1146 | " WHERE login='anonymous'" |
| 1147 | 1147 | " AND cap LIKE '%%h%%'") ){ |
| 1148 | 1148 | const char *zUrl = PD("REQUEST_URI", "index"); |
| 1149 | 1149 | @ <p>Many <span class="disabled">hyperlinks are disabled.</span><br /> |
| 1150 | - @ Use <a href="%s(g.zTop)/login?anon=1&g=%T(zUrl)">anonymous login</a> | |
| 1150 | + @ Use <a href="%s(g.zTop)/login?anon=1&g=%T(zUrl)">anonymous login</a> | |
| 1151 | 1151 | @ to enable hyperlinks.</p> |
| 1152 | 1152 | } |
| 1153 | 1153 | } |
| 1154 | 1154 | |
| 1155 | 1155 | /* |
| 1156 | 1156 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -1145,11 +1145,11 @@ | |
| 1145 | db_exists("SELECT 1 FROM user" |
| 1146 | " WHERE login='anonymous'" |
| 1147 | " AND cap LIKE '%%h%%'") ){ |
| 1148 | const char *zUrl = PD("REQUEST_URI", "index"); |
| 1149 | @ <p>Many <span class="disabled">hyperlinks are disabled.</span><br /> |
| 1150 | @ Use <a href="%s(g.zTop)/login?anon=1&g=%T(zUrl)">anonymous login</a> |
| 1151 | @ to enable hyperlinks.</p> |
| 1152 | } |
| 1153 | } |
| 1154 | |
| 1155 | /* |
| 1156 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -1145,11 +1145,11 @@ | |
| 1145 | db_exists("SELECT 1 FROM user" |
| 1146 | " WHERE login='anonymous'" |
| 1147 | " AND cap LIKE '%%h%%'") ){ |
| 1148 | const char *zUrl = PD("REQUEST_URI", "index"); |
| 1149 | @ <p>Many <span class="disabled">hyperlinks are disabled.</span><br /> |
| 1150 | @ Use <a href="%s(g.zTop)/login?anon=1&g=%T(zUrl)">anonymous login</a> |
| 1151 | @ to enable hyperlinks.</p> |
| 1152 | } |
| 1153 | } |
| 1154 | |
| 1155 | /* |
| 1156 |
+1
-1
| --- src/report.c | ||
| +++ src/report.c | ||
| @@ -60,11 +60,11 @@ | ||
| 60 | 60 | } else { |
| 61 | 61 | blob_appendf(&ril, "%z%h</a>", href("%R/rptview?rn=%d", rn), zTitle); |
| 62 | 62 | } |
| 63 | 63 | blob_appendf(&ril, " "); |
| 64 | 64 | if( g.perm.Write && zOwner && zOwner[0] ){ |
| 65 | - blob_appendf(&ril, "(by <i>%h</i></i>) ", zOwner); | |
| 65 | + blob_appendf(&ril, "(by <i>%h</i>) ", zOwner); | |
| 66 | 66 | } |
| 67 | 67 | if( g.perm.TktFmt ){ |
| 68 | 68 | blob_appendf(&ril, "[%zcopy</a>] ", |
| 69 | 69 | href("%R/rptedit?rn=%d©=1", rn)); |
| 70 | 70 | } |
| 71 | 71 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -60,11 +60,11 @@ | |
| 60 | } else { |
| 61 | blob_appendf(&ril, "%z%h</a>", href("%R/rptview?rn=%d", rn), zTitle); |
| 62 | } |
| 63 | blob_appendf(&ril, " "); |
| 64 | if( g.perm.Write && zOwner && zOwner[0] ){ |
| 65 | blob_appendf(&ril, "(by <i>%h</i></i>) ", zOwner); |
| 66 | } |
| 67 | if( g.perm.TktFmt ){ |
| 68 | blob_appendf(&ril, "[%zcopy</a>] ", |
| 69 | href("%R/rptedit?rn=%d©=1", rn)); |
| 70 | } |
| 71 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -60,11 +60,11 @@ | |
| 60 | } else { |
| 61 | blob_appendf(&ril, "%z%h</a>", href("%R/rptview?rn=%d", rn), zTitle); |
| 62 | } |
| 63 | blob_appendf(&ril, " "); |
| 64 | if( g.perm.Write && zOwner && zOwner[0] ){ |
| 65 | blob_appendf(&ril, "(by <i>%h</i>) ", zOwner); |
| 66 | } |
| 67 | if( g.perm.TktFmt ){ |
| 68 | blob_appendf(&ril, "[%zcopy</a>] ", |
| 69 | href("%R/rptedit?rn=%d©=1", rn)); |
| 70 | } |
| 71 |
+2
-2
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -62,11 +62,11 @@ | ||
| 62 | 62 | |
| 63 | 63 | /* Make sure the header contains <base href="...">. Issue a warning |
| 64 | 64 | ** if it does not. */ |
| 65 | 65 | if( !cgi_header_contains("<base href=") ){ |
| 66 | 66 | @ <p class="generalError"><b>Configuration Error:</b> Please add |
| 67 | - @ <tt><base href="$baseurl/$current_page"></tt> after | |
| 67 | + @ <tt><base href="$baseurl/$current_page"></tt> after | |
| 68 | 68 | @ <tt><head></tt> in the <a href="setup_header">HTML header</a>!</p> |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | @ <table border="0" cellspacing="7"> |
| 72 | 72 | setup_menu_entry("Users", "setup_ulist", |
| @@ -1352,11 +1352,11 @@ | ||
| 1352 | 1352 | |
| 1353 | 1353 | /* Make sure the header contains <base href="...">. Issue a warning |
| 1354 | 1354 | ** if it does not. */ |
| 1355 | 1355 | if( !cgi_header_contains("<base href=") ){ |
| 1356 | 1356 | @ <p class="generalError">Please add |
| 1357 | - @ <tt><base href="$baseurl/$current_page"></tt> after | |
| 1357 | + @ <tt><base href="$baseurl/$current_page"></tt> after | |
| 1358 | 1358 | @ <tt><head></tt> in the header! |
| 1359 | 1359 | @ <input type="submit" name="fixbase" value="Add <base> Now"></p> |
| 1360 | 1360 | } |
| 1361 | 1361 | |
| 1362 | 1362 | login_insert_csrf_secret(); |
| 1363 | 1363 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -62,11 +62,11 @@ | |
| 62 | |
| 63 | /* Make sure the header contains <base href="...">. Issue a warning |
| 64 | ** if it does not. */ |
| 65 | if( !cgi_header_contains("<base href=") ){ |
| 66 | @ <p class="generalError"><b>Configuration Error:</b> Please add |
| 67 | @ <tt><base href="$baseurl/$current_page"></tt> after |
| 68 | @ <tt><head></tt> in the <a href="setup_header">HTML header</a>!</p> |
| 69 | } |
| 70 | |
| 71 | @ <table border="0" cellspacing="7"> |
| 72 | setup_menu_entry("Users", "setup_ulist", |
| @@ -1352,11 +1352,11 @@ | |
| 1352 | |
| 1353 | /* Make sure the header contains <base href="...">. Issue a warning |
| 1354 | ** if it does not. */ |
| 1355 | if( !cgi_header_contains("<base href=") ){ |
| 1356 | @ <p class="generalError">Please add |
| 1357 | @ <tt><base href="$baseurl/$current_page"></tt> after |
| 1358 | @ <tt><head></tt> in the header! |
| 1359 | @ <input type="submit" name="fixbase" value="Add <base> Now"></p> |
| 1360 | } |
| 1361 | |
| 1362 | login_insert_csrf_secret(); |
| 1363 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -62,11 +62,11 @@ | |
| 62 | |
| 63 | /* Make sure the header contains <base href="...">. Issue a warning |
| 64 | ** if it does not. */ |
| 65 | if( !cgi_header_contains("<base href=") ){ |
| 66 | @ <p class="generalError"><b>Configuration Error:</b> Please add |
| 67 | @ <tt><base href="$baseurl/$current_page"></tt> after |
| 68 | @ <tt><head></tt> in the <a href="setup_header">HTML header</a>!</p> |
| 69 | } |
| 70 | |
| 71 | @ <table border="0" cellspacing="7"> |
| 72 | setup_menu_entry("Users", "setup_ulist", |
| @@ -1352,11 +1352,11 @@ | |
| 1352 | |
| 1353 | /* Make sure the header contains <base href="...">. Issue a warning |
| 1354 | ** if it does not. */ |
| 1355 | if( !cgi_header_contains("<base href=") ){ |
| 1356 | @ <p class="generalError">Please add |
| 1357 | @ <tt><base href="$baseurl/$current_page"></tt> after |
| 1358 | @ <tt><head></tt> in the header! |
| 1359 | @ <input type="submit" name="fixbase" value="Add <base> Now"></p> |
| 1360 | } |
| 1361 | |
| 1362 | login_insert_csrf_secret(); |
| 1363 |
+1
-1
| --- src/skins.c | ||
| +++ src/skins.c | ||
| @@ -1218,11 +1218,11 @@ | ||
| 1218 | 1218 | @ set fossilUrl http://www.fossil-scm.org |
| 1219 | 1219 | @ </th1> |
| 1220 | 1220 | @ <a href="$fossilUrl/">Fossil</a> |
| 1221 | 1221 | @ version $release_version $tclVersion |
| 1222 | 1222 | @ <a href="$fossilUrl/index.html/info/$version">$manifest_version</a> |
| 1223 | -@ <a href="$fossilUrl/fossil/timeline?c=$manifest_date&y=ci">$manifest_date</a> | |
| 1223 | +@ <a href="$fossilUrl/fossil/timeline?c=$manifest_date&y=ci">$manifest_date</a> | |
| 1224 | 1224 | @ </div> |
| 1225 | 1225 | @ </body></html> |
| 1226 | 1226 | @ '); |
| 1227 | 1227 | ; |
| 1228 | 1228 | |
| 1229 | 1229 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -1218,11 +1218,11 @@ | |
| 1218 | @ set fossilUrl http://www.fossil-scm.org |
| 1219 | @ </th1> |
| 1220 | @ <a href="$fossilUrl/">Fossil</a> |
| 1221 | @ version $release_version $tclVersion |
| 1222 | @ <a href="$fossilUrl/index.html/info/$version">$manifest_version</a> |
| 1223 | @ <a href="$fossilUrl/fossil/timeline?c=$manifest_date&y=ci">$manifest_date</a> |
| 1224 | @ </div> |
| 1225 | @ </body></html> |
| 1226 | @ '); |
| 1227 | ; |
| 1228 | |
| 1229 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -1218,11 +1218,11 @@ | |
| 1218 | @ set fossilUrl http://www.fossil-scm.org |
| 1219 | @ </th1> |
| 1220 | @ <a href="$fossilUrl/">Fossil</a> |
| 1221 | @ version $release_version $tclVersion |
| 1222 | @ <a href="$fossilUrl/index.html/info/$version">$manifest_version</a> |
| 1223 | @ <a href="$fossilUrl/fossil/timeline?c=$manifest_date&y=ci">$manifest_date</a> |
| 1224 | @ </div> |
| 1225 | @ </body></html> |
| 1226 | @ '); |
| 1227 | ; |
| 1228 | |
| 1229 |
+7
-3
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -90,11 +90,13 @@ | ||
| 90 | 90 | va_list ap; |
| 91 | 91 | va_start(ap, zFormat); |
| 92 | 92 | zUrl = vmprintf(zFormat, ap); |
| 93 | 93 | va_end(ap); |
| 94 | 94 | if( g.perm.Hyperlink && !g.javascriptHyperlink ){ |
| 95 | - return mprintf("<a %s href=\"%z\">", zExtra, zUrl); | |
| 95 | + char *zHUrl = mprintf("<a %s href=\"%h\">", zExtra, zUrl); | |
| 96 | + fossil_free(zUrl); | |
| 97 | + return zHUrl; | |
| 96 | 98 | } |
| 97 | 99 | if( nHref>=nHrefAlloc ){ |
| 98 | 100 | nHrefAlloc = nHrefAlloc*2 + 10; |
| 99 | 101 | aHref = fossil_realloc(aHref, nHrefAlloc*sizeof(aHref[0])); |
| 100 | 102 | } |
| @@ -106,11 +108,13 @@ | ||
| 106 | 108 | va_list ap; |
| 107 | 109 | va_start(ap, zFormat); |
| 108 | 110 | zUrl = vmprintf(zFormat, ap); |
| 109 | 111 | va_end(ap); |
| 110 | 112 | if( g.perm.Hyperlink && !g.javascriptHyperlink ){ |
| 111 | - return mprintf("<a href=\"%z\">", zUrl); | |
| 113 | + char *zHUrl = mprintf("<a href=\"%h\">", zUrl); | |
| 114 | + fossil_free(zUrl); | |
| 115 | + return zHUrl; | |
| 112 | 116 | } |
| 113 | 117 | if( nHref>=nHrefAlloc ){ |
| 114 | 118 | nHrefAlloc = nHrefAlloc*2 + 10; |
| 115 | 119 | aHref = fossil_realloc(aHref, nHrefAlloc*sizeof(aHref[0])); |
| 116 | 120 | } |
| @@ -278,11 +282,11 @@ | ||
| 278 | 282 | for(i=0; i<nSubmenu; i++){ |
| 279 | 283 | struct Submenu *p = &aSubmenu[i]; |
| 280 | 284 | if( p->zLink==0 ){ |
| 281 | 285 | @ <span class="label">%h(p->zLabel)</span> |
| 282 | 286 | }else{ |
| 283 | - @ <a class="label" href="%s(p->zLink)">%h(p->zLabel)</a> | |
| 287 | + @ <a class="label" href="%h(p->zLink)">%h(p->zLabel)</a> | |
| 284 | 288 | } |
| 285 | 289 | } |
| 286 | 290 | @ </div> |
| 287 | 291 | } |
| 288 | 292 | style_ad_unit(); |
| 289 | 293 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -90,11 +90,13 @@ | |
| 90 | va_list ap; |
| 91 | va_start(ap, zFormat); |
| 92 | zUrl = vmprintf(zFormat, ap); |
| 93 | va_end(ap); |
| 94 | if( g.perm.Hyperlink && !g.javascriptHyperlink ){ |
| 95 | return mprintf("<a %s href=\"%z\">", zExtra, zUrl); |
| 96 | } |
| 97 | if( nHref>=nHrefAlloc ){ |
| 98 | nHrefAlloc = nHrefAlloc*2 + 10; |
| 99 | aHref = fossil_realloc(aHref, nHrefAlloc*sizeof(aHref[0])); |
| 100 | } |
| @@ -106,11 +108,13 @@ | |
| 106 | va_list ap; |
| 107 | va_start(ap, zFormat); |
| 108 | zUrl = vmprintf(zFormat, ap); |
| 109 | va_end(ap); |
| 110 | if( g.perm.Hyperlink && !g.javascriptHyperlink ){ |
| 111 | return mprintf("<a href=\"%z\">", zUrl); |
| 112 | } |
| 113 | if( nHref>=nHrefAlloc ){ |
| 114 | nHrefAlloc = nHrefAlloc*2 + 10; |
| 115 | aHref = fossil_realloc(aHref, nHrefAlloc*sizeof(aHref[0])); |
| 116 | } |
| @@ -278,11 +282,11 @@ | |
| 278 | for(i=0; i<nSubmenu; i++){ |
| 279 | struct Submenu *p = &aSubmenu[i]; |
| 280 | if( p->zLink==0 ){ |
| 281 | @ <span class="label">%h(p->zLabel)</span> |
| 282 | }else{ |
| 283 | @ <a class="label" href="%s(p->zLink)">%h(p->zLabel)</a> |
| 284 | } |
| 285 | } |
| 286 | @ </div> |
| 287 | } |
| 288 | style_ad_unit(); |
| 289 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -90,11 +90,13 @@ | |
| 90 | va_list ap; |
| 91 | va_start(ap, zFormat); |
| 92 | zUrl = vmprintf(zFormat, ap); |
| 93 | va_end(ap); |
| 94 | if( g.perm.Hyperlink && !g.javascriptHyperlink ){ |
| 95 | char *zHUrl = mprintf("<a %s href=\"%h\">", zExtra, zUrl); |
| 96 | fossil_free(zUrl); |
| 97 | return zHUrl; |
| 98 | } |
| 99 | if( nHref>=nHrefAlloc ){ |
| 100 | nHrefAlloc = nHrefAlloc*2 + 10; |
| 101 | aHref = fossil_realloc(aHref, nHrefAlloc*sizeof(aHref[0])); |
| 102 | } |
| @@ -106,11 +108,13 @@ | |
| 108 | va_list ap; |
| 109 | va_start(ap, zFormat); |
| 110 | zUrl = vmprintf(zFormat, ap); |
| 111 | va_end(ap); |
| 112 | if( g.perm.Hyperlink && !g.javascriptHyperlink ){ |
| 113 | char *zHUrl = mprintf("<a href=\"%h\">", zUrl); |
| 114 | fossil_free(zUrl); |
| 115 | return zHUrl; |
| 116 | } |
| 117 | if( nHref>=nHrefAlloc ){ |
| 118 | nHrefAlloc = nHrefAlloc*2 + 10; |
| 119 | aHref = fossil_realloc(aHref, nHrefAlloc*sizeof(aHref[0])); |
| 120 | } |
| @@ -278,11 +282,11 @@ | |
| 282 | for(i=0; i<nSubmenu; i++){ |
| 283 | struct Submenu *p = &aSubmenu[i]; |
| 284 | if( p->zLink==0 ){ |
| 285 | @ <span class="label">%h(p->zLabel)</span> |
| 286 | }else{ |
| 287 | @ <a class="label" href="%h(p->zLink)">%h(p->zLabel)</a> |
| 288 | } |
| 289 | } |
| 290 | @ </div> |
| 291 | } |
| 292 | style_ad_unit(); |
| 293 |
+3
-3
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -373,11 +373,11 @@ | ||
| 373 | 373 | /* Generate the "user: USERNAME" at the end of the comment, together |
| 374 | 374 | ** with a hyperlink to another timeline for that user. |
| 375 | 375 | */ |
| 376 | 376 | if( zTagList && zTagList[0]==0 ) zTagList = 0; |
| 377 | 377 | if( g.perm.Hyperlink && fossil_strcmp(zUser, zThisUser)!=0 ){ |
| 378 | - char *zLink = mprintf("%R/timeline?u=%h&c=%t&nd", zUser, zDate); | |
| 378 | + char *zLink = mprintf("%R/timeline?u=%h&c=%t&nd", zUser, zDate); | |
| 379 | 379 | @ (user: %z(href("%z",zLink))%h(zUser)</a>%s(zTagList?",":"\051") |
| 380 | 380 | }else{ |
| 381 | 381 | @ (user: %h(zUser)%s(zTagList?",":"\051") |
| 382 | 382 | } |
| 383 | 383 | |
| @@ -398,11 +398,11 @@ | ||
| 398 | 398 | while( z && z[0] ){ |
| 399 | 399 | for(i=0; z[i] && (z[i]!=',' || z[i+1]!=' '); i++){} |
| 400 | 400 | if( zThisTag==0 || memcmp(z, zThisTag, i)!=0 || zThisTag[i]!=0 ){ |
| 401 | 401 | blob_appendf(&links, |
| 402 | 402 | "%z%#h</a>%.2s", |
| 403 | - href("%R/timeline?r=%#t&nd&c=%t",i,z,zDate), i,z, &z[i] | |
| 403 | + href("%R/timeline?r=%#t&nd&c=%t",i,z,zDate), i,z, &z[i] | |
| 404 | 404 | ); |
| 405 | 405 | }else{ |
| 406 | 406 | blob_appendf(&links, "%#h", i+2, z); |
| 407 | 407 | } |
| 408 | 408 | if( z[i]==0 ) break; |
| @@ -1662,10 +1662,10 @@ | ||
| 1662 | 1662 | " AND blob.rid=c.cid" |
| 1663 | 1663 | ); |
| 1664 | 1664 | while( db_step(&q)==SQLITE_ROW ){ |
| 1665 | 1665 | const char *zUuid = db_column_text(&q, 0); |
| 1666 | 1666 | @ <li> |
| 1667 | - @ <a href="%s(g.zTop)/timeline?p=%S(zUuid)&d=%S(zUuid)">%S(zUuid)</a> | |
| 1667 | + @ <a href="%s(g.zTop)/timeline?p=%S(zUuid)&d=%S(zUuid)">%S(zUuid)</a> | |
| 1668 | 1668 | } |
| 1669 | 1669 | db_finalize(&q); |
| 1670 | 1670 | style_footer(); |
| 1671 | 1671 | } |
| 1672 | 1672 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -373,11 +373,11 @@ | |
| 373 | /* Generate the "user: USERNAME" at the end of the comment, together |
| 374 | ** with a hyperlink to another timeline for that user. |
| 375 | */ |
| 376 | if( zTagList && zTagList[0]==0 ) zTagList = 0; |
| 377 | if( g.perm.Hyperlink && fossil_strcmp(zUser, zThisUser)!=0 ){ |
| 378 | char *zLink = mprintf("%R/timeline?u=%h&c=%t&nd", zUser, zDate); |
| 379 | @ (user: %z(href("%z",zLink))%h(zUser)</a>%s(zTagList?",":"\051") |
| 380 | }else{ |
| 381 | @ (user: %h(zUser)%s(zTagList?",":"\051") |
| 382 | } |
| 383 | |
| @@ -398,11 +398,11 @@ | |
| 398 | while( z && z[0] ){ |
| 399 | for(i=0; z[i] && (z[i]!=',' || z[i+1]!=' '); i++){} |
| 400 | if( zThisTag==0 || memcmp(z, zThisTag, i)!=0 || zThisTag[i]!=0 ){ |
| 401 | blob_appendf(&links, |
| 402 | "%z%#h</a>%.2s", |
| 403 | href("%R/timeline?r=%#t&nd&c=%t",i,z,zDate), i,z, &z[i] |
| 404 | ); |
| 405 | }else{ |
| 406 | blob_appendf(&links, "%#h", i+2, z); |
| 407 | } |
| 408 | if( z[i]==0 ) break; |
| @@ -1662,10 +1662,10 @@ | |
| 1662 | " AND blob.rid=c.cid" |
| 1663 | ); |
| 1664 | while( db_step(&q)==SQLITE_ROW ){ |
| 1665 | const char *zUuid = db_column_text(&q, 0); |
| 1666 | @ <li> |
| 1667 | @ <a href="%s(g.zTop)/timeline?p=%S(zUuid)&d=%S(zUuid)">%S(zUuid)</a> |
| 1668 | } |
| 1669 | db_finalize(&q); |
| 1670 | style_footer(); |
| 1671 | } |
| 1672 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -373,11 +373,11 @@ | |
| 373 | /* Generate the "user: USERNAME" at the end of the comment, together |
| 374 | ** with a hyperlink to another timeline for that user. |
| 375 | */ |
| 376 | if( zTagList && zTagList[0]==0 ) zTagList = 0; |
| 377 | if( g.perm.Hyperlink && fossil_strcmp(zUser, zThisUser)!=0 ){ |
| 378 | char *zLink = mprintf("%R/timeline?u=%h&c=%t&nd", zUser, zDate); |
| 379 | @ (user: %z(href("%z",zLink))%h(zUser)</a>%s(zTagList?",":"\051") |
| 380 | }else{ |
| 381 | @ (user: %h(zUser)%s(zTagList?",":"\051") |
| 382 | } |
| 383 | |
| @@ -398,11 +398,11 @@ | |
| 398 | while( z && z[0] ){ |
| 399 | for(i=0; z[i] && (z[i]!=',' || z[i+1]!=' '); i++){} |
| 400 | if( zThisTag==0 || memcmp(z, zThisTag, i)!=0 || zThisTag[i]!=0 ){ |
| 401 | blob_appendf(&links, |
| 402 | "%z%#h</a>%.2s", |
| 403 | href("%R/timeline?r=%#t&nd&c=%t",i,z,zDate), i,z, &z[i] |
| 404 | ); |
| 405 | }else{ |
| 406 | blob_appendf(&links, "%#h", i+2, z); |
| 407 | } |
| 408 | if( z[i]==0 ) break; |
| @@ -1662,10 +1662,10 @@ | |
| 1662 | " AND blob.rid=c.cid" |
| 1663 | ); |
| 1664 | while( db_step(&q)==SQLITE_ROW ){ |
| 1665 | const char *zUuid = db_column_text(&q, 0); |
| 1666 | @ <li> |
| 1667 | @ <a href="%s(g.zTop)/timeline?p=%S(zUuid)&d=%S(zUuid)">%S(zUuid)</a> |
| 1668 | } |
| 1669 | db_finalize(&q); |
| 1670 | style_footer(); |
| 1671 | } |
| 1672 |
+1
-1
| --- src/url.c | ||
| +++ src/url.c | ||
| @@ -352,11 +352,11 @@ | ||
| 352 | 352 | z = zValue2; |
| 353 | 353 | if( z==0 ) continue; |
| 354 | 354 | } |
| 355 | 355 | blob_appendf(&p->url, "%s%s", zSep, p->azName[i]); |
| 356 | 356 | if( z && z[0] ) blob_appendf(&p->url, "=%T", z); |
| 357 | - zSep = "&"; | |
| 357 | + zSep = "&"; | |
| 358 | 358 | } |
| 359 | 359 | if( zName1 && zValue1 ){ |
| 360 | 360 | blob_appendf(&p->url, "%s%s", zSep, zName1); |
| 361 | 361 | if( zValue1[0] ) blob_appendf(&p->url, "=%T", zValue1); |
| 362 | 362 | } |
| 363 | 363 | |
| 364 | 364 | ADDED test/valgrind-www.tcl |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -352,11 +352,11 @@ | |
| 352 | z = zValue2; |
| 353 | if( z==0 ) continue; |
| 354 | } |
| 355 | blob_appendf(&p->url, "%s%s", zSep, p->azName[i]); |
| 356 | if( z && z[0] ) blob_appendf(&p->url, "=%T", z); |
| 357 | zSep = "&"; |
| 358 | } |
| 359 | if( zName1 && zValue1 ){ |
| 360 | blob_appendf(&p->url, "%s%s", zSep, zName1); |
| 361 | if( zValue1[0] ) blob_appendf(&p->url, "=%T", zValue1); |
| 362 | } |
| 363 | |
| 364 | DDED test/valgrind-www.tcl |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -352,11 +352,11 @@ | |
| 352 | z = zValue2; |
| 353 | if( z==0 ) continue; |
| 354 | } |
| 355 | blob_appendf(&p->url, "%s%s", zSep, p->azName[i]); |
| 356 | if( z && z[0] ) blob_appendf(&p->url, "=%T", z); |
| 357 | zSep = "&"; |
| 358 | } |
| 359 | if( zName1 && zValue1 ){ |
| 360 | blob_appendf(&p->url, "%s%s", zSep, zName1); |
| 361 | if( zValue1[0] ) blob_appendf(&p->url, "=%T", zValue1); |
| 362 | } |
| 363 | |
| 364 | DDED test/valgrind-www.tcl |
+33
| --- a/test/valgrind-www.tcl | ||
| +++ b/test/valgrind-www.tcl | ||
| @@ -0,0 +1,33 @@ | ||
| 1 | +#!/usr/bin/tclsh | |
| 2 | +# | |
| 3 | +# Run this script in an open Fossil checkout at the top-level with a | |
| 4 | +# fresh build of Fossil itself. This script will run fossil on hundreds | |
| 5 | +# of different web-pages looking for memory allocation problems using y allocation problems using | |
| 6 | +# valgrind. Valgrind output appears on stderr. Suggested test scenario: | |
| 7 | +# | |
| 8 | +# make | |
| 9 | +# tclsh valgrind-www.tcl 2>&1 | tee valgrind-out.txt | |
| 10 | +# | |
| 11 | +# Then examine the valgrind-out.txt file for issues. | |
| 12 | +# | |
| 13 | +proc run_query {url} { | |
| 14 | + set fd [open q.txt w] | |
| 15 | + puts $fd "GET $url HTTreturn [url HTTP/1.0\r\n\r" | |
| 16 | + c]/fossil test-http <q.txt 2>@ stderr} msg | |
| 17 | + return $msg | |
| 18 | +} | |
| 19 | +set todo {} | |
| 20 | +foreach url { | |
| 21 | + /home | |
| 22 | + /timeli/tclsh | |
| 23 | +# | |
| 24 | +# Run this scrip#!/usr/bin/tclsh | |
| 25 | +# | |
| 26 | +# Run this script in an open Fossil checkout at the top-lding>0 && $i<$limit} {incr i} { | |
| 27 | + set url [get_pending] | |
| 28 | + puts "====== ([expr {$i+1}]) $url ======" | |
| 29 | + set x [run_query $url] | |
| 30 | + while {[regexp {<[aA] .*?href="(/[a-z].*?)".*?>(.*)$} $x all url tail]} { | |
| 31 | + set u2 [string map {< < > > " \" & &} $url] | |
| 32 | + if {![info exists seen($u2)]} { | |
| 33 | + set pendlappend tod |
| --- a/test/valgrind-www.tcl | |
| +++ b/test/valgrind-www.tcl | |
| @@ -0,0 +1,33 @@ | |
| --- a/test/valgrind-www.tcl | |
| +++ b/test/valgrind-www.tcl | |
| @@ -0,0 +1,33 @@ | |
| 1 | #!/usr/bin/tclsh |
| 2 | # |
| 3 | # Run this script in an open Fossil checkout at the top-level with a |
| 4 | # fresh build of Fossil itself. This script will run fossil on hundreds |
| 5 | # of different web-pages looking for memory allocation problems using y allocation problems using |
| 6 | # valgrind. Valgrind output appears on stderr. Suggested test scenario: |
| 7 | # |
| 8 | # make |
| 9 | # tclsh valgrind-www.tcl 2>&1 | tee valgrind-out.txt |
| 10 | # |
| 11 | # Then examine the valgrind-out.txt file for issues. |
| 12 | # |
| 13 | proc run_query {url} { |
| 14 | set fd [open q.txt w] |
| 15 | puts $fd "GET $url HTTreturn [url HTTP/1.0\r\n\r" |
| 16 | c]/fossil test-http <q.txt 2>@ stderr} msg |
| 17 | return $msg |
| 18 | } |
| 19 | set todo {} |
| 20 | foreach url { |
| 21 | /home |
| 22 | /timeli/tclsh |
| 23 | # |
| 24 | # Run this scrip#!/usr/bin/tclsh |
| 25 | # |
| 26 | # Run this script in an open Fossil checkout at the top-lding>0 && $i<$limit} {incr i} { |
| 27 | set url [get_pending] |
| 28 | puts "====== ([expr {$i+1}]) $url ======" |
| 29 | set x [run_query $url] |
| 30 | while {[regexp {<[aA] .*?href="(/[a-z].*?)".*?>(.*)$} $x all url tail]} { |
| 31 | set u2 [string map {< < > > " \" & &} $url] |
| 32 | if {![info exists seen($u2)]} { |
| 33 | set pendlappend tod |