From: hickert Date: Thu, 6 Dec 2007 08:44:15 +0000 (+0000) Subject: Closes #299 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3e4f55ed426c4dc28147334e7281864021ea4a25;p=gosa.git Closes #299 Udpated mailMethod -Vacations templates will now be able to use %start %stop as replacement for Vacation-Start-Stop time. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8037 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc index c696b7f02..4b6a7b9ef 100644 --- a/plugins/personal/mail/class_mailAccount.inc +++ b/plugins/personal/mail/class_mailAccount.inc @@ -438,6 +438,14 @@ class mailAccount extends plugin $contents= preg_replace("/%$val/", $this->parent->by_object['user']->$val, $contents); } + + /* Replace vacation start and end time */ + if(preg_match("/%start/",$contents)){ + $contents = preg_replace("/%start/",date("d.m.Y",$this->gosaVacationStart),$contents); + } + if(preg_match("/%end/",$contents)){ + $contents = preg_replace("/%end/",date("d.m.Y",$this->gosaVacationStop),$contents); + } } /* Save message */ @@ -953,7 +961,7 @@ class mailAccount extends plugin $message[]= _("You specified Spam settings, but there is no Folder specified."); } - if (preg_match('/V/', $this->gosaMailDeliveryMode) && $this->gosaVacationStart >= $this->gosaVacationStop){ + if (preg_match('/V/', $this->gosaMailDeliveryMode) && $this->gosaVacationStart > $this->gosaVacationStop){ $message[]= _("Time interval to show vacation message is not valid."); }