From 8fb04790150ce2ea03777a67276d7f4f2a11617d Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Fri, 13 Jul 2012 12:30:34 +1200 Subject: [PATCH] supported-calendar-component-set uses dead properties too... --- inc/DAVResource.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/inc/DAVResource.php b/inc/DAVResource.php index 83aa5387..71fa0bba 100644 --- a/inc/DAVResource.php +++ b/inc/DAVResource.php @@ -1692,9 +1692,12 @@ EOQRY; if ( $this->IsCalendar() ) { if ( !isset($this->dead_properties) ) $this->FetchDeadProperties(); if ( isset($this->dead_properties[$tag]) ) { - $set_of_components = explode('"', $this->dead_properties[$tag]); + $set_of_components = $this->dead_properties[$tag]; foreach( $set_of_components AS $k => $v ) { - if ( !preg_match('{(VEVENT|VTODO|VJOURNAL|VTIMEZONE|VFREEBUSY|VPOLL|VAVAILABILITY)}', $v) ) { + if ( preg_match('{(VEVENT|VTODO|VJOURNAL|VTIMEZONE|VFREEBUSY|VPOLL|VAVAILABILITY)}', $v, $matches) ) { + $set_of_components[$k] = $matches[1]; + } + else { unset( $set_of_components[$k] ); } }