Fixed bug in ConditionalHavewikiType() which returned the wrong value
authorArt Cancro <ajc@citadel.org>
Mon, 10 Jan 2011 21:11:18 +0000 (16:11 -0500)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 13:44:11 +0000 (13:44 +0000)
webcit/wiki.c

index 79ade49e2066fd1ab0be5ba2aef5bdd06b4b9a09..452fc82ec4df569a2c3b0012492567729a4a8fc4 100644 (file)
@@ -342,10 +342,6 @@ int wiki_Cleanup(void **ViewSpecific)
 }
 
 
-
-
-
-
 int ConditionalHaveWikiPage(StrBuf *Target, WCTemplputParams *TP)
 {
        const char *page;
@@ -356,15 +352,19 @@ int ConditionalHaveWikiPage(StrBuf *Target, WCTemplputParams *TP)
        GetTemplateTokenString(Target, TP, 2, &pch, &len);
        return strcasecmp(page, pch) == 0;
 }
+
+
 int ConditionalHavewikiType(StrBuf *Target, WCTemplputParams *TP)
 {
        wcsession *WCC = WC;
        const char *pch;
        long len;
 
-       GetTemplateTokenString(Target, TP, 1, &pch, &len);
+       GetTemplateTokenString(Target, TP, 2, &pch, &len);
        return bmstrcasestr((char *)ChrPtr(WCC->Hdr->HR.ReqLine), pch) != NULL;
 }
+
+
 void 
 InitModule_WIKI
 (void)