diff --git a/plugins/kolab_core/kolab_core.php b/plugins/kolab_core/kolab_core.php index 425efa83..8ff82e87 100644 --- a/plugins/kolab_core/kolab_core.php +++ b/plugins/kolab_core/kolab_core.php @@ -2,7 +2,7 @@ /** * Kolab core library - * + * * Plugin to setup a basic environment for interaction with a Kolab server. * Other Kolab-related plugins will depend on it and can use the static API rcube_core * @@ -29,8 +29,8 @@ class kolab_core extends rcube_plugin $include_path = $this->home . PATH_SEPARATOR . ini_get('include_path'); set_include_path($include_path); - // Register password reset hook - $this->add_hook('password_change', array($this, 'password_change')); + // Register password reset hook + $this->add_hook('password_change', array($this, 'password_change')); } /** @@ -38,9 +38,9 @@ class kolab_core extends rcube_plugin */ public function password_change($args) { - rcmail::get_instance()->session->remove('__auth'); + rcmail::get_instance()->session->remove('__auth'); - return $args; + return $args; } } diff --git a/plugins/kolab_core/rcube_kolab.php b/plugins/kolab_core/rcube_kolab.php index a54776f5..c773a93d 100644 --- a/plugins/kolab_core/rcube_kolab.php +++ b/plugins/kolab_core/rcube_kolab.php @@ -27,7 +27,7 @@ require_once 'Horde/Perms.php'; class rcube_kolab { public static $last_error; - + private static $horde_auth; private static $config; private static $ready = false; @@ -102,7 +102,7 @@ class rcube_kolab self::$ready = true; } else { - raise_error(array( + raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => sprintf("Unable to authenticate user %s!", $_SESSION['username'])), @@ -197,19 +197,19 @@ class rcube_kolab public static function is_subscribed($folder) { static $subscribed; // local cache - + if (!$subscribed) { $rcmail = rcmail::get_instance(); // try without connection first (list could be served from cache) $subscribed = $rcmail->imap ? $rcmail->imap->list_mailboxes() : array(); - + // now really get the list from the IMAP server if (empty($subscribed) || $subscribed == array('INBOX')) { $rcmail->imap_connect(); $subscribed = $rcmail->imap->list_mailboxes(); } } - + return in_array($folder, $subscribed); }