* eMail: absent-notice via timed sieve; if using timed sieve and 6933start_date6933 and/or 6933end_date6933 and common dateformat could not be retrieved as runtime, replacement resulted in a empty string, causing the intended from/to information to be lost

This commit is contained in:
Klaus Leithoff 2012-12-17 08:45:08 +00:00
parent 590df29839
commit 14f97b2b4a

View File

@ -404,9 +404,11 @@ class emailadmin_script {
$message = $vacation['text'];
if ($vacation['start_date'] || $vacation['end_date'])
{
$format_date = 'd M Y'; // see to it, that there is always a format, because if it is missing - no date will be output
if (!empty($GLOBALS['egw_info']['user']['preferences']['common']['dateformat'])) $format_date = $GLOBALS['egw_info']['user']['preferences']['common']['dateformat'];
$message = str_replace(array('$$start$$','$$end$$'),array(
date($GLOBALS['egw_info']['user']['preferences']['common']['dateformat'],$vacation['start_date']),
date($GLOBALS['egw_info']['user']['preferences']['common']['dateformat'],$vacation['end_date']),
date($format_date,$vacation['start_date']),
date($format_date,$vacation['end_date']),
),$message);
}
$newscriptbody .= "] text:\n" . $message . "\n.\n;\n\n";