plugins/libkolab
Aleksander Machniak
machniak at kolabsys.com
Tue Jun 5 09:17:41 CEST 2012
plugins/libkolab/lib/kolab_format.php | 2 +-
plugins/libkolab/lib/kolab_format_xcal.php | 4 ++--
plugins/libkolab/lib/kolab_storage_cache.php | 4 ++--
plugins/libkolab/lib/kolab_storage_folder.php | 10 +++++-----
4 files changed, 10 insertions(+), 10 deletions(-)
New commits:
commit 3f3cf6bc65d3e72ae19a3c8a78aba533e5186232
Author: Aleksander Machniak <alec at alec.pl>
Date: Tue Jun 5 09:15:23 2012 +0200
Use Roundcube Framework where applicable, so we can use this code out of Roundcube
diff --git a/plugins/libkolab/lib/kolab_format.php b/plugins/libkolab/lib/kolab_format.php
index b6215e0..db81577 100644
--- a/plugins/libkolab/lib/kolab_format.php
+++ b/plugins/libkolab/lib/kolab_format.php
@@ -186,7 +186,7 @@ abstract class kolab_format
}
if ($log) {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 660,
'type' => 'php',
'file' => __FILE__,
diff --git a/plugins/libkolab/lib/kolab_format_xcal.php b/plugins/libkolab/lib/kolab_format_xcal.php
index 1eb2acf..19d2921 100644
--- a/plugins/libkolab/lib/kolab_format_xcal.php
+++ b/plugins/libkolab/lib/kolab_format_xcal.php
@@ -249,7 +249,7 @@ abstract class kolab_format_xcal extends kolab_format
$attendees->push($att);
}
else {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Invalid event attendee: " . json_encode($attendee),
@@ -316,7 +316,7 @@ abstract class kolab_format_xcal extends kolab_format
$this->obj->setExceptionDates($exdates);
}
else {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Invalid event recurrence rule: " . json_encode($object['recurrence']),
diff --git a/plugins/libkolab/lib/kolab_storage_cache.php b/plugins/libkolab/lib/kolab_storage_cache.php
index cc9b38c..d1ec64e 100644
--- a/plugins/libkolab/lib/kolab_storage_cache.php
+++ b/plugins/libkolab/lib/kolab_storage_cache.php
@@ -230,7 +230,7 @@ class kolab_storage_cache
);
if (!$this->db->affected_rows($result)) {
- rcmail::raise_error(array(
+ rcube::raise_error(array(
'code' => 900, 'type' => 'php',
'message' => "Failed to write to kolab cache"
), true);
@@ -551,7 +551,7 @@ class kolab_storage_cache
" VALUES $buffer"
);
if (!$this->db->affected_rows($result)) {
- rcmail::raise_error(array(
+ rcube::raise_error(array(
'code' => 900, 'type' => 'php',
'message' => "Failed to write to kolab cache"
), true);
diff --git a/plugins/libkolab/lib/kolab_storage_folder.php b/plugins/libkolab/lib/kolab_storage_folder.php
index 684ed35..cd049d9 100644
--- a/plugins/libkolab/lib/kolab_storage_folder.php
+++ b/plugins/libkolab/lib/kolab_storage_folder.php
@@ -148,7 +148,7 @@ class kolab_storage_folder
switch ($info['namespace']) {
case 'personal':
- $this->owner = $rcmail->user->get_username();
+ $this->owner = $rcmail->get_user_name();
break;
case 'shared':
@@ -159,7 +159,7 @@ class kolab_storage_folder
$owner = '';
list($prefix, $user) = explode($this->imap->get_hierarchy_delimiter(), $info['name']);
if (strpos($user, '@') === false) {
- $domain = strstr($rcmail->user->get_username(), '@');
+ $domain = strstr($rcmail->get_user_name(), '@');
if (!empty($domain))
$user .= $domain;
}
@@ -422,7 +422,7 @@ class kolab_storage_folder
}
if (!$xml) {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__,
@@ -470,7 +470,7 @@ class kolab_storage_folder
if (preg_match('!<uid>(.+)</uid>!Uims', $xml, $m))
$msgadd = " UID = " . trim(strip_tags($m[1]));
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__,
@@ -606,7 +606,7 @@ class kolab_storage_folder
return true;
}
else {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Failed to move message $msguid to $target_folder: " . $this->imap->get_error_str(),
More information about the commits
mailing list