* Fixed a bug that caused the default recurrence for a new yearly event to be 'day...
authorArt Cancro <ajc@citadel.org>
Thu, 12 Mar 2009 14:44:47 +0000 (14:44 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 12 Mar 2009 14:44:47 +0000 (14:44 +0000)
webcit/event.c

index 25ad1514a3c1a3dc7beee05bef321c60c88e79fd..9b54b6dfc35851b48e25364506234e3d1eed6f18 100644 (file)
@@ -590,8 +590,12 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum,
        int rrymonth = t_start.month;
        int which_rryeartype_is_preselected = 0;
 
-       if ( (recur.by_day[0] != ICAL_RECURRENCE_ARRAY_MAX) 
-          && (recur.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX) ) {
+       if (
+               (recur.by_day[0] != ICAL_RECURRENCE_ARRAY_MAX) 
+               && (recur.by_day[0] != 0) 
+               && (recur.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX)
+               && (recur.by_month[0] != 0)
+       ) {
                which_rryeartype_is_preselected = 1;
                rrymweek = icalrecurrencetype_day_position(recur.by_day[0]);
                rrymweekday = icalrecurrencetype_day_day_of_week(recur.by_day[0]) - 1;