summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: be5cfe0)
raw | patch | inline | side by side (parent: be5cfe0)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 12 Oct 2010 08:33:37 +0000 (08:33 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 12 Oct 2010 08:33:37 +0000 (08:33 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19995 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/groupware/admin/ogroups/GroupwareDistributionList/class_GroupwareDistributionList.inc | patch | blob | history |
diff --git a/gosa-plugins/groupware/admin/ogroups/GroupwareDistributionList/class_GroupwareDistributionList.inc b/gosa-plugins/groupware/admin/ogroups/GroupwareDistributionList/class_GroupwareDistributionList.inc
index 6e499e35420b6c8818df21ea7eddb80bf8d692d0..89a55acf58fd32c526dba7f5bcba83b73634db88 100644 (file)
--- a/gosa-plugins/groupware/admin/ogroups/GroupwareDistributionList/class_GroupwareDistributionList.inc
+++ b/gosa-plugins/groupware/admin/ogroups/GroupwareDistributionList/class_GroupwareDistributionList.inc
*/
function save()
{
+ // Cast mailSizeLimit to integer
+ if($this->mailSizeLimit!=NULL){
+ $this->mailSizeLimit += 0;
+ }
// If this is a new account then add it.
$rpc = $this->config->getRpcHandle();
{
$messages = plugin::check();
+ // Get current object-group name maybe it is invalid for us.
+ if(isset($this->parent->by_object['ogroup']->cn)){
+ $this->cn = &$this->parent->by_object['ogroup']->cn;
+ }
+ // Validate name later... #FIXME
+
+ // Validate email address
+ if(!tests::is_email($this->primaryMailAddress)) {
+ $messages[] = msgPool::invalid(_("Mail address"), $this->primaryMailAddress, '', 'example@gonicus.de');
+ }
+
+ // Validate email address
+ if($this->featureEnabled('mailSizeLimit')){
+ if($this->mailSizeLimit != NULL && !is_numeric($this->mailSizeLimit)){
+ $messages[] = msgPool::invalid(_("Incoming mail size limitation"), $this->mailSizeLimit, '/[0-9]/' );
+ }
+ }
+
// Check which accounts have valid groupware mail addresses.
- $uids = $this->getOgroupMemberList();
- $rpc = $this->config->getRpcHandle();
- $verified = $rpc->gwVerifyAcct($uids);
- if(!$rpc->success()){
- $messages[] = sprintf(_("Failed to verify account ids! Error was: '%s'."),$rpc->get_error());
- }else{
- $noExt = array();
- foreach($verified as $uid => $mail){
- if(empty($mail)) $noExt[] = $uid;
- }
- if(count($noExt)){
- $message = sprintf(_("The following object group members do not have a valid groupware extension and will be ignored as distribution list members: %s"),msgPool::buildList($noExt));
- msg_dialog::display(_("Info"),$message, INFO_DIALOG);
+ if(!count($messages)){
+ $uids = $this->getOgroupMemberList();
+ $rpc = $this->config->getRpcHandle();
+ $verified = $rpc->gwVerifyAcct($uids);
+ if(!$rpc->success()){
+ $messages[] = sprintf(_("Failed to verify account ids! Error was: '%s'."),$rpc->get_error());
+ }else{
+ $noExt = array();
+ foreach($verified as $uid => $mail){
+ if(empty($mail)) $noExt[] = $uid;
+ }
+ if(count($noExt)){
+ $message = sprintf(_("The following object group members do not have a valid groupware extension and will be ignored as distribution list members: %s"),msgPool::buildList($noExt));
+ msg_dialog::display(_("Info"),$message, INFO_DIALOG);
+ }
}
}