From: Art Cancro Date: Sat, 10 Nov 2007 05:32:30 +0000 (+0000) Subject: When populating the address book popup with the contents of X-Git-Tag: v7.86~2801 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=b0a03f661755920b39748e3830f863f78eb24b25 When populating the address book popup with the contents of an address book room (such as the Global Address Book), save the name of the room we came from and go back there after fetching the address book. Fixes bug #227. --- diff --git a/webcit/addressbook_popup.c b/webcit/addressbook_popup.c index 2b3cd7f38..91641482c 100644 --- a/webcit/addressbook_popup.c +++ b/webcit/addressbook_popup.c @@ -87,6 +87,7 @@ void display_address_book_inner_div() { char target_id[64]; char target_label[64]; int i; + char saved_roomname[128]; begin_ajax_response(); @@ -107,8 +108,8 @@ void display_address_book_inner_div() { } else { - serv_printf("GOTO %s", bstr("which_addr_book")); - serv_getln(buf, sizeof buf); + safestrncpy(saved_roomname, WC->wc_roomname, sizeof saved_roomname); + gotoroom(bstr("which_addr_book")); serv_puts("DVCA"); serv_getln(buf, sizeof buf); if (buf[0] == '1') while(serv_getln(buf, sizeof buf), strcmp(buf, "000")) { @@ -118,6 +119,7 @@ void display_address_book_inner_div() { escputs(buf); wprintf("\n"); } + gotoroom(bstr(saved_roomname)); } wprintf("\n");