Skip to content

Commit

Permalink
Dev: quick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac authored and TonisOrmisson committed Jul 14, 2017
1 parent 968700c commit 84962ac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion application/controllers/survey/index.php
Expand Up @@ -61,6 +61,10 @@ function action()
$surveyExists = ($surveyid && Survey::model()->findByPk($surveyid));
$isSurveyActive = ($surveyExists && Survey::model()->findByPk($surveyid)->active=="Y");

if($surveyExists){
$oSurvey = Survey::model()->findByPk($surveyid);
}

// collect all data in this method to pass on later
$redata = compact(array_keys(get_defined_vars()));

Expand Down Expand Up @@ -262,7 +266,7 @@ function action()
}

//SEE IF SURVEY USES TOKENS
if ($surveyExists == 1 && $survey->hasTokensTable){
if ($surveyExists == 1 && $oSurvey->hasTokensTable){
$tokensexist = 1;
}else{
$tokensexist = 0;
Expand Down

0 comments on commit 84962ac

Please sign in to comment.