From 01f2df4ece2329211d9f9890b944579fdb7d9055 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 4 Jul 2015 18:52:41 +0000 Subject: [PATCH] * EMailAdmin: fixed not shown (used) quota for arbitrary user in admin --- emailadmin/inc/class.emailadmin_imap.inc.php | 2 +- emailadmin/inc/class.emailadmin_imap_dovecot.inc.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/emailadmin/inc/class.emailadmin_imap.inc.php b/emailadmin/inc/class.emailadmin_imap.inc.php index 1a63c71fdd..20cbd03261 100644 --- a/emailadmin/inc/class.emailadmin_imap.inc.php +++ b/emailadmin/inc/class.emailadmin_imap.inc.php @@ -197,7 +197,7 @@ class emailadmin_imap extends Horde_Imap_Client_Socket implements defaultimap * * Plugins can overwrite it to eg. construct a special admin user name * - * @param string $_username =null create an admin connection for given user or $this->acc_imap_username + * @param string $_username =true create an admin connection for given user or $this->acc_imap_username */ function adminConnection($_username=true) { diff --git a/emailadmin/inc/class.emailadmin_imap_dovecot.inc.php b/emailadmin/inc/class.emailadmin_imap_dovecot.inc.php index ed0188c0e9..97c90cd019 100644 --- a/emailadmin/inc/class.emailadmin_imap_dovecot.inc.php +++ b/emailadmin/inc/class.emailadmin_imap_dovecot.inc.php @@ -57,9 +57,9 @@ class emailadmin_imap_dovecot extends emailadmin_imap * * Prefixes adminUsername with real username (separated by an asterisk) * - * @param string $_username =null create an admin connection for given user or $this->acc_imap_username + * @param string $_username =true create an admin connection for given user or $this->acc_imap_username */ - function adminConnection($_username=null) + function adminConnection($_username=true) { // generate admin user name of $username if (($pos = strpos($this->acc_imap_admin_username, '*')) !== false) // remove evtl. set username @@ -231,8 +231,8 @@ class emailadmin_imap_dovecot extends emailadmin_imap // we are authenticated with master but for current user if(($quota = $this->getStorageQuotaRoot('INBOX'))) { - $userData['quotaLimit'] = (int) ($quota['limit'] / 1024); - $userData['quotaUsed'] = (int) ($quota['usage'] / 1024); + $userData['quotaLimit'] = (int) ($quota['QMAX'] / 1024); + $userData['quotaUsed'] = (int) ($quota['USED'] / 1024); } $this->username = $bufferUsername; $this->loginName = $bufferLoginName;