Code

Update mail Account
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 9 Dec 2008 10:55:16 +0000 (10:55 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 9 Dec 2008 10:55:16 +0000 (10:55 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13200 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc
gosa-plugins/mail/personal/mail/class_mail-methods.inc
gosa-plugins/mail/personal/mail/class_mailAccount.inc

index ef5bf392a8a758f7dd78246c7a803c085cb2d27d..6b1e72f4e8231627a6fbb2e95ea006eb82cce27a 100644 (file)
@@ -178,6 +178,21 @@ class mailMethodKolab extends mailMethodCyrus
       "<b>Setting Quota</b>");
     return(TRUE);
   }
+
+
+  public function allow_remove(&$reason)
+  {
+    if(isset($this->parent->attrs)){
+      if(in_array_ics("kolabDeleteFlag",array_keys($this->parent->attrs))){
+        $reason = _("Waiting for kolab to remove mail properties...");
+        return(FALSE);
+      }elseif(in_array("gosaMailAccount",$this->parent->attrs['objectClass'])){
+        $reason = _("Please remove the mail settings first to allow kolab to call its remove methods!");
+        return(FALSE);
+      }
+    }
+    return(TRUE);
+  }
 }
 
 
index 0d4e36a94763e5f9840a5fae184eec8690f38712..3d5698a947041a7f81bbc4530ff7bf6ba5d8fa8d 100644 (file)
@@ -665,7 +665,11 @@ class mailMethod{
   {
     return($this->enableFolderTypes);
   }
-   
+
+  public function allow_remove(&$reason)
+  {
+    return(TRUE);
+  }
 }
 
 
index 147802851934d2613dc958147301fb05976c17ea..ccad100f2d001db248428ab9266ff98710a8c131 100644 (file)
@@ -1336,6 +1336,17 @@ class mailAccount extends plugin
   }
 
 
+  function allow_remove()
+  {
+    $resason = "";
+    if(!$this->mailMethod->allow_remove($reason)){
+      return($reason);
+    }
+    return("");
+  }
+
+
+
   /*! \brief  ACL settings 
    */
   static function plInfo()