From: hickert Date: Fri, 23 Apr 2010 06:39:51 +0000 (+0000) Subject: Applied gofax patch X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e17db8ce28823acb4312046464e3f24b24cd4f68;p=gosa.git Applied gofax patch git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@17804 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc b/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc index f7d814e47..35121299a 100644 --- a/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc +++ b/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc @@ -633,10 +633,9 @@ class gofaxAccount extends plugin $message[]= msgPool::invalid(_("Fax number"),$this->facsimileTelephoneNumber,"/[0-9]/"); } - /* IF mail is specified (which is only the case if there's no mail account - present), check if it's valid.. */ - if (@isset($this->parent->by_object['mailAccount']) && - $this->goFaxDeliveryMode & 32){ + // check for a valid Mail-Address in case of 'delivery to mailbox' + $mailAccount = (isset($this->parent->by_object['mailAccount']) && $this->parent->by_object['mailAccount']->is_account); + if(!$mailAccount && $this->goFaxDeliveryMode & 32){ if ($this->mail == ""){ $message[]= _("Mail delivery is requested without target address!"); } elseif (!tests::is_email($this->mail)){ diff --git a/gosa-plugins/mail/personal/mail/class_mailAccount.inc b/gosa-plugins/mail/personal/mail/class_mailAccount.inc index 12755e1c2..79428a6f4 100644 --- a/gosa-plugins/mail/personal/mail/class_mailAccount.inc +++ b/gosa-plugins/mail/personal/mail/class_mailAccount.inc @@ -799,6 +799,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();