Fossil SCM
Second attempt to get --page working for "fossil ui remote:/".
Commit
e6732228f10a6f7084b9d9ac0e7766af971447ac697b338647e38362ea588594
Parent
24d6bba2d80fdc0…
1 file changed
+3
-7
+3
-7
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -3531,10 +3531,13 @@ | ||
| 3531 | 3531 | if( isUiCmd && !fNoBrowser ){ |
| 3532 | 3532 | char *zBrowserArg; |
| 3533 | 3533 | const char *zProtocol = g.httpUseSSL ? "https" : "http"; |
| 3534 | 3534 | db_open_config(0,0); |
| 3535 | 3535 | zBrowser = fossil_web_browser(); |
| 3536 | + if( zRemote && fossil_strcmp(g.argv[2],"/")==0 ){ | |
| 3537 | + zInitPage = mprintf("?home=%T", zInitPage); | |
| 3538 | + } | |
| 3536 | 3539 | if( zIpAddr==0 ){ |
| 3537 | 3540 | zBrowserArg = mprintf("%s://localhost:%%d/%s", zProtocol, zInitPage); |
| 3538 | 3541 | }else if( strchr(zIpAddr,':') ){ |
| 3539 | 3542 | zBrowserArg = mprintf("%s://[%s]:%%d/%s", zProtocol, zIpAddr, zInitPage); |
| 3540 | 3543 | }else{ |
| @@ -3584,17 +3587,10 @@ | ||
| 3584 | 3587 | blob_appendf(&ssh, " --extroot %$", g.zExtRoot); |
| 3585 | 3588 | } |
| 3586 | 3589 | if( skin_in_use() ) blob_appendf(&ssh, " --skin %s", skin_in_use()); |
| 3587 | 3590 | if( zJsMode ) blob_appendf(&ssh, " --jsmode %s", zJsMode); |
| 3588 | 3591 | if( fCreate ) blob_appendf(&ssh, " --create"); |
| 3589 | - if( zInitPage && zInitPage[0] ){ | |
| 3590 | - if( fossil_strcmp(zUrl,"/")==0 ){ | |
| 3591 | - zInitPage = mprintf("/?home=%T", zInitPage); | |
| 3592 | - }else{ | |
| 3593 | - blob_appendf(&ssh, " --page %!$", zInitPage); | |
| 3594 | - } | |
| 3595 | - } | |
| 3596 | 3592 | blob_appendf(&ssh, " %$", zUrl); |
| 3597 | 3593 | if( isRetry ){ |
| 3598 | 3594 | fossil_print("First attempt to run \"fossil\" on %s failed\n" |
| 3599 | 3595 | "Retry: ", zRemote); |
| 3600 | 3596 | } |
| 3601 | 3597 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -3531,10 +3531,13 @@ | |
| 3531 | if( isUiCmd && !fNoBrowser ){ |
| 3532 | char *zBrowserArg; |
| 3533 | const char *zProtocol = g.httpUseSSL ? "https" : "http"; |
| 3534 | db_open_config(0,0); |
| 3535 | zBrowser = fossil_web_browser(); |
| 3536 | if( zIpAddr==0 ){ |
| 3537 | zBrowserArg = mprintf("%s://localhost:%%d/%s", zProtocol, zInitPage); |
| 3538 | }else if( strchr(zIpAddr,':') ){ |
| 3539 | zBrowserArg = mprintf("%s://[%s]:%%d/%s", zProtocol, zIpAddr, zInitPage); |
| 3540 | }else{ |
| @@ -3584,17 +3587,10 @@ | |
| 3584 | blob_appendf(&ssh, " --extroot %$", g.zExtRoot); |
| 3585 | } |
| 3586 | if( skin_in_use() ) blob_appendf(&ssh, " --skin %s", skin_in_use()); |
| 3587 | if( zJsMode ) blob_appendf(&ssh, " --jsmode %s", zJsMode); |
| 3588 | if( fCreate ) blob_appendf(&ssh, " --create"); |
| 3589 | if( zInitPage && zInitPage[0] ){ |
| 3590 | if( fossil_strcmp(zUrl,"/")==0 ){ |
| 3591 | zInitPage = mprintf("/?home=%T", zInitPage); |
| 3592 | }else{ |
| 3593 | blob_appendf(&ssh, " --page %!$", zInitPage); |
| 3594 | } |
| 3595 | } |
| 3596 | blob_appendf(&ssh, " %$", zUrl); |
| 3597 | if( isRetry ){ |
| 3598 | fossil_print("First attempt to run \"fossil\" on %s failed\n" |
| 3599 | "Retry: ", zRemote); |
| 3600 | } |
| 3601 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -3531,10 +3531,13 @@ | |
| 3531 | if( isUiCmd && !fNoBrowser ){ |
| 3532 | char *zBrowserArg; |
| 3533 | const char *zProtocol = g.httpUseSSL ? "https" : "http"; |
| 3534 | db_open_config(0,0); |
| 3535 | zBrowser = fossil_web_browser(); |
| 3536 | if( zRemote && fossil_strcmp(g.argv[2],"/")==0 ){ |
| 3537 | zInitPage = mprintf("?home=%T", zInitPage); |
| 3538 | } |
| 3539 | if( zIpAddr==0 ){ |
| 3540 | zBrowserArg = mprintf("%s://localhost:%%d/%s", zProtocol, zInitPage); |
| 3541 | }else if( strchr(zIpAddr,':') ){ |
| 3542 | zBrowserArg = mprintf("%s://[%s]:%%d/%s", zProtocol, zIpAddr, zInitPage); |
| 3543 | }else{ |
| @@ -3584,17 +3587,10 @@ | |
| 3587 | blob_appendf(&ssh, " --extroot %$", g.zExtRoot); |
| 3588 | } |
| 3589 | if( skin_in_use() ) blob_appendf(&ssh, " --skin %s", skin_in_use()); |
| 3590 | if( zJsMode ) blob_appendf(&ssh, " --jsmode %s", zJsMode); |
| 3591 | if( fCreate ) blob_appendf(&ssh, " --create"); |
| 3592 | blob_appendf(&ssh, " %$", zUrl); |
| 3593 | if( isRetry ){ |
| 3594 | fossil_print("First attempt to run \"fossil\" on %s failed\n" |
| 3595 | "Retry: ", zRemote); |
| 3596 | } |
| 3597 |