Fossil SCM
Add an overlooked call to <code>style_set_base_href_suffix()</code> in src/info.c and add a comment of why not to do so for [/help?cmd=/ext|/ext]
Commit
87fba73120dec008593668680b040418eed45bc54b9151af58db894dcb772558
Parent
03b39f1d00ce06e…
2 files changed
+4
+1
+4
| --- src/extcgi.c | ||
| +++ src/extcgi.c | ||
| @@ -228,10 +228,14 @@ | ||
| 228 | 228 | zFailReason = "path does not match any file or script"; |
| 229 | 229 | goto ext_not_found; |
| 230 | 230 | } |
| 231 | 231 | assert( nScript>=nRoot+1 ); |
| 232 | 232 | style_set_current_page("ext/%s", &zScript[nRoot+1]); |
| 233 | + | |
| 234 | + /* FIXME: a call to style_set_base_href_suffix() skipped | |
| 235 | + * because we want #fragment links to work under /ext */ | |
| 236 | + | |
| 233 | 237 | zMime = mimetype_from_name(zScript); |
| 234 | 238 | if( zMime==0 ) zMime = "application/octet-stream"; |
| 235 | 239 | if( !file_isexe(zScript, ExtFILE) ){ |
| 236 | 240 | /* File is not executable. Must be a regular file. In that case, |
| 237 | 241 | ** disallow extra path elements */ |
| 238 | 242 |
| --- src/extcgi.c | |
| +++ src/extcgi.c | |
| @@ -228,10 +228,14 @@ | |
| 228 | zFailReason = "path does not match any file or script"; |
| 229 | goto ext_not_found; |
| 230 | } |
| 231 | assert( nScript>=nRoot+1 ); |
| 232 | style_set_current_page("ext/%s", &zScript[nRoot+1]); |
| 233 | zMime = mimetype_from_name(zScript); |
| 234 | if( zMime==0 ) zMime = "application/octet-stream"; |
| 235 | if( !file_isexe(zScript, ExtFILE) ){ |
| 236 | /* File is not executable. Must be a regular file. In that case, |
| 237 | ** disallow extra path elements */ |
| 238 |
| --- src/extcgi.c | |
| +++ src/extcgi.c | |
| @@ -228,10 +228,14 @@ | |
| 228 | zFailReason = "path does not match any file or script"; |
| 229 | goto ext_not_found; |
| 230 | } |
| 231 | assert( nScript>=nRoot+1 ); |
| 232 | style_set_current_page("ext/%s", &zScript[nRoot+1]); |
| 233 | |
| 234 | /* FIXME: a call to style_set_base_href_suffix() skipped |
| 235 | * because we want #fragment links to work under /ext */ |
| 236 | |
| 237 | zMime = mimetype_from_name(zScript); |
| 238 | if( zMime==0 ) zMime = "application/octet-stream"; |
| 239 | if( !file_isexe(zScript, ExtFILE) ){ |
| 240 | /* File is not executable. Must be a regular file. In that case, |
| 241 | ** disallow extra path elements */ |
| 242 |
+1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -2583,10 +2583,11 @@ | ||
| 2583 | 2583 | style_set_current_page("doc/%S/%T", zCIUuid, zName); |
| 2584 | 2584 | style_set_base_href_suffix("doc/%S/%T", zCIUuid, zName); |
| 2585 | 2585 | }else{ |
| 2586 | 2586 | zHeader = mprintf("%s", file_tail(zName)); |
| 2587 | 2587 | style_set_current_page("doc/tip/%T", zName); |
| 2588 | + style_set_base_href_suffix("doc/tip/%T", zName); | |
| 2588 | 2589 | } |
| 2589 | 2590 | }else if( descOnly ){ |
| 2590 | 2591 | zHeader = mprintf("Artifact Description [%S]", zUuid); |
| 2591 | 2592 | }else{ |
| 2592 | 2593 | zHeader = mprintf("Artifact [%S]", zUuid); |
| 2593 | 2594 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2583,10 +2583,11 @@ | |
| 2583 | style_set_current_page("doc/%S/%T", zCIUuid, zName); |
| 2584 | style_set_base_href_suffix("doc/%S/%T", zCIUuid, zName); |
| 2585 | }else{ |
| 2586 | zHeader = mprintf("%s", file_tail(zName)); |
| 2587 | style_set_current_page("doc/tip/%T", zName); |
| 2588 | } |
| 2589 | }else if( descOnly ){ |
| 2590 | zHeader = mprintf("Artifact Description [%S]", zUuid); |
| 2591 | }else{ |
| 2592 | zHeader = mprintf("Artifact [%S]", zUuid); |
| 2593 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2583,10 +2583,11 @@ | |
| 2583 | style_set_current_page("doc/%S/%T", zCIUuid, zName); |
| 2584 | style_set_base_href_suffix("doc/%S/%T", zCIUuid, zName); |
| 2585 | }else{ |
| 2586 | zHeader = mprintf("%s", file_tail(zName)); |
| 2587 | style_set_current_page("doc/tip/%T", zName); |
| 2588 | style_set_base_href_suffix("doc/tip/%T", zName); |
| 2589 | } |
| 2590 | }else if( descOnly ){ |
| 2591 | zHeader = mprintf("Artifact Description [%S]", zUuid); |
| 2592 | }else{ |
| 2593 | zHeader = mprintf("Artifact [%S]", zUuid); |
| 2594 |