From: hickert Date: Wed, 19 Dec 2007 07:19:42 +0000 (+0000) Subject: Multiple edit X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=65fa6af9277163bc1b857c6fdd9cb2140323899a;p=gosa.git Multiple edit -Fixed mail Vacation Start Stop -Added Checks git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8140 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/personal/mail/class_mailAccount.inc b/gosa-core/plugins/personal/mail/class_mailAccount.inc index d9db8f209..ab3c46585 100644 --- a/gosa-core/plugins/personal/mail/class_mailAccount.inc +++ b/gosa-core/plugins/personal/mail/class_mailAccount.inc @@ -64,6 +64,9 @@ class mailAccount extends plugin { global $class_mapping; + $this->gosaVacationStart = time(); + $this->gosaVacationStop = time(); + /* Load bases attributes */ plugin::plugin($config, $dn); @@ -1284,6 +1287,45 @@ class mailAccount extends plugin return($ret); } + + function multiple_check() + { + $message = plugin::multiple_check(); + + if(empty($this->gosaMailServer) && in_array("gosaMailServer",$this->multi_boxes)){ + $message[]= _("There is no valid mailserver specified, please add one in the system setup."); + } + + /* Check quota */ + if ($this->gosaMailQuota != '' && in_array("gosaMailQuota",$this->multi_boxes)){ + if (!is_numeric($this->gosaMailQuota)) { + $message[]= _("Value in 'Quota size' is not valid."); + } else { + $this->gosaMailQuota= (int) $this->gosaMailQuota; + } + } + + /* Check rejectsize for integer */ + if ($this->gosaMailMaxSize != '' && in_array("gosaMailMaxSize",$this->multi_boxes)){ + if (!is_numeric($this->gosaMailMaxSize)){ + $message[]= _("Please specify a vaild mail size for mails to be rejected."); + } else { + $this->gosaMailMaxSize= (int) $this->gosaMailMaxSize; + } + } + + if(empty($this->gosaSpamMailbox) && in_array("gosaSpamMailbox",$this->multi_boxes)){ + $message[]= _("You specified Spam settings, but there is no Folder specified."); + } + + if ( in_array("use_vacation",$this->multi_boxes) && + preg_match('/V/', $this->gosaMailDeliveryMode) && $this->gosaVacationStart > $this->gosaVacationStop){ + $message[]= _("Time interval to show vacation message is not valid."); + } + return($message); + } + + function set_multi_edit_values($values) { plugin::set_multi_edit_values($values);