From 0c30cf5659c59a2d98aeed42931cdca44ff3bb3d Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Thu, 28 Apr 2011 13:04:09 +0000 Subject: [PATCH] Fixed issue #5130: {EXPIRY} tag not using the language-related date format git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev@10026 b72ed6b6-b9f8-46b5-92b4-906544132732 --- common_functions.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common_functions.php b/common_functions.php index 1df1669ebf3..864c037fad7 100644 --- a/common_functions.php +++ b/common_functions.php @@ -2992,7 +2992,13 @@ function templatereplace($line, $replacements=array()) if (strpos($line, "{SID}") !== false) $line=str_replace("{SID}", $surveyid, $line); - if (strpos($line, "{EXPIRY}") !== false) $line=str_replace("{EXPIRY}", $thissurvey['expiry'], $line); + if (strpos($line, "{EXPIRY}") !== false) + { + $dateformatdetails=getDateFormatData($thissurvey['surveyls_dateformat']); + $datetimeobj = new Date_Time_Converter($thissurvey['expiry'] , "Y-m-d"); + $dateoutput=$datetimeobj->convert($dateformatdetails['phpdate']); + $line=str_replace("{EXPIRY}", $dateoutput, $line); + } if (strpos($line, "{NAVIGATOR}") !== false) $line=str_replace("{NAVIGATOR}", $navigator, $line); if (strpos($line, "{SUBMITBUTTON}") !== false) { $submitbutton="";