Code

Keep the 'mail' attribute while fax delivery mode includes 'fax to mail'
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 22 Apr 2010 16:03:19 +0000 (16:03 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 22 Apr 2010 16:03:19 +0000 (16:03 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17803 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mail/personal/mail/class_mailAccount.inc

index 5be08f55851775a09c7fd643d8aca6760119ac26..b0c2024ca6c141ab33df0eeb5a5782061970d582 100644 (file)
@@ -798,6 +798,16 @@ class mailAccount extends plugin
       } 
     }
 
+    // Do NOT remove the mail attribute while it is used in the Fax Account.
+    if(isset($this->parent->by_object['gofaxAccount'])){
+        $fax = $this->parent->by_object['gofaxAccount'];
+
+        // Fax delivery to the mail account is activated, keep the mail attribute.
+        if($fax->goFaxDeliveryMode & 32){
+           $this->attributes = array_remove_entries(array('mail'), $this->attributes)  ;
+        }
+    }
+
     /* Remove GOsa attributes */
     plugin::remove_from_parent();