Skip to content

Commit

Permalink
Fixed issue #5130: {EXPIRY} tag not using the language-related date f…
Browse files Browse the repository at this point in the history
…ormat

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev@10026 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Apr 28, 2011
1 parent 38179a3 commit 0c30cf5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion common_functions.php
Expand Up @@ -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="<input class='submit' type='submit' value=' ".$clang->gT("Submit")." ' name='move2' onclick=\"javascript:document.limesurvey.move.value = 'movesubmit';\" />";
Expand Down

0 comments on commit 0c30cf5

Please sign in to comment.