]> code.citadel.org Git - citadel.git/commitdiff
Added a 'force_room'
authorArt Cancro <ajc@citadel.org>
Wed, 14 Nov 2007 05:24:03 +0000 (05:24 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 14 Nov 2007 05:24:03 +0000 (05:24 +0000)
to the enter message form, to ensure that the room the message
gets posted in is the same room the user started entering it in.

webcit/messages.c

index b50d09250532e9066c053d87a857f3a3b4cffb3e..09732863183eb92234b80044f2910da71fcc372e 100644 (file)
@@ -2874,6 +2874,10 @@ void post_message(void)
        int is_anonymous = 0;
        char *display_name;
 
+       if (!IsEmptyStr(bstr("force_room"))) {
+               gotoroom(bstr("force_room"));
+       }
+
        display_name = bstr("display_name");
        if (!strcmp(display_name, "__ANONYMOUS__")) {
                display_name = "";
@@ -3121,6 +3125,9 @@ void display_enter(void)
        }
        wprintf("<input type=\"hidden\" name=\"return_to\" value=\"%s\">\n", bstr("return_to"));
        wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%ld\">\n", WC->nonce);
+       wprintf("<input type=\"hidden\" name=\"force_room\" value=\"");
+       urlescputs(WC->wc_roomname);
+       wprintf("\">\n");
 
        /** submit or cancel buttons */
         wprintf("<p class=\"send_edit_msg\">");