From 94f191d87cef2b55bc6b542447db2d8514dce27f Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 25 Jan 2006 04:10:51 +0000 Subject: [PATCH] * Eliminated a bug in pullquote_message() that was causing it to run words together at the linebreaks. * After creating or editing a Wiki page, display that page instead of that wiki's home page. --- webcit/ChangeLog | 6 ++++++ webcit/messages.c | 24 +++++++++++++++++++++++- webcit/roomops.c | 11 +++++++++++ webcit/webcit.c | 10 +++++----- webcit/wiki.c | 6 +++--- 5 files changed, 48 insertions(+), 9 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index cfe173af9..7b2a14f6b 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,5 +1,11 @@ $Id$ +Tue Jan 24 23:02:37 EST 2006 ajc +* Eliminated a bug in pullquote_message() that was causing it to run words + together at the linebreaks. +* After creating or editing a Wiki page, display that page instead of + that wiki's home page. + Tue Jan 24 13:56:03 EST 2006 ajc * Fixes to wiki view to handle "short" links. diff --git a/webcit/messages.c b/webcit/messages.c index 84689122c..11220d2e0 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -1330,6 +1330,7 @@ void pullquote_message(long msgnum, int forward_attachments) { /** HTML just gets escaped and stuffed back into the editor */ else if (!strcasecmp(mime_content_type, "text/html")) { while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) { + strcat(buf, "\n"); msgescputs(buf); } } @@ -2557,7 +2558,27 @@ void post_message(void) } free_attachments(WC); - readloop("readnew"); + + /** + * We may have been supplied with instructions regarding the location + * to which we must return after posting. If found, go there. + */ + if (strlen(bstr("return_to")) > 0) { + http_redirect(bstr("return_to")); + } + /** + * If we were editing a page in a wiki room, go to that page now. + */ + else if (strlen(bstr("wikipage")) > 0) { + snprintf(buf, sizeof buf, "wiki?page=%s", bstr("wikipage")); + http_redirect(buf); + } + /** + * Otherwise, just go to the "read messages" loop. + */ + else { + readloop("readnew"); + } } @@ -2682,6 +2703,7 @@ void display_enter(void) if (WC->wc_view == VIEW_WIKI) { wprintf("\n", bstr("wikipage")); } + wprintf("\n", bstr("return_to")); wprintf("\""); wprintf("%s\n", buf); /** header bar */ diff --git a/webcit/roomops.c b/webcit/roomops.c index 68476bfb5..f0df5cce2 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -485,6 +485,17 @@ void embed_room_banner(char *got, int navbar_style) { "\n", _("View message list") ); break; + case VIEW_WIKI: + wprintf( + "" + "" + "" + "" + "%s" + "\n", _("Wiki home") + ); + break; default: wprintf( "" diff --git a/webcit/webcit.c b/webcit/webcit.c index 641b35615..e1852a901 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -363,8 +363,8 @@ void msgesc(char *target, char *strbuf) } /** - * \brief print message to the client ??? - * \param strbuf message to print??? + * \brief print a string to the client after cleaning it with msgesc() + * \param strbuf string to be printed */ void msgescputs(char *strbuf) { char *outbuf; @@ -648,7 +648,7 @@ void output_image() * \brief Generic function to output an arbitrary MIME part from an arbitrary * message number on the server. * \param msgnum number of the item on the citadel server - * \param partnum the partnumber??? + * \param partnum the MIME part to be output */ void mimepart(char *msgnum, char *partnum) { @@ -683,7 +683,7 @@ void mimepart(char *msgnum, char *partnum) /** * \brief Read any MIME part of a message, from the server, into memory. * \param msgnum number of the message on the citadel server - * \param partnum the part number??? + * \param partnum the MIME part to be loaded */ char *load_mimepart(long msgnum, char *partnum) { @@ -795,7 +795,7 @@ void change_start_page(void) { /** - * \brief display the successfull edit or s.th. lisket hat ??? + * \brief convenience function to indicate success * \param successmessage the mesage itself */ void display_success(char *successmessage) diff --git a/webcit/wiki.c b/webcit/wiki.c index 852650cb6..6c74212d5 100644 --- a/webcit/wiki.c +++ b/webcit/wiki.c @@ -9,6 +9,7 @@ /*@{*/ #include "webcit.h" +#include "groupdav.h" @@ -98,9 +99,8 @@ void display_wiki_page(void) wprintf("
"); wprintf(_("There is no page called '%s' here."), pagename); wprintf("

"); - wprintf("", pagename); - wprintf(_("Click here if you would like to create this page.")); - wprintf(""); + wprintf(_("Select the 'Edit this page' link in the room banner " + "if you would like to create this page.")); wprintf("

"); wprintf("\n"); wDumpContent(1); -- 2.30.2