Code

Updated cyrus get_quota handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Dec 2008 12:58:25 +0000 (12:58 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Dec 2008 12:58:25 +0000 (12:58 +0000)
-Do not display any quota warnings if the quota wasn't set

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13242 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc

index dd377f10f887622f67299ff714e05042404ee86d..152daee4d5ec2d1d74fb3b119f82c1b704143116 100644 (file)
@@ -113,10 +113,16 @@ class mailMethodCyrus extends mailMethod{
       return(FALSE);
     }
 
+    $this->reset_error();
+
     /* Load quota settings */
     $result = array("quotaUsage"=>"","gosaMailQuota"=>"");
     $quota_value = @imap_get_quota($this->imap_handle, $this->account_id);
 
+    /* Reset error queue, imap_qet_quota() will fail if the quota wasn't set yet.
+     */
+    imap_errors();
+
     if(is_array($quota_value) && count($quota_value)) {
       if (isset($quota_value["STORAGE"]) && is_array($quota_value["STORAGE"])){