From 2f6dc8daf9da28405565a2c648e33d4c9d4cc919 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Wed, 20 Oct 2010 18:21:04 +0200 Subject: [PATCH] Re-add the $clear parameter instead. --- framework/Icalendar/lib/Horde/Icalendar.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/framework/Icalendar/lib/Horde/Icalendar.php b/framework/Icalendar/lib/Horde/Icalendar.php index b61a8e22b..12f7e9d41 100644 --- a/framework/Icalendar/lib/Horde/Icalendar.php +++ b/framework/Icalendar/lib/Horde/Icalendar.php @@ -540,13 +540,16 @@ class Horde_Icalendar * * @param string $text The data to parse. * @param string $base The type of the base object. + * @param boolean $clear If true clears this object before parsing. * * @return boolean True on successful import, false otherwise. * @throws Horde_Icalendar_Exception */ - public function parsevCalendar($text, $base = 'VCALENDAR') + public function parsevCalendar($text, $base = 'VCALENDAR', $clear = true) { - $this->_attributes = $this->_components = array(); + if ($clear) { + $this->clear(); + } if (preg_match('/^BEGIN:' . $base . '(.*)^END:' . $base . '/ism', $text, $matches)) { $container = true; -- 2.11.0