From: Art Cancro Date: Sat, 7 Mar 2009 20:52:27 +0000 (+0000) Subject: * When translating the input from a REGI command into a vCard, set the telephone... X-Git-Tag: v7.86~1374 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=2497595deead4ddc2e4f18a7cd56f2d5d28bbfbc * When translating the input from a REGI command into a vCard, set the telephone number using 'tel' rather than 'tel;home' --- diff --git a/citadel/modules/vcard/serv_vcard.c b/citadel/modules/vcard/serv_vcard.c index 899199b68..3539c43d4 100644 --- a/citadel/modules/vcard/serv_vcard.c +++ b/citadel/modules/vcard/serv_vcard.c @@ -247,13 +247,16 @@ void ctdl_vcard_to_directory(struct CtdlMessage *msg, int op) { } } - if (!strcasecmp(v->prop[i].name, "tel;home")) + if ( (!strcasecmp(v->prop[i].name, "tel;home")) + || (!strcasecmp(v->prop[i].name, "tel;type=home")) ) (void) CtdlDoDirectoryServiceFunc("homePhone", v->prop[i].value, &objectlist, "ldap", DIRECTORY_ATTRIB_ADD); else - if (!strcasecmp(v->prop[i].name, "tel;fax")) + if ( (!strcasecmp(v->prop[i].name, "tel;fax")) + || (!strcasecmp(v->prop[i].name, "tel;type=fax")) ) (void) CtdlDoDirectoryServiceFunc("facsimileTelephoneNumber", v->prop[i].value, &objectlist, "ldap", DIRECTORY_ATTRIB_ADD); else - if (!strcasecmp(v->prop[i].name, "tel;cell")) + if ( (!strcasecmp(v->prop[i].name, "tel;cell")) + || (!strcasecmp(v->prop[i].name, "tel;type=cell")) ) (void) CtdlDoDirectoryServiceFunc("mobile", v->prop[i].value, &objectlist, "ldap", DIRECTORY_ATTRIB_ADD); else if ( (!strcasecmp(v->prop[i].name, "tel")) @@ -879,7 +882,7 @@ void cmd_regi(char *argbuf) { } } } - if (a==5) vcard_set_prop(my_vcard, "tel;home", buf, 0); + if (a==5) vcard_set_prop(my_vcard, "tel", buf, 0); if (a==6) vcard_set_prop(my_vcard, "email;internet", buf, 0); if (a==7) strcpy(tmpcountry, buf); ++a; @@ -945,7 +948,7 @@ void cmd_greg(char *argbuf) extract_token(buf, adr, 5, ';', sizeof buf); cprintf("%s\n", buf); /* zip */ - s = vcard_get_prop(v, "tel;home", 0, 0, 0); + s = vcard_get_prop(v, "tel", 0, 0, 0); if (s == NULL) s = vcard_get_prop(v, "tel", 1, 0, 0); if (s != NULL) { cprintf("%s\n", s);