Skip to content

Commit

Permalink
Fixed issue #06002: @@SURVEYURL@@ placeholder fails to translate
Browse files Browse the repository at this point in the history
  • Loading branch information
TMSWhite committed Apr 16, 2012
1 parent 8755a06 commit ceb6810
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion application/controllers/admin/tokens.php
Expand Up @@ -1151,7 +1151,7 @@ function email($iSurveyId, $aTokenIds = null)
$fieldsarray["{{$key}URL}"] = "<a href='{$url}'>" . htmlspecialchars($url) . '</a>';
if ($key == 'SURVEY')
{
$fieldsarray["@@SURVEYURL@@"] = $url;
$barebone_link = $url;
}
}

Expand All @@ -1162,6 +1162,12 @@ function email($iSurveyId, $aTokenIds = null)
$modsubject = Replacefields(Yii::app()->request->getPost('subject_' . $emrow['language']), $fieldsarray);
$modmessage = Replacefields(Yii::app()->request->getPost('message_' . $emrow['language']), $fieldsarray);

if (isset($barebone_link))
{
$modsubject = str_replace("@@SURVEYURL@@", $barebone_link, $modsubject);
$modmessage = str_replace("@@SURVEYURL@@", $barebone_link, $modmessage);
}

if (trim($emrow['validfrom']) != '' && convertDateTimeFormat($emrow['validfrom'], 'Y-m-d H:i:s', 'U') * 1 > date('U') * 1)
{
$tokenoutput .= $emrow['tid'] . " " . ReplaceFields($clang->gT("Email to {FIRSTNAME} {LASTNAME} ({EMAIL}) delayed: Token is not yet valid.") . "<br />", $fieldsarray);
Expand Down

0 comments on commit ceb6810

Please sign in to comment.