Fossil SCM

Fix a bug in windows that causes the menu on the wiki display pages to be omitted. Ticket [d6d9ee682eac7708b0a7aa31febc8ad47e4923b1].

drh 2008-12-03 14:10 trunk
Commit 426a3ba49ebb066c192e29e62b07a65854e840c7
2 files changed +2 +2 -3
+2
--- src/main.c
+++ src/main.c
@@ -128,10 +128,12 @@
128128
int okCsrf; /* Anti-CSRF token is present and valid */
129129
130130
FILE *fDebug; /* Write debug information here, if the file exists */
131131
int thTrace; /* True to enable TH1 debugging output */
132132
Blob thLog; /* Text of the TH1 debugging output */
133
+
134
+ int isHome; /* True if rendering the "home" page */
133135
134136
/* Storage for the aux() and/or option() SQL function arguments */
135137
int nAux; /* Number of distinct aux() or option() values */
136138
const char *azAuxName[MX_AUX]; /* Name of each aux() or option() value */
137139
char *azAuxParam[MX_AUX]; /* Param of each aux() or option() value */
138140
--- src/main.c
+++ src/main.c
@@ -128,10 +128,12 @@
128 int okCsrf; /* Anti-CSRF token is present and valid */
129
130 FILE *fDebug; /* Write debug information here, if the file exists */
131 int thTrace; /* True to enable TH1 debugging output */
132 Blob thLog; /* Text of the TH1 debugging output */
 
 
133
134 /* Storage for the aux() and/or option() SQL function arguments */
135 int nAux; /* Number of distinct aux() or option() values */
136 const char *azAuxName[MX_AUX]; /* Name of each aux() or option() value */
137 char *azAuxParam[MX_AUX]; /* Param of each aux() or option() value */
138
--- src/main.c
+++ src/main.c
@@ -128,10 +128,12 @@
128 int okCsrf; /* Anti-CSRF token is present and valid */
129
130 FILE *fDebug; /* Write debug information here, if the file exists */
131 int thTrace; /* True to enable TH1 debugging output */
132 Blob thLog; /* Text of the TH1 debugging output */
133
134 int isHome; /* True if rendering the "home" page */
135
136 /* Storage for the aux() and/or option() SQL function arguments */
137 int nAux; /* Number of distinct aux() or option() values */
138 const char *azAuxName[MX_AUX]; /* Name of each aux() or option() value */
139 char *azAuxParam[MX_AUX]; /* Param of each aux() or option() value */
140
+2 -3
--- src/wiki.c
+++ src/wiki.c
@@ -86,11 +86,11 @@
8686
}
8787
if( zPageName ){
8888
login_check_credentials();
8989
g.zExtra = zPageName;
9090
cgi_set_parameter_nocopy("name", g.zExtra);
91
- g.argv[1] = "home";
91
+ g.isHome = 1;
9292
wiki_page();
9393
return;
9494
}
9595
style_header("Home");
9696
@ <p>This is a stub home-page for the project.
@@ -121,11 +121,10 @@
121121
Blob wiki;
122122
Manifest m;
123123
const char *zPageName;
124124
char *zHtmlPageName;
125125
char *zBody = mprintf("%s","<i>Empty Page</i>");
126
- int isHome = g.argv[1][0]=='h';
127126
128127
login_check_credentials();
129128
if( !g.okRdWiki ){ login_needed(); return; }
130129
zPageName = P("name");
131130
if( zPageName==0 ){
@@ -170,11 +169,11 @@
170169
if( m.type==CFTYPE_WIKI ){
171170
zBody = m.zWiki;
172171
}
173172
}
174173
}
175
- if( !isHome ){
174
+ if( !g.isHome ){
176175
if( isSandbox || (rid && g.okWrWiki) || (!rid && g.okNewWiki) ){
177176
style_submenu_element("Edit", "Edit Wiki Page", "%s/wikiedit?name=%T",
178177
g.zTop, zPageName);
179178
}
180179
if( isSandbox || (rid && g.okApndWiki) ){
181180
--- src/wiki.c
+++ src/wiki.c
@@ -86,11 +86,11 @@
86 }
87 if( zPageName ){
88 login_check_credentials();
89 g.zExtra = zPageName;
90 cgi_set_parameter_nocopy("name", g.zExtra);
91 g.argv[1] = "home";
92 wiki_page();
93 return;
94 }
95 style_header("Home");
96 @ <p>This is a stub home-page for the project.
@@ -121,11 +121,10 @@
121 Blob wiki;
122 Manifest m;
123 const char *zPageName;
124 char *zHtmlPageName;
125 char *zBody = mprintf("%s","<i>Empty Page</i>");
126 int isHome = g.argv[1][0]=='h';
127
128 login_check_credentials();
129 if( !g.okRdWiki ){ login_needed(); return; }
130 zPageName = P("name");
131 if( zPageName==0 ){
@@ -170,11 +169,11 @@
170 if( m.type==CFTYPE_WIKI ){
171 zBody = m.zWiki;
172 }
173 }
174 }
175 if( !isHome ){
176 if( isSandbox || (rid && g.okWrWiki) || (!rid && g.okNewWiki) ){
177 style_submenu_element("Edit", "Edit Wiki Page", "%s/wikiedit?name=%T",
178 g.zTop, zPageName);
179 }
180 if( isSandbox || (rid && g.okApndWiki) ){
181
--- src/wiki.c
+++ src/wiki.c
@@ -86,11 +86,11 @@
86 }
87 if( zPageName ){
88 login_check_credentials();
89 g.zExtra = zPageName;
90 cgi_set_parameter_nocopy("name", g.zExtra);
91 g.isHome = 1;
92 wiki_page();
93 return;
94 }
95 style_header("Home");
96 @ <p>This is a stub home-page for the project.
@@ -121,11 +121,10 @@
121 Blob wiki;
122 Manifest m;
123 const char *zPageName;
124 char *zHtmlPageName;
125 char *zBody = mprintf("%s","<i>Empty Page</i>");
 
126
127 login_check_credentials();
128 if( !g.okRdWiki ){ login_needed(); return; }
129 zPageName = P("name");
130 if( zPageName==0 ){
@@ -170,11 +169,11 @@
169 if( m.type==CFTYPE_WIKI ){
170 zBody = m.zWiki;
171 }
172 }
173 }
174 if( !g.isHome ){
175 if( isSandbox || (rid && g.okWrWiki) || (!rid && g.okNewWiki) ){
176 style_submenu_element("Edit", "Edit Wiki Page", "%s/wikiedit?name=%T",
177 g.zTop, zPageName);
178 }
179 if( isSandbox || (rid && g.okApndWiki) ){
180

Keyboard Shortcuts

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