Fossil SCM
Add the "Last Sync URL" division to the /urllist page.
Commit
d4fc9120e1b718e1e4e9396190b3028f7ecfcc5369029609fe848d6841063651
Parent
4e1450ae3cd5e4d…
1 file changed
+11
+11
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -341,10 +341,11 @@ | ||
| 341 | 341 | ** Show ways in which this repository has been accessed |
| 342 | 342 | */ |
| 343 | 343 | void urllist_page(void){ |
| 344 | 344 | Stmt q; |
| 345 | 345 | int cnt; |
| 346 | + char *zRemote; | |
| 346 | 347 | login_check_credentials(); |
| 347 | 348 | if( !g.perm.Admin ){ login_needed(0); return; } |
| 348 | 349 | |
| 349 | 350 | style_header("URLs and Checkouts"); |
| 350 | 351 | style_adunit_config(ADUNIT_RIGHT_OK); |
| @@ -378,10 +379,20 @@ | ||
| 378 | 379 | db_finalize(&q); |
| 379 | 380 | if( cnt==0 ){ |
| 380 | 381 | @ <tr><td>(none)</td> |
| 381 | 382 | } |
| 382 | 383 | @ </table> |
| 384 | + zRemote = db_text(0, "SELECT value FROM config WHERE name='last-sync-url'"); | |
| 385 | + if( zRemote ){ | |
| 386 | + @ <div class="section">Last Sync URL</div> | |
| 387 | + if( sqlite3_strlike("http%", zRemote, 0)==0 ){ | |
| 388 | + @ <p><a href='%h(zRemote)'>%h(zRemote)</a> | |
| 389 | + }else{ | |
| 390 | + @ <p>%h(zRemote)</p> | |
| 391 | + } | |
| 392 | + @ </div> | |
| 393 | + } | |
| 383 | 394 | style_footer(); |
| 384 | 395 | } |
| 385 | 396 | |
| 386 | 397 | /* |
| 387 | 398 | ** WEBPAGE: repo_schema |
| 388 | 399 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -341,10 +341,11 @@ | |
| 341 | ** Show ways in which this repository has been accessed |
| 342 | */ |
| 343 | void urllist_page(void){ |
| 344 | Stmt q; |
| 345 | int cnt; |
| 346 | login_check_credentials(); |
| 347 | if( !g.perm.Admin ){ login_needed(0); return; } |
| 348 | |
| 349 | style_header("URLs and Checkouts"); |
| 350 | style_adunit_config(ADUNIT_RIGHT_OK); |
| @@ -378,10 +379,20 @@ | |
| 378 | db_finalize(&q); |
| 379 | if( cnt==0 ){ |
| 380 | @ <tr><td>(none)</td> |
| 381 | } |
| 382 | @ </table> |
| 383 | style_footer(); |
| 384 | } |
| 385 | |
| 386 | /* |
| 387 | ** WEBPAGE: repo_schema |
| 388 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -341,10 +341,11 @@ | |
| 341 | ** Show ways in which this repository has been accessed |
| 342 | */ |
| 343 | void urllist_page(void){ |
| 344 | Stmt q; |
| 345 | int cnt; |
| 346 | char *zRemote; |
| 347 | login_check_credentials(); |
| 348 | if( !g.perm.Admin ){ login_needed(0); return; } |
| 349 | |
| 350 | style_header("URLs and Checkouts"); |
| 351 | style_adunit_config(ADUNIT_RIGHT_OK); |
| @@ -378,10 +379,20 @@ | |
| 379 | db_finalize(&q); |
| 380 | if( cnt==0 ){ |
| 381 | @ <tr><td>(none)</td> |
| 382 | } |
| 383 | @ </table> |
| 384 | zRemote = db_text(0, "SELECT value FROM config WHERE name='last-sync-url'"); |
| 385 | if( zRemote ){ |
| 386 | @ <div class="section">Last Sync URL</div> |
| 387 | if( sqlite3_strlike("http%", zRemote, 0)==0 ){ |
| 388 | @ <p><a href='%h(zRemote)'>%h(zRemote)</a> |
| 389 | }else{ |
| 390 | @ <p>%h(zRemote)</p> |
| 391 | } |
| 392 | @ </div> |
| 393 | } |
| 394 | style_footer(); |
| 395 | } |
| 396 | |
| 397 | /* |
| 398 | ** WEBPAGE: repo_schema |
| 399 |