$Log$
+ Revision 630.12 2005/02/03 04:36:56 ajc
+ * serv_calendar.c: beforesave hook now looks for the UID inside nested
+ VTODO components, in addition to VCALENDAR components.
+
Revision 630.11 2005/02/01 23:11:46 ajc
* new ENT0 syntax now also outputs EUID
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
char *disp, void *content, char *cbtype, size_t length,
char *encoding, void *cbuserdata)
{
- icalcomponent *cal;
+ icalcomponent *cal, *nested_event, *nested_todo;
icalproperty *p;
struct icalmessagemod *imm;
char new_uid[SIZ];
cal = icalcomponent_new_from_string(content);
if (cal != NULL) {
if (icalcomponent_isa(cal) == ICAL_VCALENDAR_COMPONENT) {
- cal = icalcomponent_get_first_component(
+ nested_event = icalcomponent_get_first_component(
cal, ICAL_VEVENT_COMPONENT
);
+ nested_todo = icalcomponent_get_first_component(
+ cal, ICAL_VTODO_COMPONENT
+ );
+ if (nested_event != NULL) {
+ cal = nested_event;
+ }
+ else if (nested_todo != NULL) {
+ cal = nested_todo;
+ }
}
}
if (cal != NULL) {