Skip to content

Commit

Permalink
Fixed issue #8833: RemoteControl activate_tokens throws error but act…
Browse files Browse the repository at this point in the history
…ion is done using imported survey
  • Loading branch information
c-schmitz committed Mar 19, 2014
1 parent ea56cd6 commit 29ac2a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions application/helpers/admin/token_helper.php
Expand Up @@ -56,6 +56,7 @@ function createTokenTable($iSurveyID, $aAttributeFields=array())
$tokenattributefieldnames = Survey::model()->findByPk($iSurveyID)->tokenAttributes;
foreach($tokenattributefieldnames as $attrname=>$attrdetails)
{
if (isset($fields[$attrname])) continue; // Field was already created
Yii::app()->db->createCommand(Yii::app()->db->getSchema()->addColumn("{{tokens_".intval($iSurveyID)."}}", $attrname, 'VARCHAR(255)'))->execute();
}
Yii::app()->db->schema->getTable($sTableName, true); // Refresh schema cache just in case the table existed in the past
Expand Down

0 comments on commit 29ac2a1

Please sign in to comment.