Fossil SCM
Make options --repolist and --baseurl work together, if the original URL doesn't end with '/'.
Commit
7c4628a568c01a11642e18c119c93aa1d85632ed
Parent
6f35075ad72b860…
1 file changed
+2
-1
+2
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1588,10 +1588,11 @@ | ||
| 1588 | 1588 | n = db_int(0, "SELECT count(*) FROM sfile"); |
| 1589 | 1589 | if( n>0 ){ |
| 1590 | 1590 | Stmt q; |
| 1591 | 1591 | @ <html> |
| 1592 | 1592 | @ <head> |
| 1593 | + @ <base href="%s(g.zBaseURL)/" /> | |
| 1593 | 1594 | @ <title>Repository List</title> |
| 1594 | 1595 | @ </head> |
| 1595 | 1596 | @ <body> |
| 1596 | 1597 | @ <h1>Available Repositories:</h1> |
| 1597 | 1598 | @ <ol> |
| @@ -1598,11 +1599,11 @@ | ||
| 1598 | 1599 | db_prepare(&q, "SELECT x, substr(x,-7,-100000)||'/home'" |
| 1599 | 1600 | " FROM sfile ORDER BY x COLLATE nocase;"); |
| 1600 | 1601 | while( db_step(&q)==SQLITE_ROW ){ |
| 1601 | 1602 | const char *zName = db_column_text(&q, 0); |
| 1602 | 1603 | const char *zUrl = db_column_text(&q, 1); |
| 1603 | - @ <li><a href="%h(zUrl)" target="_blank">%h(zName)</a></li> | |
| 1604 | + @ <li><a href="%R/%h(zUrl)" target="_blank">%h(zName)</a></li> | |
| 1604 | 1605 | } |
| 1605 | 1606 | @ </ol> |
| 1606 | 1607 | @ </body> |
| 1607 | 1608 | @ </html> |
| 1608 | 1609 | cgi_reply(); |
| 1609 | 1610 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1588,10 +1588,11 @@ | |
| 1588 | n = db_int(0, "SELECT count(*) FROM sfile"); |
| 1589 | if( n>0 ){ |
| 1590 | Stmt q; |
| 1591 | @ <html> |
| 1592 | @ <head> |
| 1593 | @ <title>Repository List</title> |
| 1594 | @ </head> |
| 1595 | @ <body> |
| 1596 | @ <h1>Available Repositories:</h1> |
| 1597 | @ <ol> |
| @@ -1598,11 +1599,11 @@ | |
| 1598 | db_prepare(&q, "SELECT x, substr(x,-7,-100000)||'/home'" |
| 1599 | " FROM sfile ORDER BY x COLLATE nocase;"); |
| 1600 | while( db_step(&q)==SQLITE_ROW ){ |
| 1601 | const char *zName = db_column_text(&q, 0); |
| 1602 | const char *zUrl = db_column_text(&q, 1); |
| 1603 | @ <li><a href="%h(zUrl)" target="_blank">%h(zName)</a></li> |
| 1604 | } |
| 1605 | @ </ol> |
| 1606 | @ </body> |
| 1607 | @ </html> |
| 1608 | cgi_reply(); |
| 1609 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1588,10 +1588,11 @@ | |
| 1588 | n = db_int(0, "SELECT count(*) FROM sfile"); |
| 1589 | if( n>0 ){ |
| 1590 | Stmt q; |
| 1591 | @ <html> |
| 1592 | @ <head> |
| 1593 | @ <base href="%s(g.zBaseURL)/" /> |
| 1594 | @ <title>Repository List</title> |
| 1595 | @ </head> |
| 1596 | @ <body> |
| 1597 | @ <h1>Available Repositories:</h1> |
| 1598 | @ <ol> |
| @@ -1598,11 +1599,11 @@ | |
| 1599 | db_prepare(&q, "SELECT x, substr(x,-7,-100000)||'/home'" |
| 1600 | " FROM sfile ORDER BY x COLLATE nocase;"); |
| 1601 | while( db_step(&q)==SQLITE_ROW ){ |
| 1602 | const char *zName = db_column_text(&q, 0); |
| 1603 | const char *zUrl = db_column_text(&q, 1); |
| 1604 | @ <li><a href="%R/%h(zUrl)" target="_blank">%h(zName)</a></li> |
| 1605 | } |
| 1606 | @ </ol> |
| 1607 | @ </body> |
| 1608 | @ </html> |
| 1609 | cgi_reply(); |
| 1610 |