* do_edit_vcard() accept arbitrary url's for return_to. Doesn't work yet because...
authorArt Cancro <ajc@citadel.org>
Tue, 23 Jun 2009 03:29:07 +0000 (03:29 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 23 Jun 2009 03:29:07 +0000 (03:29 +0000)
webcit/auth.c
webcit/vcard_edit.c

index 18f60e269e1184ce8c98c56f57e2adfc722bcd88..1ac3921c423dcd416838b810c171b7676f1e6946 100644 (file)
@@ -777,7 +777,7 @@ void display_reg(int during_login)
        else {
                StrBuf *ReturnTo;
                ReturnTo = NewStrBufPlain(HKEY("display_main_menu?gotofirst="));
-               StrBufUrlescAppend(ReturnTo, WC->wc_roomname, NULL);
+               StrBufAppendBuf(ReturnTo, WC->wc_roomname, 0);
                lprintf(9, "\e[32mwc_roomname: %s\e[0m\n", ChrPtr(WC->wc_roomname));
                lprintf(9, "\e[31m   ReturnTo: %s\e[0m\n", ChrPtr(ReturnTo));
                do_edit_vcard(vcard_msgnum, "1", VCMsg, VCAtt, ChrPtr(ReturnTo), USERCONFIGROOM);
index 320d4322facd54edad2da145d14cf2d5e7e8a89f..4b3940fb247bbf7d8a470ae8fdd1e273cc042b08 100644 (file)
@@ -1091,13 +1091,16 @@ void submit_vcard(void) {
                        StrBufAppendBufPlain(WCC->ImportantMsg,
                                             _("Aborting."),
                                             -1, 0);
-                       /// todo: call the master dispatcher again...
+
                        if (!strcmp(bstr("return_to"), "select_user_to_edit")) {
                                select_user_to_edit(NULL);
                        }
                        else if (!strcmp(bstr("return_to"), "do_welcome")) {
                                do_welcome();
                        }
+                       else if (!IsEmptyStr(bstr("return_to"))) {
+                               http_redirect(bstr("return_to"));
+                       }
                        else {
                                readloop(readnew);
                        }
@@ -1187,6 +1190,9 @@ void submit_vcard(void) {
        else if (!strcmp(bstr("return_to"), "do_welcome")) {
                do_welcome();
        }
+       else if (!IsEmptyStr(bstr("return_to"))) {
+               http_redirect(bstr("return_to"));
+       }
        else {
                readloop(readnew);
        }