Code

Fixed copy & paste for mailAccounts
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 Apr 2010 08:15:17 +0000 (08:15 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 Apr 2010 08:15:17 +0000 (08:15 +0000)
-Vacation start/stop were initialized incorrectly

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

gosa-plugins/mail/personal/mail/class_mailAccount.inc

index b1c99d315fd1fa4665ecfc1326d90149eb0f827a..b57f35ad71a7e3598cdb4bc2af4681ef63130da2 100644 (file)
@@ -1147,7 +1147,7 @@ class mailAccount extends plugin
       $smarty->assign("isModifyableMail"  , $this->mailMethod->isModifyableMail());
       $smarty->assign("initially_was_account", $this->initially_was_account);
 
-      $str = $smarty->fetch(get_template_path("copypaste.tpl",TRUE, dirname(__FILE__)));
+    $str = $smarty->fetch(get_template_path("copypaste.tpl",TRUE, dirname(__FILE__)));
 
       $ret = array();
       $ret['status'] = "";
@@ -1189,6 +1189,14 @@ class mailAccount extends plugin
               $this->mailDomainParts[] = $this->mailDomainPart;
           }
       }
+
+      // Initialize Vacation start/stop times 
+      // This value is set to 'dd.mm.YYYY' if no times are set in the source object. 
+      // But if they are set, then this values contain timestamps.
+      if(isset($source['gosaVacationStart'][0])){
+          $this->gosaVacationStart= date('d.m.Y', $source['gosaVacationStart'][0]);
+          $this->gosaVacationStop= date('d.m.Y', $source['gosaVacationStop'][0]);
+      }
   }