Changing the name of the 'Aide' access level to 'Admin'
[citadel.git] / webcit / vcard_edit.c
index e33927340886941a71dc7df1a5c405036a2e7bac..8be73cd870b4ae5525ce0cbebf5d227b03c4d7df 100644 (file)
@@ -3,17 +3,11 @@
  *
  * This program is open source software.  You can redistribute it and/or
  * modify it under the terms of the GNU General Public License, version 3.
- * 
- * 
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * 
- * 
- * 
  */
 
 #include "webcit.h"
@@ -657,7 +651,7 @@ TODO: check for layer II
 
 void tmplput_VCARD_ITEM(StrBuf *Target, WCTemplputParams *TP)
 {
-       HashList *VC = CTX;
+       HashList *VC = CTX(CTX_VCARD);
        eVC evc;
        void *vStr;
 
@@ -876,6 +870,7 @@ void do_edit_vcard(long msgnum, char *partnum,
                   wc_mime_attachment *VCAtt,
                   const char *return_to, 
                   const char *force_room) {
+       wcsession *WCC = WC;
        message_summary *Msg = NULL;
        wc_mime_attachment *VCMime = NULL;
        struct vCard *v;
@@ -1056,6 +1051,12 @@ void do_edit_vcard(long msgnum, char *partnum,
                escputs(force_room);
                wc_printf("\">\n");
        }
+       else
+       {
+               wc_printf("<input type=\"hidden\" name=\"go\" value=\"");
+               StrEscAppend(WCC->WBuf, WCC->CurRoom.name, NULL, 0, 0);
+               wc_printf("\">\n");
+       }
 
        wc_printf("<table class=\"vcard_edit_background\"><tr><td>\n");
 
@@ -1281,7 +1282,7 @@ void submit_vcard(void) {
        }
 
        Buf = NewStrBuf();
-       serv_write(HKEY("ENT0 1|||4||||||1\n"));
+       serv_write(HKEY("ENT0 1|||4\n"));
        if (!StrBuf_ServGetln(Buf) && (GetServerStatus(Buf, NULL) != 4))
        {
                edit_vcard();
@@ -1350,8 +1351,6 @@ void submit_vcard(void) {
        serv_write(HKEY("000\n"));
        free(serialized_vcard);
 
-       StrBuf_ServGetln(Buf);
-
        if (!strcmp(bstr("return_to"), "select_user_to_edit")) {
                select_user_to_edit(NULL);
        }