Fossil SCM
Fix a bug in windows that causes the menu on the wiki display pages to be omitted. Ticket [d6d9ee682eac7708b0a7aa31febc8ad47e4923b1].
Commit
426a3ba49ebb066c192e29e62b07a65854e840c7
Parent
80406199683aebf…
2 files changed
+2
+2
-3
+2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -128,10 +128,12 @@ | ||
| 128 | 128 | int okCsrf; /* Anti-CSRF token is present and valid */ |
| 129 | 129 | |
| 130 | 130 | FILE *fDebug; /* Write debug information here, if the file exists */ |
| 131 | 131 | int thTrace; /* True to enable TH1 debugging output */ |
| 132 | 132 | Blob thLog; /* Text of the TH1 debugging output */ |
| 133 | + | |
| 134 | + int isHome; /* True if rendering the "home" page */ | |
| 133 | 135 | |
| 134 | 136 | /* Storage for the aux() and/or option() SQL function arguments */ |
| 135 | 137 | int nAux; /* Number of distinct aux() or option() values */ |
| 136 | 138 | const char *azAuxName[MX_AUX]; /* Name of each aux() or option() value */ |
| 137 | 139 | char *azAuxParam[MX_AUX]; /* Param of each aux() or option() value */ |
| 138 | 140 |
| --- 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 @@ | ||
| 86 | 86 | } |
| 87 | 87 | if( zPageName ){ |
| 88 | 88 | login_check_credentials(); |
| 89 | 89 | g.zExtra = zPageName; |
| 90 | 90 | cgi_set_parameter_nocopy("name", g.zExtra); |
| 91 | - g.argv[1] = "home"; | |
| 91 | + g.isHome = 1; | |
| 92 | 92 | wiki_page(); |
| 93 | 93 | return; |
| 94 | 94 | } |
| 95 | 95 | style_header("Home"); |
| 96 | 96 | @ <p>This is a stub home-page for the project. |
| @@ -121,11 +121,10 @@ | ||
| 121 | 121 | Blob wiki; |
| 122 | 122 | Manifest m; |
| 123 | 123 | const char *zPageName; |
| 124 | 124 | char *zHtmlPageName; |
| 125 | 125 | char *zBody = mprintf("%s","<i>Empty Page</i>"); |
| 126 | - int isHome = g.argv[1][0]=='h'; | |
| 127 | 126 | |
| 128 | 127 | login_check_credentials(); |
| 129 | 128 | if( !g.okRdWiki ){ login_needed(); return; } |
| 130 | 129 | zPageName = P("name"); |
| 131 | 130 | if( zPageName==0 ){ |
| @@ -170,11 +169,11 @@ | ||
| 170 | 169 | if( m.type==CFTYPE_WIKI ){ |
| 171 | 170 | zBody = m.zWiki; |
| 172 | 171 | } |
| 173 | 172 | } |
| 174 | 173 | } |
| 175 | - if( !isHome ){ | |
| 174 | + if( !g.isHome ){ | |
| 176 | 175 | if( isSandbox || (rid && g.okWrWiki) || (!rid && g.okNewWiki) ){ |
| 177 | 176 | style_submenu_element("Edit", "Edit Wiki Page", "%s/wikiedit?name=%T", |
| 178 | 177 | g.zTop, zPageName); |
| 179 | 178 | } |
| 180 | 179 | if( isSandbox || (rid && g.okApndWiki) ){ |
| 181 | 180 |
| --- 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 |