From: Art Cancro Date: Sun, 8 Nov 2009 04:50:42 +0000 (+0000) Subject: * When saving a wiki page, set the message subject to the page name. This will make... X-Git-Tag: v7.86~654 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=3d71fa0620f01f1090e86687114b428f595c9d8f * When saving a wiki page, set the message subject to the page name. This will make it more trackable in other software. --- diff --git a/citadel/modules/wiki/serv_wiki.c b/citadel/modules/wiki/serv_wiki.c index c99f7e1b8..d3d071b41 100644 --- a/citadel/modules/wiki/serv_wiki.c +++ b/citadel/modules/wiki/serv_wiki.c @@ -125,6 +125,12 @@ int wiki_upload_beforesave(struct CtdlMessage *msg) { /* If there's no message text, obviously this is all b0rken and shouldn't happen at all */ if (msg->cm_fields['M'] == NULL) return(0); + /* Set the message subject identical to the page name */ + if (msg->cm_fields['U'] != NULL) { + free(msg->cm_fields['U']); + } + msg->cm_fields['U'] = strdup(msg->cm_fields['E']); + /* See if we can retrieve the previous version. */ old_msgnum = locate_message_by_euid(msg->cm_fields['E'], &CCC->room); if (old_msgnum > 0L) {