Skip to content

Commit

Permalink
Fixed issue #06007: Token variables resolving as 'undefined variable'…
Browse files Browse the repository at this point in the history
… after Version 1.91+ Build 11026

Dev This is actually a bug on the conditions editor - it should generate {TOKEN}, not {TOKEN:TOKEN}.  But to support backwards compatability,EM is letting TOKEN:TOKEN be an alias for TOKEN
  • Loading branch information
TMSWhite committed Apr 12, 2012
1 parent 8c90b65 commit 234b9aa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions classes/expressions/LimeExpressionManager.php
Expand Up @@ -2343,6 +2343,12 @@ private function setVariableAndTokenMappingsForExpressionManager($surveyid,$forc
{
//Gather survey data for tokenised surveys, for use in presenting questions
$_SESSION['thistoken']=getTokenData($surveyid, $_SESSION['token']);
$this->knownVars['TOKEN:TOKEN'] = array(
'code'=>$_SESSION['token'],
'jsName_on'=>'',
'jsName'=>'',
'readWrite'=>'N',
);
}
if (isset($_SESSION['thistoken']))
{
Expand Down Expand Up @@ -2380,6 +2386,7 @@ private function setVariableAndTokenMappingsForExpressionManager($surveyid,$forc
$this->knownVars['TOKEN:LASTNAME'] = $blankVal;
$this->knownVars['TOKEN:EMAIL'] = $blankVal;
$this->knownVars['TOKEN:USESLEFT'] = $blankVal;
$this->knownVars['TOKEN:TOKEN'] = $blankVal;
for ($i=1;$i<=100;++$i) // TODO - is there a way to know how many attributes are set? Looks like max is 100
{
$this->knownVars['TOKEN:ATTRIBUTE_' . $i] = $blankVal;
Expand Down

1 comment on commit 234b9aa

@TMSWhite
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ported to Yii

Please sign in to comment.