-
Notifications
You must be signed in to change notification settings - Fork 988
Commit
function Token::create($surveyId, $scenario) to enable code completion.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3460,8 +3460,7 @@ private function setVariableAndTokenMappingsForExpressionManager($surveyid,$forc | |
if (isset($_SESSION[$this->sessid]['token']) && $_SESSION[$this->sessid]['token'] != '') | ||
{ | ||
//Gather survey data for tokenised surveys, for use in presenting questions | ||
$tokenClass = "Token_$surveyid"; | ||
$_SESSION[$this->sessid]['thistoken'] = $tokenClass::model()->findByToken($_SESSION[$this->sessid]['token']); | ||
$_SESSION[$this->sessid]['thistoken'] = Token::model($surveyid)->findByToken($_SESSION[$this->sessid]['token']); | ||
$this->knownVars['TOKEN:TOKEN'] = array( | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Shnoulle
Collaborator
|
||
'code'=>$_SESSION[$this->sessid]['token'], | ||
'jsName_on'=>'', | ||
|
5 comments
on commit 0f17969
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure is linked, but now i have:
array_keys() expects parameter 1 to be array, object given
/application/helpers/expressions/em_manager_helper.php(3473)
foreach (array_keys($_SESSION[$this->sessid]['thistoken']) as $tokenkey)
Myabe we have to allways have:
$_SESSION['survey_'.$surveyid]['thistoken'] = Token::model($surveyid)->findByToken($_SESSION['survey_'.$surveyid]['token'])->attributes;
I do soome test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shnoulle that is definitely better; its just one query and the session is a mess anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have some other bug with new token model .
Can not update token/remove token etc ...
Can you have a look ? Or did you need a bug report ;)
Here, i think EM use $_SESSION part for replacing only (EM core), then need a array for token in Session.
Update EM core can be done : but need more time than toda ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bug is a CSRF bug as far as I can tell, this was solved in most cases but not the jqGrid. Please make a bug report (and note that this is not related to the token model).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, have some other js issue in 'jqGrid' BUT /admin/tokens/sa/edit/surveyid/439566/tokenid/1 (accessible via browse response) have some 500 too. I lokk for js and maybe for CRSF
You're right for CRSF, sorry. I have a look
@c-schmitz Is it supposed to make the token available in anonymized surveys?
-- It seems to check that only for the other attributes..