Code

Fixed spamlevel box
[gosa.git] / plugins / personal / mail / class_mailAccount.inc
index 0cdec484c6c33d4aa51f7fb070c1a5c5279bdedc..067cfdbb9f9048ebb3e1f6947771cbad62d8fcba 100644 (file)
@@ -432,13 +432,8 @@ class mailAccount extends plugin
 
       $smarty->assign("$val", $this->$val);
       $smarty->assign("$val"."ACL", chkacl($this->acl, "$val"));
-  
-        
     }
 
-
-
-
     if (is_numeric($this->gosaMailQuota) && $this->gosaMailQuota != 0){
       $smarty->assign("quotausage", $this->quotaUsage * 100 / $this->gosaMailQuota);
       $smarty->assign("quotadefined", "true");
@@ -506,43 +501,35 @@ class mailAccount extends plugin
     $smarty->assign("custom_sieveACL", chkacl($this->acl, "custom_sieve"));    
     $smarty->assign("only_localACL", chkacl($this->acl, "only_local"));        
 
-  if(isset($this->gosaMailAlternateAddress)&&($this->gosaMailAlternateAddress))  
+    if(count($this->gosaMailAlternateAddress)){ 
       $smarty->assign("SELECT_gosaMailAlternateAddress",true);
-  else 
+    } else { 
       $smarty->assign("SELECT_gosaMailAlternateAddress",false);
+    }
 
-  if(isset($this->spamlevel)&&($this->spamlevel))
-      $smarty->assign("SELECT_spamlevel",true);
-  else
-      $smarty->assign("SELECT_spamlevel",false);
-
-  if(isset($this->spambox)&&($this->spambox))
+    if(count($this->spambox)){
       $smarty->assign("SELECT_spambox",true);
-  else
+    } else {
       $smarty->assign("SELECT_spambox",false);
+    }
 
-  if(isset($this->vacationtemplates)&&($this->vacationtemplates))
+    if(count($this->vacation)) {
       $smarty->assign("SELECT_vacationtemplates",true);
-  else
+    } else {
       $smarty->assign("SELECT_vacationtemplates",false);
+    }
 
-  if(isset($this->gosaMailForwardingAddress)&&($this->gosaMailForwardingAddress))
+    if(count($this->gosaMailForwardingAddress)){
       $smarty->assign("SELECT_gosaMailForwardingAddress",true);
-  else
+    } else {
       $smarty->assign("SELECT_gosaMailForwardingAddress",false);
+    }
 
-  if(isset($this->mailServers)&&($this->mailServers))
+    if(count($mailserver)){
       $smarty->assign("SELECT_mailServers",true);
-  else
+    } else {
       $smarty->assign("SELECT_mailServers",false);
-
-
-
-
-
-
-
-
+    }
 
     $display.= $smarty->fetch (get_template_path('generic.tpl', TRUE, dirname(__FILE__)));
     return ($display);