else /** HTML is fun, but we've got to strip it first */
if (!strcasecmp(mime_content_type, "text/html")) {
- output_html(mime_charset);
+ output_html(mime_charset, (WC->wc_view == VIEW_WIKI ? 1 : 0));
}
/** Unknown weirdness */
_("Automatically cancelled because you have already "
"saved this message."));
} else {
- sprintf(buf, "ENT0 1|%s|%d|4|%s|||%s|%s",
+ sprintf(buf, "ENT0 1|%s|%d|4|%s|||%s|%s|%s",
bstr("recp"),
is_anonymous,
bstr("subject"),
bstr("cc"),
- bstr("bcc")
+ bstr("bcc"),
+ bstr("wikipage")
);
serv_puts(buf);
serv_getln(buf, sizeof buf);
int recipient_bad = 0;
int i;
int is_anonymous = 0;
+ long existing_page = (-1L);
if (strlen(bstr("force_room")) > 0) {
gotoroom(bstr("force_room"));
/** Now check our actual recipients if there are any */
if (recipient_required) {
- sprintf(buf, "ENT0 0|%s|%d|0||||%s|%s", bstr("recp"), is_anonymous, bstr("cc"), bstr("bcc"));
+ sprintf(buf, "ENT0 0|%s|%d|0||||%s|%s|%s", bstr("recp"), is_anonymous,
+ bstr("cc"), bstr("bcc"), bstr("wikipage"));
serv_puts(buf);
serv_getln(buf, sizeof buf);
"name=\"enterform\""
">\n");
wprintf("<input type=\"hidden\" name=\"postseq\" value=\"%ld\">\n", now);
+ if (WC->wc_view == VIEW_WIKI) {
+ wprintf("<input type=\"hidden\" name=\"wikipage\" value=\"%s\">\n", bstr("wikipage"));
+ }
wprintf("<img src=\"static/newmess3_24x.gif\" align=middle alt=\" \">");
wprintf("%s\n", buf); /** header bar */
wprintf("</blockquote>\n\n");
}
+ /** If we're editing a wiki page, insert the existing page here... */
+ else if (WC->wc_view == VIEW_WIKI) {
+ safestrncpy(buf, bstr("wikipage"), sizeof buf);
+ str_wiki_index(buf);
+ existing_page = locate_message_by_uid(buf);
+ if (existing_page >= 0L) {
+ pullquote_message(existing_page, 1);
+ }
+ }
+
/** Insert our signature if appropriate... */
if ( (WC->is_mailbox) && (strcmp(bstr("sig_inserted"), "yes")) ) {
get_preference("use_sig", buf, sizeof buf);