From 933d00e79f183b61eb571542ca6002825b76d360 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 1 Aug 2014 12:13:21 +0000 Subject: [PATCH] fix call for mail.mail_ui.ajax_refreshQuotaDisplay; alter condion on not calling openConnection; --- mail/inc/class.mail_ui.inc.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index dfb4a080fb..96e15517dc 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -126,7 +126,13 @@ class mail_ui $this->mail_bo = mail_bo::getInstance(true,self::$icServerID); if (mail_bo::$debug) error_log(__METHOD__.__LINE__.' Fetched IC Server:'.self::$icServerID.'/'.$this->mail_bo->profileID.':'.function_backtrace()); //error_log(__METHOD__.__LINE__.array2string($this->mail_bo->icServer)); - if ($_GET['menuaction'] != 'mail.etemplate_widget_nextmatch.ajax_get_rows.etemplate') + + // RegEx to minimize extra openConnection + $needle = '/mail.etemplate_widget_nextmatch.ajax_get_rows.etemplate|' +// . 'mail.mail_ui.ajax_refreshQuotaDisplay|' + . 'mail.mail_ui.ajax_changeProfile|' + . '^(?!mail)/'; + if (!preg_match($needle,$_GET['menuaction'])) { //error_log(__METHOD__.__LINE__.' Fetched IC Server openConnection:'.self::$icServerID.'/'.$this->mail_bo->profileID.':'.function_backtrace()); //openConnection gathers SpecialUseFolderInformation and Delimiter Info @@ -3966,9 +3972,10 @@ class mail_ui //error_log(__METHOD__.__LINE__.' change Profile to ->'.$icServerID); $this->changeProfile($icServerID); } - if($this->mail_bo->connectionStatus !== false) { + try + { $quota = $this->mail_bo->getQuotaRoot(); - } else { + } catch (Exception $e) { $quota['limit'] = 'NOT SET'; }