From 41c91b1b9b1ea092fe7aaf09a6313337c6783cb0 Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Tue, 14 Jul 2009 01:17:20 -0400 Subject: [PATCH] fix parse errors - not sure on intent of the export calls though --- imp/lib/Mime/Viewer/Itip.php | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/imp/lib/Mime/Viewer/Itip.php b/imp/lib/Mime/Viewer/Itip.php index 1c95b6d1b..a8df9af81 100644 --- a/imp/lib/Mime/Viewer/Itip.php +++ b/imp/lib/Mime/Viewer/Itip.php @@ -139,23 +139,22 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver $guid = $components[$key]->getAttribute('UID'); // Check if this is an update. try { - $registry->call('calendar/export', array($guid, 'text/calendar'); - - // Try to update in calendar. - if ($registry->hasMethod('calendar/replace')) { - try { - $registry->call('calendar/replace', array('uid' => $guid, 'content' => $components[$key], 'contentType' => $this->mime_part->getType())); - $handled = true; - $url = Horde::url($registry->link('calendar/show', array('uid' => $guid))); - $msgs[] = array('success', _("The event was updated in your calendar.") . - ' ' . Horde::link($url, _("View event"), null, '_blank') . Horde::img('mime/icalendar.png', _("View event"), null, $registry->getImageDir('horde')) . ''); - } catch (Horde_Exception $e) {} - // Could be a missing permission. - $msgs[] = array('warning', _("There was an error updating the event:") . ' ' . $e->getMessage() . '. ' . _("Trying to import the event instead.")); - } - } + $registry->call('calendar/export', array($guid, 'text/calendar')); } catch (Horde_Exception $e) {} + // Try to update in calendar. + if ($registry->hasMethod('calendar/replace')) { + try { + $registry->call('calendar/replace', array('uid' => $guid, 'content' => $components[$key], 'contentType' => $this->mime_part->getType())); + $handled = true; + $url = Horde::url($registry->link('calendar/show', array('uid' => $guid))); + $msgs[] = array('success', _("The event was updated in your calendar.") . + ' ' . Horde::link($url, _("View event"), null, '_blank') . Horde::img('mime/icalendar.png', _("View event"), null, $registry->getImageDir('horde')) . ''); + } catch (Horde_Exception $e) {} + // Could be a missing permission. + $msgs[] = array('warning', _("There was an error updating the event:") . ' ' . $e->getMessage() . '. ' . _("Trying to import the event instead.")); + } + if (!$handled && $registry->hasMethod('calendar/import')) { // Import into calendar. $handled = true; -- 2.11.0