final touches on dkim test harness
[citadel.git] / webcit / wiki.c
index 45dd313e6c70816214ce9a71b906dfdafcdfa2fe..390bf3cbea7e84203eca49ded48c5186552a05e5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Functions pertaining to rooms with a wiki view
  *
- * Copyright (c) 2009-2012 by the citadel.org team
+ * Copyright (c) 2009-2021 by the citadel.org team
  *
  * This program is open source software.  You can redistribute it and/or
  * modify it under the terms of the GNU General Public License, version 3.
@@ -32,14 +32,12 @@ void str_wiki_index(StrBuf *s)
  */
 void display_wiki_page_backend(StrBuf *pagename, char *rev, int do_revert)
 {
-       wcsession *WCC = WC;
        const StrBuf *Mime;
        long msgnum = (-1L);
        char buf[256];
 
-       if ((WCC->CurRoom.view != VIEW_WIKI) &&
-           (WCC->CurRoom.view != VIEW_WIKIMD)) {
-               wc_printf(_("'%s' is not a Wiki room."), ChrPtr(WCC->CurRoom.name) );
+       if (WC->CurRoom.view != VIEW_WIKI) {
+               wc_printf(_("'%s' is not a Wiki room."), ChrPtr(WC->CurRoom.name) );
                return;
        }
 
@@ -63,7 +61,7 @@ void display_wiki_page_backend(StrBuf *pagename, char *rev, int do_revert)
        }
 
        if (msgnum >= 0L) {
-               read_message(WCC->WBuf, HKEY("view_message"), msgnum, NULL, &Mime, NULL);
+               read_message(WC->WBuf, HKEY("view_message"), msgnum, NULL, &Mime, NULL);
                return;
        }
        putbstr("pagename", pagename);
@@ -126,19 +124,11 @@ void tmplput_display_wiki_history(StrBuf *Target, WCTemplputParams *TP)
 
                        wc_printf("<tr bgcolor=\"%s\">", ((row%2) ? "#FFFFFF" : "#DDDDDD"));
                        wc_printf("<td>%s</td><td>", rev_date_displayed);
-                       if (!strcasecmp(ChrPtr(node), (char *)WC->serv_info->serv_nodename)) {
-                               escputs(ChrPtr(author));
-                               wc_printf(" @ ");
-                               escputs(ChrPtr(node));
-                       }
-                       else {
-                               wc_printf("<a href=\"showuser?who=");
-                               urlescputs(ChrPtr(author));
-                               wc_printf("\">");
-                               escputs(ChrPtr(author));
-                               wc_printf("</a>");
-                       }
-                       wc_printf("</td>");
+                       wc_printf("<a href=\"showuser?who=");
+                       urlescputs(ChrPtr(author));
+                       wc_printf("\">");
+                       escputs(ChrPtr(author));
+                       wc_printf("</a></td>");
 
                        if (row == 0) {
                                wc_printf("<td><a href=\"wiki?page=%s", bstr("page"));
@@ -278,12 +268,11 @@ int ConditionalHaveWikiPage(StrBuf *Target, WCTemplputParams *TP)
 
 int ConditionalHavewikiType(StrBuf *Target, WCTemplputParams *TP)
 {
-       wcsession *WCC = WC;
        const char *pch;
        long len;
 
        GetTemplateTokenString(Target, TP, 2, &pch, &len);
-       return bmstrcasestr((char *)ChrPtr(WCC->Hdr->HR.ReqLine), pch) != NULL;
+       return bmstrcasestr((char *)ChrPtr(WC->Hdr->HR.ReqLine), pch) != NULL;
 }
 
 
@@ -326,18 +315,6 @@ InitModule_WIKI
                NULL
        );
 
-       RegisterReadLoopHandlerset(
-               VIEW_WIKIMD,
-               wiki_GetParamsGetServerCall,
-               wiki_PrintHeaderPage,
-               NULL,
-               NULL,
-               NULL,
-               NULL,
-               wiki_Cleanup,
-               NULL
-       );
-
        WebcitAddUrlHandler(HKEY("wiki"), "", 0, display_wiki_page, 0);
        WebcitAddUrlHandler(HKEY("wiki_history"), "", 0, display_wiki_history, 0);
        WebcitAddUrlHandler(HKEY("wiki_pagelist"), "", 0, display_wiki_pagelist, 0);