together at the linebreaks.
* After creating or editing a Wiki page, display that page instead of
that wiki's home page.
$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.
/** 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);
}
}
}
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");
+ }
}
if (WC->wc_view == VIEW_WIKI) {
wprintf("<input type=\"hidden\" name=\"wikipage\" value=\"%s\">\n", bstr("wikipage"));
}
+ wprintf("<input type=\"hidden\" name=\"return_to\" value=\"%s\">\n", bstr("return_to"));
wprintf("<img src=\"static/newmess3_24x.gif\" align=middle alt=\" \">");
wprintf("%s\n", buf); /** header bar */
"</span></a></td>\n", _("View message list")
);
break;
+ case VIEW_WIKI:
+ wprintf(
+ "<td>"
+ "<a href=\"readfwd\">"
+ "<img align=\"middle\" src=\"static/readallmess3_24x.gif\" "
+ "border=\"0\">"
+ "<span class=\"navbar_link\">"
+ "%s"
+ "</span></a></td>\n", _("Wiki home")
+ );
+ break;
default:
wprintf(
"<td>"
}
/**
- * \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;
* \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)
{
/**
* \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)
{
/**
- * \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)
/*@{*/
#include "webcit.h"
+#include "groupdav.h"
wprintf("<br><b>");
wprintf(_("There is no page called '%s' here."), pagename);
wprintf("</b><br><br>");
- wprintf("<a href=\"display_enter?wikipage=%s\">", pagename);
- wprintf(_("Click here if you would like to create this page."));
- wprintf("</a>");
+ wprintf(_("Select the 'Edit this page' link in the room banner "
+ "if you would like to create this page."));
wprintf("<br><br>");
wprintf("</td></tr></table></div>\n");
wDumpContent(1);