Code

Added patches from 2.5
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 5 Feb 2007 05:03:29 +0000 (05:03 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 5 Feb 2007 05:03:29 +0000 (05:03 +0000)
- Fixed vacation message adaption %o %ou.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5688 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/generic/class_user.inc
plugins/personal/mail/class_mailAccount.inc

index 54254ed79da0d940fbfa9e9271068947b66a5ad4..bb0607a3eddc4b5e373658f199a86020a4444e75 100644 (file)
@@ -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");
index d9c2039274ed77986a136cf1256d410be10108d5..468e4ab7e6544ad68f6a08f5f641013b8e671c99 100644 (file)
@@ -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 */