Fossil SCM

Added --mainmenu flag to the http command, as the Windows impl passes on its flags to that command.

stephan 2021-02-06 05:20 mainmenu-override
Commit 32ab3d23ed799f5f818f6c87fdd231935bed2ecf18097fbca48fb6bee9f7545b
1 file changed +6
+6
--- src/main.c
+++ src/main.c
@@ -2559,10 +2559,12 @@
25592559
** --out FILE write results to FILE instead of to standard output
25602560
** --repolist If REPOSITORY is directory, URL "/" lists all repos
25612561
** --scgi Interpret input as SCGI rather than HTTP
25622562
** --skin LABEL Use override skin LABEL
25632563
** --th-trace trace TH1 execution (for debugging purposes)
2564
+** --mainmenu FILE Override the mainmenu config setting with the contents
2565
+** of the given file.
25642566
** --usepidkey Use saved encryption key from parent process. This is
25652567
** only necessary when using SEE on Windows.
25662568
**
25672569
** See also: [[cgi]], [[server]], [[winsrv]]
25682570
*/
@@ -2626,10 +2628,14 @@
26262628
zIpAddr = fossil_getenv("REMOTE_HOST"); /* From stunnel */
26272629
cgi_replace_parameter("HTTPS","on");
26282630
}
26292631
zHost = find_option("host", 0, 1);
26302632
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
+ }
26312637
26322638
/* We should be done with options.. */
26332639
verify_all_options();
26342640
26352641
if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?");
26362642
--- 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

Keyboard Shortcuts

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