From: Art Cancro Date: Thu, 12 Mar 2009 14:44:47 +0000 (+0000) Subject: * Fixed a bug that caused the default recurrence for a new yearly event to be 'day... X-Git-Tag: v7.86~1358 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=2dde14d96e580110ecd91b35d525db0db6649d92;p=citadel.git * Fixed a bug that caused the default recurrence for a new yearly event to be 'day/week/month' instead of 'day/month'. Needed to check for 0 values. --- diff --git a/webcit/event.c b/webcit/event.c index 25ad1514a..9b54b6dfc 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -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;