diff --git a/plugins/calendar/drivers/kolab/kolab_calendar.php b/plugins/calendar/drivers/kolab/kolab_calendar.php index e20133e1..d5efb219 100644 --- a/plugins/calendar/drivers/kolab/kolab_calendar.php +++ b/plugins/calendar/drivers/kolab/kolab_calendar.php @@ -279,7 +279,7 @@ class kolab_calendar $saved = $this->storage->save($object, 'event'); if (!$saved) { - raise_error(array( + rcube::raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "Error saving event object to Kolab server"), @@ -313,7 +313,7 @@ class kolab_calendar $saved = $this->storage->save($object, 'event', $event['id']); if (!$saved) { - raise_error(array( + rcube::raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "Error saving event object to Kolab server"), @@ -338,7 +338,7 @@ class kolab_calendar $deleted = $this->storage->delete($event['id'], $force); if (!$deleted) { - raise_error(array( + rcube::raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "Error deleting event object from Kolab server"), @@ -360,7 +360,7 @@ class kolab_calendar return true; } else { - raise_error(array( + rcube::raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "Error undeleting the event object $uid from the Kolab server"), diff --git a/plugins/calendar/drivers/kolab/kolab_driver.php b/plugins/calendar/drivers/kolab/kolab_driver.php index 609d81b0..4bc1f637 100644 --- a/plugins/calendar/drivers/kolab/kolab_driver.php +++ b/plugins/calendar/drivers/kolab/kolab_driver.php @@ -466,7 +466,7 @@ class kolab_driver extends calendar_driver $old = $master = $fromcalendar->get_event($event['id']); if (!$old || !$old['start']) { - raise_error(array( + rcube::raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "Failed to load event object to update: id=" . $event['id']), @@ -927,7 +927,7 @@ class kolab_driver extends calendar_driver // trigger updates on folder $trigger = $cal->storage->trigger(); if (is_object($trigger) && is_a($trigger, 'PEAR_Error')) { - raise_error(array( + rcube::raise_error(array( 'code' => 900, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "Failed triggering folder. Error was " . $trigger->getMessage()), diff --git a/plugins/kolab_addressbook/kolab_addressbook.php b/plugins/kolab_addressbook/kolab_addressbook.php index 3ec072e5..a85965ee 100644 --- a/plugins/kolab_addressbook/kolab_addressbook.php +++ b/plugins/kolab_addressbook/kolab_addressbook.php @@ -236,7 +236,7 @@ class kolab_addressbook extends rcube_plugin $this->folders = kolab_storage::get_folders('contact'); if (PEAR::isError($this->folders)) { - raise_error(array( + rcube::raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "Failed to list contact folders from Kolab server:" . $this->folders->getMessage()), diff --git a/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php b/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php index 1c179330..756f5144 100644 --- a/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php +++ b/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php @@ -562,7 +562,7 @@ class rcube_kolab_contacts extends rcube_addressbook $saved = $this->storagefolder->save($object, 'contact'); if (!$saved) { - raise_error(array( + rcube::raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "Error saving contact object to Kolab server"), @@ -596,7 +596,7 @@ class rcube_kolab_contacts extends rcube_addressbook $object = $this->_from_rcube_contact($save_data, $old); if (!$this->storagefolder->save($object, 'contact', $old['uid'])) { - raise_error(array( + rcube::raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "Error saving contact object to Kolab server"), @@ -636,7 +636,7 @@ class rcube_kolab_contacts extends rcube_addressbook $deleted = $is_mailto || $this->storagefolder->delete($uid, $force); if (!$deleted) { - raise_error(array( + rcube::raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "Error deleting a contact object $uid from the Kolab server"), @@ -680,7 +680,7 @@ class rcube_kolab_contacts extends rcube_addressbook $count++; } else { - raise_error(array( + rcube::raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "Error undeleting a contact object $uid from the Kolab server"), @@ -731,10 +731,10 @@ class rcube_kolab_contacts extends rcube_addressbook $saved = $this->storagefolder->save($list, 'distribution-list'); if (!$saved) { - raise_error(array( - 'code' => 600, 'type' => 'php', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => "Error saving distribution-list object to Kolab server"), + rcube::raise_error(array( + 'code' => 600, 'type' => 'php', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Error saving distribution-list object to Kolab server"), true, false); return false; } @@ -758,18 +758,20 @@ class rcube_kolab_contacts extends rcube_addressbook $this->_fetch_groups(); $result = false; - if ($list = $this->distlists[$gid]) + if ($list = $this->distlists[$gid]) { $deleted = $this->storagefolder->delete($list['uid']); + } if (!$deleted) { - raise_error(array( - 'code' => 600, 'type' => 'php', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => "Error deleting distribution-list object from the Kolab server"), + rcube::raise_error(array( + 'code' => 600, 'type' => 'php', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Error deleting distribution-list object from the Kolab server"), true, false); } - else + else { $result = true; + } return $result; } @@ -792,10 +794,10 @@ class rcube_kolab_contacts extends rcube_addressbook } if (!$saved) { - raise_error(array( - 'code' => 600, 'type' => 'php', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => "Error saving distribution-list object to Kolab server"), + rcube::raise_error(array( + 'code' => 600, 'type' => 'php', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Error saving distribution-list object to Kolab server"), true, false); return false; } @@ -857,10 +859,10 @@ class rcube_kolab_contacts extends rcube_addressbook $saved = true; if (!$saved) { - raise_error(array( - 'code' => 600, 'type' => 'php', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => "Error saving distribution-list to Kolab server"), + rcube::raise_error(array( + 'code' => 600, 'type' => 'php', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Error saving distribution-list to Kolab server"), true, false); $added = false; $this->set_error(self::ERROR_SAVING, 'errorsaving'); @@ -899,10 +901,10 @@ class rcube_kolab_contacts extends rcube_addressbook $saved = $this->storagefolder->save($list, 'distribution-list', $list['uid']); if (!$saved) { - raise_error(array( - 'code' => 600, 'type' => 'php', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => "Error saving distribution-list object to Kolab server"), + rcube::raise_error(array( + 'code' => 600, 'type' => 'php', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Error saving distribution-list object to Kolab server"), true, false); } else { diff --git a/plugins/libkolab/libkolab.php b/plugins/libkolab/libkolab.php index 3709ee04..887d3082 100644 --- a/plugins/libkolab/libkolab.php +++ b/plugins/libkolab/libkolab.php @@ -46,7 +46,7 @@ class libkolab extends rcube_plugin kolab_format::$timezone = new DateTimeZone($rcmail->config->get('timezone', 'GMT')); } catch (Exception $e) { - raise_error($e, true); + rcube::raise_error($e, true); kolab_format::$timezone = new DateTimeZone('GMT'); }