X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fgroups%2Fclass_groupMail.inc;h=f7744376383a24247d20379ec9bb82c810835ec2;hb=0b0ba2643acbe53011db1b3307397cb38adb0c36;hp=fa55b9185946e3467b57a65e5835c9bc59185690;hpb=d492b5b243b8e9313d811a2343012ac9ac941972;p=gosa.git diff --git a/plugins/admin/groups/class_groupMail.inc b/plugins/admin/groups/class_groupMail.inc index fa55b9185..f77443763 100644 --- a/plugins/admin/groups/class_groupMail.inc +++ b/plugins/admin/groups/class_groupMail.inc @@ -119,13 +119,20 @@ 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(); } } + /* Adapt attributes if needed */ + $method->fixAttributesOnLoad($this); } /* Get global filter config */ @@ -160,6 +167,9 @@ class mailgroup extends plugin function execute() { + /* Call parent execute */ + plugin::execute(); + /* Load templating engine */ $smarty= get_smarty(); if ($_SESSION['js']==FALSE){ @@ -356,6 +366,7 @@ class mailgroup extends plugin /* Show dialog */ $smarty->assign("search_image", get_template_path('images/search.png')); + $smarty->assign("usearch_image", get_template_path('images/search_user.png')); $smarty->assign("tree_image", get_template_path('images/tree.png')); $smarty->assign("infoimage", get_template_path('images/info.png')); $smarty->assign("launchimage", get_template_path('images/small_filter.png')); @@ -426,7 +437,7 @@ class mailgroup extends plugin $smarty->assign("$val"."ACL", chkacl($this->acl, "$val")); } if (is_numeric($this->gosaMailQuota) && $this->gosaMailQuota != 0){ - $smarty->assign("quotausage", progressbar(($this->quotaUsage * 100)/ $this->gosaMailQuota,100,15,true)); + $smarty->assign("quotausage", progressbar(round(($this->quotaUsage * 100)/ $this->gosaMailQuota,100,15,true))); $smarty->assign("quotadefined", "true"); } else { $smarty->assign("quotadefined", "false"); @@ -465,6 +476,7 @@ class mailgroup extends plugin $method->deleteMailbox($this->uid); $method->disconnect(); } + $method->fixAttributesOnRemove($this); } /* Optionally execute a command after we're done */ @@ -570,6 +582,7 @@ class mailgroup extends plugin /* Only do IMAP actions if we are not a template */ if (!$this->is_template){ $method= new $this->method($this->config); + $method->fixAttributesOnStore($this); if ($method->connect($this->gosaMailServer)){ $method->updateMailbox($this->uid); $method->setQuota($this->uid, $this->gosaMailQuota); @@ -613,7 +626,7 @@ class mailgroup extends plugin $message[]= _("Please enter a valid email addres in 'Primary address' field."); } $ldap->cd($this->config->current['BASE']); - $ldap->search ("(&(|(mail=".$this->mail.")(gosaMailAlternateAddress=". + $ldap->search ("(&(!(objectClass=gosaUserTemplate))(objectClass=gosaMailAccount)(|(mail=".$this->mail.")(gosaMailAlternateAddress=". $this->mail."))(!(uid=".$this->cn."))(!(cn=".$this->cn.")))"); if ($ldap->count() != 0){ $message[]= _("The primary address you've entered is already in use."); @@ -641,6 +654,14 @@ class mailgroup extends plugin if (is_integer(strpos($this->gosaMailDeliveryMode, "reject")) && $this->gosaMailMaxSize == ""){ $message[]= _("You need to set the maximum mail size in order to reject anything."); } + + if(ord($this->imapacl['anyone'][0])==194){ + $message[] = _("Please choose valid permission settings. Default permission can't be emtpy."); + } + + if(empty($this->gosaMailServer)){ + $message[] = _("Please select a valid mail server."); + } return ($message); }