Skip to content

Commit

Permalink
Fixed issue #09463: E-mail subject for confirmation and admin notific…
Browse files Browse the repository at this point in the history
…ation use non static replacement
  • Loading branch information
Shnoulle committed Jan 26, 2015
1 parent f436f42 commit 56ad485
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions application/helpers/frontend_helper.php
Expand Up @@ -532,7 +532,7 @@ function submittokens($quotaexit=false)
$dateformatdatat=getDateFormatData($thissurvey['surveyls_dateformat']);
$numberformatdatat = getRadixPointData($thissurvey['surveyls_numberformat']);
$redata=array('thissurvey'=>$thissurvey);
$subject=templatereplace($subject,$aReplacementVars,$redata);
$subject=templatereplace($subject,$aReplacementVars,$redata,'email_confirm_subj', false, NULL, array(), true );

$subject=html_entity_decode($subject,ENT_QUOTES,$emailcharset);

Expand All @@ -547,7 +547,7 @@ function submittokens($quotaexit=false)

$message=$thissurvey['email_confirm'];
//$message=ReplaceFields($message, $fieldsarray, true);
$message=templatereplace($message,$aReplacementVars,$redata);
$message=templatereplace($message,$aReplacementVars,$redata,'email_confirm', false, NULL, array(), true );
if (!$ishtml)
{
$message=strip_tags(breakToNewline(html_entity_decode($message,ENT_QUOTES,$emailcharset)));
Expand Down Expand Up @@ -734,8 +734,8 @@ function sendSubmitNotifications($surveyid)
$redata=compact(array_keys(get_defined_vars()));
if (count($aEmailNotificationTo)>0)
{
$sMessage=templatereplace($thissurvey['email_admin_notification'],$aReplacementVars,$redata,'frontend_helper[1398]',($thissurvey['anonymized'] == "Y"),NULL, array(), true);
$sSubject=templatereplace($thissurvey['email_admin_notification_subj'],$aReplacementVars,$redata,'frontend_helper[1399]',($thissurvey['anonymized'] == "Y"),NULL, array(), true);
$sMessage=templatereplace($thissurvey['email_admin_notification'],$aReplacementVars,$redata,'admin_notification',$thissurvey['anonymized'] == "Y",NULL, array(), true);
$sSubject=templatereplace($thissurvey['email_admin_notification_subj'],$aReplacementVars,$redata,'admin_notification_subj',($thissurvey['anonymized'] == "Y"),NULL, array(), true);
foreach ($aEmailNotificationTo as $sRecipient)
{
if (!SendEmailMessage($sMessage, $sSubject, $sRecipient, $sFrom, $sitename, true, getBounceEmail($surveyid), $aRelevantAttachments))
Expand Down Expand Up @@ -766,8 +766,8 @@ function sendSubmitNotifications($surveyid)
}
if (count($aEmailResponseTo)>0)
{
$sMessage=templatereplace($thissurvey['email_admin_responses'],$aReplacementVars,$redata,'frontend_helper[1414]',($thissurvey['anonymized'] == "Y"));
$sSubject=templatereplace($thissurvey['email_admin_responses_subj'],$aReplacementVars,$redata,'frontend_helper[1415]',($thissurvey['anonymized'] == "Y"));
$sMessage=templatereplace($thissurvey['email_admin_responses'],$aReplacementVars,$redata,'detailed_admin_notification',$thissurvey['anonymized'] == "Y",NULL, array(), true);
$sSubject=templatereplace($thissurvey['email_admin_responses_subj'],$aReplacementVars,$redata,'detailed_admin_notification_subj',$thissurvey['anonymized'] == "Y",NULL, array(), true);
foreach ($aEmailResponseTo as $sRecipient)
{
if (!SendEmailMessage($sMessage, $sSubject, $sRecipient, $sFrom, $sitename, true, getBounceEmail($surveyid), $aRelevantAttachments))
Expand Down

0 comments on commit 56ad485

Please sign in to comment.