From: Art Cancro Date: Mon, 14 Jul 2008 16:04:33 +0000 (+0000) Subject: Detect recurring events when rendering a calendar. X-Git-Tag: v7.86~2100 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=2d393ba2296e231c27ebdb182d58d3ba07093dff;p=citadel.git Detect recurring events when rendering a calendar. --- diff --git a/webcit/calendar.c b/webcit/calendar.c index e91012eef..28e0602b3 100644 --- a/webcit/calendar.c +++ b/webcit/calendar.c @@ -459,12 +459,26 @@ void display_individual_cal(icalcomponent *cal, long msgnum, char *from, int unr Cal, delete_cal); - /* Right about here is probably where we want to add code to handle recurring events. +#ifdef TECH_PREVIEW + + /* handle recurring events (unfinished) */ + + /* * Just let libical iterate the recurrence, and keep looping back to the top of this function, * adding new hash entries that all point back to the same msgnum, until either the iteration * stops or some outer bound is reached. The display code *should* automatically do the right * thing (but we'll have to see). + + icalproperty *rrule = icalcomponent_get_first_property(Cal->cal, ICAL_RRULE_PROPERTY); + if (!rrule) return; + struct icalrecurrencetype recur = icalproperty_get_rrule(rrule); + + lprintf(9, "recurrence detected -- need to handle this\n"); + */ + +#endif /* TECH_PREVIEW */ + }