/*
* 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.
*/
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;
}
}
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);
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"));
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;
}
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);