Fossil SCM
Added --mainmenu flag to the http command, as the Windows impl passes on its flags to that command.
Commit
32ab3d23ed799f5f818f6c87fdd231935bed2ecf18097fbca48fb6bee9f7545b
Parent
d059d620377137f…
1 file changed
+6
+6
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -2559,10 +2559,12 @@ | ||
| 2559 | 2559 | ** --out FILE write results to FILE instead of to standard output |
| 2560 | 2560 | ** --repolist If REPOSITORY is directory, URL "/" lists all repos |
| 2561 | 2561 | ** --scgi Interpret input as SCGI rather than HTTP |
| 2562 | 2562 | ** --skin LABEL Use override skin LABEL |
| 2563 | 2563 | ** --th-trace trace TH1 execution (for debugging purposes) |
| 2564 | +** --mainmenu FILE Override the mainmenu config setting with the contents | |
| 2565 | +** of the given file. | |
| 2564 | 2566 | ** --usepidkey Use saved encryption key from parent process. This is |
| 2565 | 2567 | ** only necessary when using SEE on Windows. |
| 2566 | 2568 | ** |
| 2567 | 2569 | ** See also: [[cgi]], [[server]], [[winsrv]] |
| 2568 | 2570 | */ |
| @@ -2626,10 +2628,14 @@ | ||
| 2626 | 2628 | zIpAddr = fossil_getenv("REMOTE_HOST"); /* From stunnel */ |
| 2627 | 2629 | cgi_replace_parameter("HTTPS","on"); |
| 2628 | 2630 | } |
| 2629 | 2631 | zHost = find_option("host", 0, 1); |
| 2630 | 2632 | if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost); |
| 2633 | + g.zMainMenuFile = find_option("mainmenu",0,1); | |
| 2634 | + if( g.zMainMenuFile!=0 && file_size(g.zMainMenuFile,ExtFILE)<0 ){ | |
| 2635 | + fossil_fatal("Cannot read --mainmenu file %s", g.zMainMenuFile); | |
| 2636 | + } | |
| 2631 | 2637 | |
| 2632 | 2638 | /* We should be done with options.. */ |
| 2633 | 2639 | verify_all_options(); |
| 2634 | 2640 | |
| 2635 | 2641 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 2636 | 2642 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2559,10 +2559,12 @@ | |
| 2559 | ** --out FILE write results to FILE instead of to standard output |
| 2560 | ** --repolist If REPOSITORY is directory, URL "/" lists all repos |
| 2561 | ** --scgi Interpret input as SCGI rather than HTTP |
| 2562 | ** --skin LABEL Use override skin LABEL |
| 2563 | ** --th-trace trace TH1 execution (for debugging purposes) |
| 2564 | ** --usepidkey Use saved encryption key from parent process. This is |
| 2565 | ** only necessary when using SEE on Windows. |
| 2566 | ** |
| 2567 | ** See also: [[cgi]], [[server]], [[winsrv]] |
| 2568 | */ |
| @@ -2626,10 +2628,14 @@ | |
| 2626 | zIpAddr = fossil_getenv("REMOTE_HOST"); /* From stunnel */ |
| 2627 | cgi_replace_parameter("HTTPS","on"); |
| 2628 | } |
| 2629 | zHost = find_option("host", 0, 1); |
| 2630 | if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost); |
| 2631 | |
| 2632 | /* We should be done with options.. */ |
| 2633 | verify_all_options(); |
| 2634 | |
| 2635 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 2636 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2559,10 +2559,12 @@ | |
| 2559 | ** --out FILE write results to FILE instead of to standard output |
| 2560 | ** --repolist If REPOSITORY is directory, URL "/" lists all repos |
| 2561 | ** --scgi Interpret input as SCGI rather than HTTP |
| 2562 | ** --skin LABEL Use override skin LABEL |
| 2563 | ** --th-trace trace TH1 execution (for debugging purposes) |
| 2564 | ** --mainmenu FILE Override the mainmenu config setting with the contents |
| 2565 | ** of the given file. |
| 2566 | ** --usepidkey Use saved encryption key from parent process. This is |
| 2567 | ** only necessary when using SEE on Windows. |
| 2568 | ** |
| 2569 | ** See also: [[cgi]], [[server]], [[winsrv]] |
| 2570 | */ |
| @@ -2626,10 +2628,14 @@ | |
| 2628 | zIpAddr = fossil_getenv("REMOTE_HOST"); /* From stunnel */ |
| 2629 | cgi_replace_parameter("HTTPS","on"); |
| 2630 | } |
| 2631 | zHost = find_option("host", 0, 1); |
| 2632 | if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost); |
| 2633 | g.zMainMenuFile = find_option("mainmenu",0,1); |
| 2634 | if( g.zMainMenuFile!=0 && file_size(g.zMainMenuFile,ExtFILE)<0 ){ |
| 2635 | fossil_fatal("Cannot read --mainmenu file %s", g.zMainMenuFile); |
| 2636 | } |
| 2637 | |
| 2638 | /* We should be done with options.. */ |
| 2639 | verify_all_options(); |
| 2640 | |
| 2641 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 2642 |