Skip to content

Commit

Permalink
Fixed issue #05566: Survey and e-mails use different methods to inclu…
Browse files Browse the repository at this point in the history
…de token data

Dev retained ability to use {ATTRIBUTE_X} in emails for backwards compatibility

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev@12399 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
tmswhite committed Feb 7, 2012
1 parent 9c883c6 commit 0b5692e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions admin/remotecontrol/lsrc.helper.php
Expand Up @@ -240,6 +240,7 @@ function emailSender($surveyid, $type, $maxLsrcEmails='') //XXX
while(isset($emrow["attribute_$c"]))
{
$fieldsarray["{ATTRIBUTE_$c}"]=$emrow["attribute_$c"];
$fieldsarray["{TOKEN:ATTRIBUTE_$c}"]=$emrow["attribute_$c"];
++$c;
}
$fieldsarray["{ADMINNAME}"]= $thissurvey['adminname'];
Expand Down Expand Up @@ -496,6 +497,7 @@ function emailSender($surveyid, $type, $maxLsrcEmails='') //XXX
while(isset($emrow["attribute_$c"]))
{
$fieldsarray["{ATTRIBUTE_$c}"]=$emrow["attribute_$c"];
$fieldsarray["{TOKEN:ATTRIBUTE_$c}"]=$emrow["attribute_$c"];
++$c;
}

Expand Down
2 changes: 2 additions & 0 deletions admin/tokens.php
Expand Up @@ -1585,6 +1585,7 @@
foreach ($attributes as $attributefield=>$attributedescription)
{
$fieldsarray['{'.strtoupper($attributefield).'}']=$emrow[$attributefield];
$fieldsarray['{TOKEN:'.strtoupper($attributefield).'}']=$emrow[$attributefield];
}

$emrow['language']=trim($emrow['language']);
Expand Down Expand Up @@ -1919,6 +1920,7 @@
foreach ($attributes as $attributefield=>$attributedescription)
{
$fieldsarray['{'.strtoupper($attributefield).'}']=$emrow[$attributefield];
$fieldsarray['{TOKEN:'.strtoupper($attributefield).'}']=$emrow[$attributefield];
}

$emrow['language']=trim($emrow['language']);
Expand Down

0 comments on commit 0b5692e

Please sign in to comment.