X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit-ng%2Fforum_view.c;h=71d7b09116414db01d9ecb98d4d834b009a906e8;hb=HEAD;hp=fb88eddcd968221f8fde786d6b254984ae6c354c;hpb=fb0cd39870e9842c7d4bb5583efff6591ddc4190;p=citadel.git diff --git a/webcit-ng/forum_view.c b/webcit-ng/forum_view.c deleted file mode 100644 index fb88eddcd..000000000 --- a/webcit-ng/forum_view.c +++ /dev/null @@ -1,419 +0,0 @@ -/* - * Forum view (threaded/flat) - * - * Copyright (c) 1996-2018 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#include "webcit.h" - -struct mthread { - long msgnum; - time_t datetime; - int threadhash; - int refhashes[10]; - char from[64]; - int parent; -}; - - -// Commands we need to send to Citadel Server before we begin rendering forum view. -// These are common to flat and threaded views. -// -void setup_for_forum_view(struct ctdlsession *c) -{ - char buf[1024]; - ctdl_printf(c, "MSGP text/html|text/plain"); // Declare the MIME types we know how to render - ctdl_readline(c, buf, sizeof(buf)); // Ignore the response - ctdl_printf(c, "MSGP dont_decode"); // Tell the server we will decode base64/etc client-side - ctdl_readline(c, buf, sizeof(buf)); // Ignore the response -} - - -#if 0 -// Renderer for one message in the threaded view -// (This will probably work for the flat view too.) -// -void forum_render_one_message(struct ctdlsession *c, StrBuf *sj, long msgnum) -{ - StrBuf *raw_msg = NULL; - StrBuf *sanitized_msg = NULL; - char buf[1024]; - char content_transfer_encoding[1024] = { 0 }; - char content_type[1024] = { 0 }; - char author[128] = { 0 }; - char datetime[128] = { 0 } ; - - ctdl_printf(c, "MSG4 %ld", msgnum); - ctdl_readline(c, buf, sizeof(buf)); - if (buf[0] != '1') { - StrBufAppendPrintf(sj, "