From: hickert Date: Mon, 5 Feb 2007 05:03:29 +0000 (+0000) Subject: Added patches from 2.5 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f107cfc45df17284b0fc42fd4aed4ed08d0c137e;p=gosa.git Added patches from 2.5 - Fixed vacation message adaption %o %ou. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5688 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 54254ed79..bb0607a3e 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -85,7 +85,7 @@ class user extends plugin /* attribute list for save action */ var $attributes= array("sn", "givenName", "uid", "personalTitle", "academicTitle", - "homePostalAddress", "homePhone", "labeledURI", "o", "ou", "dateOfBirth", "gender","preferredLanguage", + "homePostalAddress", "homePhone", "labeledURI", "ou", "o", "dateOfBirth", "gender","preferredLanguage", "departmentNumber", "employeeNumber", "employeeType", "l", "st","jpegPhoto", "roomNumber", "telephoneNumber", "mobile", "pager", "cn", "userPKCS12", "postalAddress", "facsimileTelephoneNumber", "userSMIMECertificate"); diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc index d9c203927..468e4ab7e 100644 --- a/plugins/personal/mail/class_mailAccount.inc +++ b/plugins/personal/mail/class_mailAccount.inc @@ -395,8 +395,15 @@ class mailAccount extends plugin /* Replace attributes */ $attrs= $this->parent->by_object['user']->attributes; foreach ($attrs as $val){ - $contents= preg_replace("/%$val/", - $this->parent->by_object['user']->$val, $contents); + + if(preg_match("/dateOfBirth/",$val)){ + if($this->parent->by_object['user']->use_dob){ + $contents= preg_replace("/%$val/",date("Y-d-m",$this->parent->by_object['user']->dateOfBirth),$contents); + } + }else { + $contents= preg_replace("/%$val/", + $this->parent->by_object['user']->$val, $contents); + } } /* Save message */