]> code.citadel.org Git - citadel.git/blobdiff - webcit/vcard_edit.c
* migrated SUBST stuff to hash
[citadel.git] / webcit / vcard_edit.c
index d3e83a78341fc777426438b9ad0442ba820d3fb7..4b036e03fab68237dd857983f48ac650fff0eb16 100644 (file)
@@ -7,7 +7,6 @@
  */
 /*@{*/
 #include "webcit.h"
-#include "vcard.h"
 
 /**
  * \brief Edit the vCard component of a MIME message.  
@@ -157,7 +156,7 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to, char *force_room
                                extract_token(faxtel, value, 0, ';', sizeof faxtel);
                        }
        
-                       else if (!strcasecmp(key, "tel;mobile")) {
+                       else if (!strcasecmp(key, "tel;cell")) {
                                extract_token(mobiletel, value, 0, ';', sizeof mobiletel);
                        }
        
@@ -188,7 +187,7 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to, char *force_room
        /** Display the form */
        output_headers(1, 1, 1, 0, 0, 0);
 
-       svprintf("BOXTITLE", WCS_STRING, _("Edit contact information"));
+       svput("BOXTITLE", WCS_STRING, _("Edit contact information"));
        do_template("beginbox");
 
        wprintf("<form method=\"POST\" action=\"submit_vcard\">\n");
@@ -373,7 +372,7 @@ void edit_vcard(void) {
        long msgnum;
        char *partnum;
 
-       msgnum = atol(bstr("msgnum"));
+       msgnum = lbstr("msgnum");
        partnum = bstr("partnum");
        do_edit_vcard(msgnum, partnum, "", NULL);
 }
@@ -389,12 +388,12 @@ void submit_vcard(void) {
        char buf[SIZ];
        int i;
 
-       if (IsEmptyStr(bstr("ok_button"))) { 
+       if (!havebstr("ok_button")) { 
                readloop("readnew");
                return;
        }
 
-       if (!IsEmptyStr(bstr("force_room"))) {
+       if (havebstr("force_room")) {
                gotoroom(bstr("force_room"));
        }
 
@@ -446,7 +445,7 @@ void submit_vcard(void) {
        vcard_add_prop(v, "tel;home", bstr("hometel"));
        vcard_add_prop(v, "tel;work", bstr("worktel"));
        vcard_add_prop(v, "tel;fax", bstr("faxtel"));
-       vcard_add_prop(v, "tel;mobile", bstr("mobiletel"));
+       vcard_add_prop(v, "tel;cell", bstr("mobiletel"));
        vcard_add_prop(v, "email;internet", bstr("primary_inetemail"));
 
        for (i=0; i<num_tokens(bstr("other_inetemail"), '\n'); ++i) {