]> code.citadel.org Git - citadel.git/commitdiff
* "conflicts" check now also tells the client whether a conflicting event
authorArt Cancro <ajc@citadel.org>
Wed, 23 Oct 2002 04:06:41 +0000 (04:06 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 23 Oct 2002 04:06:41 +0000 (04:06 +0000)
  is really just an older version of the same object.

citadel/ChangeLog
citadel/serv_calendar.c

index fe5cf67cf904f272a232a3e60902d136599b8a55..1138105850261c2129294c384a54fc3fde2d614e 100644 (file)
@@ -1,4 +1,8 @@
  $Log$
+ Revision 601.47  2002/10/23 04:06:41  ajc
+ * "conflicts" check now also tells the client whether a conflicting event
+   is really just an older version of the same object.
+
  Revision 601.46  2002/10/23 03:55:21  ajc
  * Finished: when saving an object of type text/calendar to the Calendar> room,
    set the Citadel "extended message ID" to the UID of the VEVENT object.  This
@@ -4144,3 +4148,4 @@ 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 c28d5e8aa1488ea70cfe79563ed0110aeff59cf6..19bcedf442c246e00310c169738574d0f1248152 100644 (file)
@@ -271,8 +271,10 @@ void ical_hunt_for_conflicts_backend(long msgnum, void *data) {
        icalproperty *p;
        char conflict_event_uid[SIZ];
        char conflict_event_summary[SIZ];
+       char compare_uid[SIZ];
 
        cal = (icalcomponent *)data;
+       strcpy(compare_uid, "");
        strcpy(conflict_event_uid, "");
        strcpy(conflict_event_summary, "");
 
@@ -311,10 +313,16 @@ void ical_hunt_for_conflicts_backend(long msgnum, void *data) {
        p = ical_ctdl_get_subprop(cal, ICAL_DTEND_PROPERTY);
        if (p != NULL) t1end = icalproperty_get_dtend(p);
        
+       p = ical_ctdl_get_subprop(cal, ICAL_UID_PROPERTY);
+       if (p != NULL) {
+               strcpy(compare_uid, icalproperty_get_comment(p));
+       }
+
        p = ical_ctdl_get_subprop(ird.cal, ICAL_UID_PROPERTY);
        if (p != NULL) {
                strcpy(conflict_event_uid, icalproperty_get_comment(p));
        }
+
        p = ical_ctdl_get_subprop(ird.cal, ICAL_SUMMARY_PROPERTY);
        if (p != NULL) {
                strcpy(conflict_event_summary, icalproperty_get_comment(p));
@@ -324,10 +332,14 @@ void ical_hunt_for_conflicts_backend(long msgnum, void *data) {
        icalcomponent_free(ird.cal);
 
        if (ical_ctdl_is_overlap(t1start, t1end, t2start, t2end)) {
-               cprintf("%ld||%s|%s|\n",
+               cprintf("%ld||%s|%s|%d|\n",
                        msgnum,
                        conflict_event_uid,
-                       conflict_event_summary
+                       conflict_event_summary,
+                       (       ((strlen(compare_uid)>0)
+                               &&(!strcasecmp(compare_uid,
+                               conflict_event_uid))) ? 1 : 0
+                       )
                );
        }
 }