Merge branch 'master' of ssh://git.kolabsys.com/git/roundcube

This commit is contained in:
Thomas 2011-09-21 19:36:53 +02:00
commit 98b9040df2
2 changed files with 10 additions and 10 deletions

View file

@ -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;
}
}

View file

@ -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);
}