Fossil SCM

Add the "Last Sync URL" division to the /urllist page.

drh 2017-05-12 13:57 trunk
Commit d4fc9120e1b718e1e4e9396190b3028f7ecfcc5369029609fe848d6841063651
1 file changed +11
+11
--- src/stat.c
+++ src/stat.c
@@ -341,10 +341,11 @@
341341
** Show ways in which this repository has been accessed
342342
*/
343343
void urllist_page(void){
344344
Stmt q;
345345
int cnt;
346
+ char *zRemote;
346347
login_check_credentials();
347348
if( !g.perm.Admin ){ login_needed(0); return; }
348349
349350
style_header("URLs and Checkouts");
350351
style_adunit_config(ADUNIT_RIGHT_OK);
@@ -378,10 +379,20 @@
378379
db_finalize(&q);
379380
if( cnt==0 ){
380381
@ <tr><td>(none)</td>
381382
}
382383
@ </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
+ }
383394
style_footer();
384395
}
385396
386397
/*
387398
** WEBPAGE: repo_schema
388399
--- 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

Keyboard Shortcuts

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