Form-to-icalrecur logic for both types of yearly events.
authorArt Cancro <ajc@citadel.org>
Mon, 10 Nov 2008 22:39:08 +0000 (22:39 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 10 Nov 2008 22:39:08 +0000 (22:39 +0000)
The recurrence editor is now feature complete.  Unfortunately we are
already seeing the nightmare of time zones causing problems with
events recurring on the wrong day.  Let the dystopic nightmare of
timezone debugging begin.

webcit/event.c

index 86142ad8c25bbf5f3a8680e417964fa1cb6f000f..138bc0ff38ffcde2ed92dceed026a4f497f6d2d2 100644 (file)
@@ -938,11 +938,15 @@ void save_individual_event(icalcomponent *supplied_vevent, long msgnum, char *fr
                                        break;
 
                                case ICAL_YEARLY_RECURRENCE:
-                                       if (!strcasecmp(bstr("rrmonthtype"), "rryeartype_ymday")) {
+                                       if (!strcasecmp(bstr("rryeartype"), "rryeartype_ymday")) {
                                                /* no further action is needed here */
                                        }
-                                       if (!strcasecmp(bstr("rrmonthtype"), "rryeartype_ywday")) {
-                                               /* FIXME implement this */
+                                       else if (!strcasecmp(bstr("rryeartype"), "rryeartype_ywday")) {
+                                               recur.by_month[0] = atoi(bstr("rrymonth"));
+                                               recur.by_month[1] = ICAL_RECURRENCE_ARRAY_MAX;
+                                               recur.by_day[0] = (atoi(bstr("rrymweek")) * 8)
+                                                               + atoi(bstr("rrymweekday")) + 1;
+                                               recur.by_day[1] = ICAL_RECURRENCE_ARRAY_MAX;
                                        }
                                        break;