Code

Faked quota settings - this is part to be cleaned up for the next GOsa release
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Nov 2005 07:26:01 +0000 (07:26 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Nov 2005 07:26:01 +0000 (07:26 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1999 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_mail-methods-cyrus.inc
plugins/admin/groups/class_groupMail.inc
plugins/personal/mail/class_mailAccount.inc

index 6448e94bd5ade42f29726c4267eaf738bc258c69..e1becdae95add284773e002467c6e61937bc35bf 100644 (file)
@@ -123,7 +123,7 @@ class mailMethodCyrus extends mailMethod
   {
     /* Workaround for the php imap extension */
     if ($gosaMailQuota == ""){
-      $gosaMailQuota= "-1";
+      $gosaMailQuota= "2147483647";
     }
 
     /* Write mail quota */
index 133c432876b8ead04ee9a7cabb3d4058f1061351..395b97a4a461fc918c7d00464cb106576be98a14 100644 (file)
@@ -119,8 +119,13 @@ class mailgroup extends plugin
           }
           
           /* Update quota values */
-          $this->quotaUsage= $quota['quotaUsage'];
-          $this->gosaMailQuota= $quota['gosaMailQuota'];
+          if ($quota['gosaMailQuota'] == 2147483647){
+            $this->quotaUsage= "";
+            $this->gosaMailQuota= "";
+          } else {
+            $this->quotaUsage= $quota['quotaUsage'];
+            $this->gosaMailQuota= $quota['gosaMailQuota'];
+          }
           $method->disconnect();
         }
 
index 0fddf5122dc6b874a19e6c47ea1b212df6e6d39d..0de58c405e8c4c6355e3f128e64be3cefb93d92f 100644 (file)
@@ -105,8 +105,15 @@ class mailAccount extends plugin
         $id= $method->uattrib;
         if ($method->connect($this->attrs["gosaMailServer"][0])){
           $quota= $method->getQuota($this->folder_prefix.$this->$id);
-          $this->quotaUsage= $quota['quotaUsage'];
-          $this->gosaMailQuota= $quota['gosaMailQuota'];
+
+          /* Update quota values */
+          if ($quota['gosaMailQuota'] == 2147483647){
+            $this->quotaUsage= "";
+            $this->gosaMailQuota= "";
+          } else {
+            $this->quotaUsage= $quota['quotaUsage'];
+            $this->gosaMailQuota= $quota['gosaMailQuota'];
+          }
           $this->mailboxList= $method->getMailboxList(
               $this->folder_prefix.$this->$id,
               $this->$id);