Skip to content

Commit

Permalink
Fixed issue #8295: Data for additional token attributes is not saved
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Oct 21, 2013
1 parent 33e8418 commit a9de650
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 6 additions & 1 deletion application/controllers/admin/tokens.php
Expand Up @@ -522,7 +522,12 @@ function getSearch_json($iSurveyId)
return $this->getTokens_json($iSurveyId, $condition);
}

function editToken($iSurveyId) // Used ? 2013-01-29
/**
* Called by jqGrid if a token is saved after editing
*
* @param mixed $iSurveyId The Survey ID
*/
function editToken($iSurveyId)

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Oct 22, 2013

Collaborator

Thanks to find it.

This comment has been minimized.

Copy link
@c-schmitz

c-schmitz Oct 22, 2013

Author Contributor

NP ;)

{
$clang = $this->getController()->lang;
if (!hasSurveyPermission($iSurveyId, 'tokens', 'update') && !hasSurveyPermission($iSurveyId, 'tokens', 'create'))
Expand Down
5 changes: 1 addition & 4 deletions application/helpers/common_helper.php
Expand Up @@ -5416,10 +5416,7 @@ function GetParticipantAttributes($iSurveyID)
{
if (!tableExists("{{tokens_{$iSurveyID}}}") || !$table = Yii::app()->db->schema->getTable('{{tokens_'.$iSurveyID.'}}'))
return Array();
$aFields= array_filter(array_keys($table->columns), 'filterForAttributes');
$aTokenAttributes=Survey::model()->findByPk($iSurveyID)->tokenAttributes;
if (count($aFields)==0) return array();
return array_intersect_key($aTokenAttributes,array_flip($aFields));
return getTokenFieldsAndNames($iSurveyID,true);
}


Expand Down

0 comments on commit a9de650

Please sign in to comment.