Fossil SCM

Fix the repolist function for CGI server invocations, apparently broken by check-in [ec56c69fe98d26d9]

drh 2019-08-03 19:49 trunk
Commit 534b060007692cc87a8c3e14d7d048b51c1b098e16c5127dc6d68b53aec2b44d
2 files changed +1 -1 +2 -2
+1 -1
--- src/main.c
+++ src/main.c
@@ -1580,11 +1580,11 @@
15801580
** repository to be used, or else no repository could be found an
15811581
** some kind of error response is required.
15821582
*/
15831583
if( szFile<1024 ){
15841584
set_base_url(0);
1585
- if( strcmp(zPathInfo,"/")==0
1585
+ if( (zPathInfo[0]==0 || strcmp(zPathInfo,"/")==0)
15861586
&& allowRepoList
15871587
&& repo_list_page() ){
15881588
/* Will return a list of repositories */
15891589
}else if( zNotFound ){
15901590
cgi_redirect(zNotFound);
15911591
--- src/main.c
+++ src/main.c
@@ -1580,11 +1580,11 @@
1580 ** repository to be used, or else no repository could be found an
1581 ** some kind of error response is required.
1582 */
1583 if( szFile<1024 ){
1584 set_base_url(0);
1585 if( strcmp(zPathInfo,"/")==0
1586 && allowRepoList
1587 && repo_list_page() ){
1588 /* Will return a list of repositories */
1589 }else if( zNotFound ){
1590 cgi_redirect(zNotFound);
1591
--- src/main.c
+++ src/main.c
@@ -1580,11 +1580,11 @@
1580 ** repository to be used, or else no repository could be found an
1581 ** some kind of error response is required.
1582 */
1583 if( szFile<1024 ){
1584 set_base_url(0);
1585 if( (zPathInfo[0]==0 || strcmp(zPathInfo,"/")==0)
1586 && allowRepoList
1587 && repo_list_page() ){
1588 /* Will return a list of repositories */
1589 }else if( zNotFound ){
1590 cgi_redirect(zNotFound);
1591
+2 -2
--- src/repolist.c
+++ src/repolist.c
@@ -206,15 +206,15 @@
206206
} else if( sqlite3_strglob("*/.*", zName)==0 ){
207207
/* Do not show hyperlinks for hidden repos */
208208
blob_append_sql(&html, "%h (hidden)", zName);
209209
} else if( allRepo && sqlite3_strglob("[a-zA-Z]:/?*", zName)!=0 ){
210210
blob_append_sql(&html,
211
- "<a href='/%T/home' target='_blank'>/%h</a>\n",
211
+ "<a href='%R/%T/home' target='_blank'>/%h</a>\n",
212212
zUrl, zName);
213213
}else{
214214
blob_append_sql(&html,
215
- "<a href='/%T/home' target='_blank'>%h</a>\n",
215
+ "<a href='%R/%T/home' target='_blank'>%h</a>\n",
216216
zUrl, zName);
217217
}
218218
if( x.zProjName ){
219219
blob_append_sql(&html, "<td></td><td>%h</td>\n", x.zProjName);
220220
fossil_free(x.zProjName);
221221
--- src/repolist.c
+++ src/repolist.c
@@ -206,15 +206,15 @@
206 } else if( sqlite3_strglob("*/.*", zName)==0 ){
207 /* Do not show hyperlinks for hidden repos */
208 blob_append_sql(&html, "%h (hidden)", zName);
209 } else if( allRepo && sqlite3_strglob("[a-zA-Z]:/?*", zName)!=0 ){
210 blob_append_sql(&html,
211 "<a href='/%T/home' target='_blank'>/%h</a>\n",
212 zUrl, zName);
213 }else{
214 blob_append_sql(&html,
215 "<a href='/%T/home' target='_blank'>%h</a>\n",
216 zUrl, zName);
217 }
218 if( x.zProjName ){
219 blob_append_sql(&html, "<td></td><td>%h</td>\n", x.zProjName);
220 fossil_free(x.zProjName);
221
--- src/repolist.c
+++ src/repolist.c
@@ -206,15 +206,15 @@
206 } else if( sqlite3_strglob("*/.*", zName)==0 ){
207 /* Do not show hyperlinks for hidden repos */
208 blob_append_sql(&html, "%h (hidden)", zName);
209 } else if( allRepo && sqlite3_strglob("[a-zA-Z]:/?*", zName)!=0 ){
210 blob_append_sql(&html,
211 "<a href='%R/%T/home' target='_blank'>/%h</a>\n",
212 zUrl, zName);
213 }else{
214 blob_append_sql(&html,
215 "<a href='%R/%T/home' target='_blank'>%h</a>\n",
216 zUrl, zName);
217 }
218 if( x.zProjName ){
219 blob_append_sql(&html, "<td></td><td>%h</td>\n", x.zProjName);
220 fossil_free(x.zProjName);
221

Keyboard Shortcuts

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