From 0e21ee126be939d1031db3a6bb537455a1fc032e Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 21 Jul 2014 10:22:18 +0000 Subject: [PATCH] * Mail: fixed wrong folders displayed, if Cyrus administration was activated $this->disconnect() does nothing anymore, need to use $this->adminConnection(false) instead! also no need to switch to admin-connection in call to getUserData for current user --- emailadmin/inc/class.emailadmin_imap_cyrus.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/emailadmin/inc/class.emailadmin_imap_cyrus.inc.php b/emailadmin/inc/class.emailadmin_imap_cyrus.inc.php index 240a3b3544..7f28865cff 100644 --- a/emailadmin/inc/class.emailadmin_imap_cyrus.inc.php +++ b/emailadmin/inc/class.emailadmin_imap_cyrus.inc.php @@ -114,7 +114,8 @@ class emailadmin_imap_cyrus extends emailadmin_imap */ function getUserData($_username) { - $this->adminConnection(); + // no need to switch to admin-connection for reading quota of current user + if ($_username !== $GLOBALS['egw_info']['user']['account_lid']) $this->adminConnection(); $userData = array(); if(($quota = $this->getQuotaByUser($_username,'ALL'))) @@ -124,7 +125,8 @@ class emailadmin_imap_cyrus extends emailadmin_imap } //error_log(__LINE__.': '.__METHOD__."('$_username') quota=".array2string($quota).' returning '.array2string($userData)); - $this->disconnect(); + // $this->disconnect() does nothing anymore, need to use $this->adminConnection(false) instead! + if ($_username !== $GLOBALS['egw_info']['user']['account_lid']) $this->adminConnection(false); return $userData; }