summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cedd264)
raw | patch | inline | side by side (parent: cedd264)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 31 Aug 2010 08:33:31 +0000 (08:33 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 31 Aug 2010 08:33:31 +0000 (08:33 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19499 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/groupware/personal/groupware/class_groupware.inc | patch | blob | history |
diff --git a/gosa-plugins/groupware/personal/groupware/class_groupware.inc b/gosa-plugins/groupware/personal/groupware/class_groupware.inc
index d76a31871167c034c4be455e8eb5fd909e519c17..f9ddf7c08288d058c516112890b22459cf1180f6 100644 (file)
{
var $plHeadline = "Mail";
var $plDescription = "GOsa mail extension.";
+ var $view_logged = FALSE;
var $attributes = array(
"mailAddress",
var $alternateAddresses = "";
var $forwardingAddresses = "";
var $vacationEnabled = FALSE;
- var $vacationStart = "";
- var $vacationStop = "";
+ var $vacationStart = 0;
+ var $vacationStop = 0;
var $vacationMessage = "";
var $mailBoxWarnLimitEnabled = FALSE;
var $mailBoxWarnLimitValue = "";
}
}
+ // Set vacation start/stop if not set alreasy
+ $this->vacationStart = time();
+ $this->vacationStop = time() + (14 * 60*60*24);
+
// Prepare vacation start/stop time to be initially valid.
- $this->gosaVacationStart= date('d.m.Y', $this->gosaVacationStart);
- $this->gosaVacationStop= date('d.m.Y', $this->gosaVacationStop);
+ $this->vacationStart= date('d.m.Y', $this->vacationStart);
+ $this->vacationStop= date('d.m.Y', $this->vacationStop);
}
/* Replace vacation start and end time */
if($this->mailMethod->vacationRangeEnabled()){
if(preg_match("/%start/",$contents)){
- $contents = preg_replace("/%start/",$this->gosaVacationStart,$contents);
+ $contents = preg_replace("/%start/",$this->vacationStart,$contents);
}
if(preg_match("/%end/",$contents)){
- $contents = preg_replace("/%end/",$this->gosaVacationStop,$contents);
+ $contents = preg_replace("/%end/",$this->vacationStop,$contents);
}
}else{
if(preg_match("/%start/",$contents)){
/* Check date strings */
$state= true;
- if ($this->gosaVacationStart == "" || !tests::is_date($this->gosaVacationStart)) {
- $message[]= msgPool::invalid(_("from"),$this->gosaVacationStart);
+ if ($this->vacationStart == "" || !tests::is_date($this->vacationStart)) {
+ $message[]= msgPool::invalid(_("from"),$this->vacationStart);
$state= false;
}
- if ($this->gosaVacationStart == "" || !tests::is_date($this->gosaVacationStop)) {
- $message[]= msgPool::invalid(_("to"),$this->gosaVacationStop);
+ if ($this->vacationStart == "" || !tests::is_date($this->vacationStop)) {
+ $message[]= msgPool::invalid(_("to"),$this->vacationStop);
$state= false;
}
#TODO: take care of date format
if ($state) {
- list($day, $month, $year)= explode('.', $this->gosaVacationStart);
+ list($day, $month, $year)= explode('.', $this->vacationStart);
$start= mktime(0,0,0,$month, $day, $year);
- list($day, $month, $year)= explode('.', $this->gosaVacationStop);
+ list($day, $month, $year)= explode('.', $this->vacationStop);
$stop= mktime(0,0,0,$month, $day, $year);
if($start > $stop){
$message[]= msgPool::invalid(_("Vacation interval"));