Check-in [426a3ba49e]
Not logged in
Overview

SHA1 Hash:426a3ba49ebb066c192e29e62b07a65854e840c7
Date: 2008-12-03 14:10:01
User: drh
Comment:Fix a bug in windows that causes the menu on the wiki display pages to be omitted. Ticket d6d9ee682eac7708b0a7aa31febc8ad47e4923b1.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/main.c from [815f70292e] to [3a813bc47a].

@@ -128,10 +128,12 @@
   int okCsrf;             /* Anti-CSRF token is present and valid */
 
   FILE *fDebug;           /* Write debug information here, if the file exists */
   int thTrace;            /* True to enable TH1 debugging output */
   Blob thLog;             /* Text of the TH1 debugging output */
+
+  int isHome;             /* True if rendering the "home" page */
 
   /* Storage for the aux() and/or option() SQL function arguments */
   int nAux;                    /* Number of distinct aux() or option() values */
   const char *azAuxName[MX_AUX]; /* Name of each aux() or option() value */
   char *azAuxParam[MX_AUX];      /* Param of each aux() or option() value */

Modified src/wiki.c from [175d2ccd39] to [738d038bd7].

@@ -86,11 +86,11 @@
   }
   if( zPageName ){
     login_check_credentials();
     g.zExtra = zPageName;
     cgi_set_parameter_nocopy("name", g.zExtra);
-    g.argv[1] = "home";
+    g.isHome = 1;
     wiki_page();
     return;
   }
   style_header("Home");
   @ <p>This is a stub home-page for the project.
@@ -121,11 +121,10 @@
   Blob wiki;
   Manifest m;
   const char *zPageName;
   char *zHtmlPageName;
   char *zBody = mprintf("%s","<i>Empty Page</i>");
-  int isHome = g.argv[1][0]=='h';
 
   login_check_credentials();
   if( !g.okRdWiki ){ login_needed(); return; }
   zPageName = P("name");
   if( zPageName==0 ){
@@ -170,11 +169,11 @@
       if( m.type==CFTYPE_WIKI ){
         zBody = m.zWiki;
       }
     }
   }
-  if( !isHome ){
+  if( !g.isHome ){
     if( isSandbox || (rid && g.okWrWiki) || (!rid && g.okNewWiki) ){
       style_submenu_element("Edit", "Edit Wiki Page", "%s/wikiedit?name=%T",
            g.zTop, zPageName);
     }
     if( isSandbox || (rid && g.okApndWiki) ){