Skip to content

Commit

Permalink
Dev: move beforeSurveyPage just before renderExistMessage part
Browse files Browse the repository at this point in the history
Dev: but after newtest=Y action
  • Loading branch information
Shnoulle committed Jun 18, 2018
1 parent 1fcf633 commit b3f2b7d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions application/controllers/survey/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ public function action()
$loadpass = $param['loadpass'];
$sitename = Yii::app()->getConfig('sitename');

/* Launch beforeSurveyPage before all public action done */
$beforeSurveyPageEvent = new PluginEvent('beforeSurveyPage');
$beforeSurveyPageEvent->set('surveyId', $surveyid);
App()->getPluginManager()->dispatchEvent($beforeSurveyPageEvent);

if (isset($param['newtest']) && $param['newtest'] == "Y") {
killSurveySession($surveyid);
}
Expand Down Expand Up @@ -95,6 +90,11 @@ public function action()
SetSurveyLanguage($surveyid, $sDisplayLanguage);
}

/* Launch beforeSurveyPage before all renderExitMessage */
$beforeSurveyPageEvent = new PluginEvent('beforeSurveyPage');
$beforeSurveyPageEvent->set('surveyId', $surveyid);
App()->getPluginManager()->dispatchEvent($beforeSurveyPageEvent);

if ($this->_isClientTokenDifferentFromSessionToken($clienttoken, $surveyid)) {
$sReloadUrl = $this->getController()->createUrl("/survey/index/sid/{$surveyid}", array('token'=>$clienttoken, 'lang'=>App()->language, 'newtest'=>'Y'));
$aErrors = array(gT('Token mismatch'));
Expand Down

0 comments on commit b3f2b7d

Please sign in to comment.