]> code.citadel.org Git - citadel.git/commitdiff
* Removed old Aethera hacks
authorArt Cancro <ajc@citadel.org>
Fri, 3 Jun 2005 22:22:36 +0000 (22:22 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 3 Jun 2005 22:22:36 +0000 (22:22 +0000)
citadel/ChangeLog
citadel/serv_calendar.c
citadel/serv_vcard.c

index 3c075a6498beaf2fdf2d20d15a0eff90808577d6..7d417c34f093506b65a101b5c1b713e28fb2cd46 100644 (file)
@@ -6764,4 +6764,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index 1381174a51654e9d3f2c23227c1175db1afe4a3c..aaccccab5a53c16c20f365a3214a0dbbd4287388 100644 (file)
@@ -1707,14 +1707,11 @@ void ical_ctdl_set_exclusive_msgid(char *name, char *filename, char *partnum,
                        }
                        if (p != NULL) {
                                strcpy(imm->uid, icalproperty_get_comment(p));
-                               strcpy(imm->subject,
-                                               icalproperty_get_comment(p));
+                               /* strcpy(imm->subject, icalproperty_get_comment(p)); old aethera hack */
                        }
                        p = ical_ctdl_get_subprop(cal, ICAL_SUMMARY_PROPERTY);
                        if (p != NULL) {
-                               strcat(imm->subject, " ");
-                               strcat(imm->subject,
-                                               icalproperty_get_comment(p));
+                               strcpy(imm->subject, icalproperty_get_comment(p));
                        }
                        p = ical_ctdl_get_subprop(cal, ICAL_DTSTART_PROPERTY);
                        if (p != NULL) {
index d1f747e69cc97909eb046667dae76b4b99cf2fe8..36f7d9cf7beeca1d02c65ed11b958de21b786097 100644 (file)
@@ -368,7 +368,6 @@ int vcard_upload_beforesave(struct CtdlMessage *msg) {
 
                                /* 
                                 * Set the EUID of the message to the UID of the vCard.
-                                * Also set the Subject if there isn't already one.
                                 */
                                if (msg->cm_fields['E'] != NULL) free(msg->cm_fields['E']);
                                s = vcard_get_prop(v, "UID", 0, 0, 0);
@@ -379,6 +378,20 @@ int vcard_upload_beforesave(struct CtdlMessage *msg) {
                                        }
                                }
 
+                               /*
+                                * If the message has no Subject, set it to the name in
+                                * the vCard.
+                                */
+                               if (msg->cm_fields['U'] == NULL) {
+                                       s = vcard_get_prop(v, "FN", 0, 0, 0);
+                                       if (s == NULL) {
+                                               s = vcard_get_prop(v, "N", 0, 0, 0);
+                                       }
+                                       if (s != NULL) {
+                                               msg->cm_fields['U'] = strdup(s);
+                                       }
+                               }
+
                                /* Re-serialize it back into the msg body */
                                ser = vcard_serialize(v);
                                if (ser != NULL) {