Skip to content

Commit

Permalink
Fixed issue #09769: Preview url can breaks logic on questions
Browse files Browse the repository at this point in the history
Dev: EM is set to global default language
Dev: buildsurveysession update language but don't set EM partially to this language
Dev: Equation are not set for new language
  • Loading branch information
Shnoulle committed Jul 20, 2015
1 parent 1a3cc53 commit ea7bf96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 4 additions & 1 deletion application/controllers/survey/index.php
Expand Up @@ -182,11 +182,14 @@ function action()
{
$sDisplayLanguage = $_SESSION['survey_'.$surveyid]['s_lang'];
}
elseif($surveyExist)//Survey::model()->findByPk($surveyid)
{
$sDisplayLanguage=Survey::model()->findByPk($surveyid)->language;
}
else
{
$sDisplayLanguage=Yii::app()->getConfig('defaultlang');
}

//CHECK FOR REQUIRED INFORMATION (sid)
if ($surveyid && $surveyExists)
{
Expand Down
7 changes: 2 additions & 5 deletions application/helpers/frontend_helper.php
Expand Up @@ -1185,11 +1185,8 @@ function buildsurveysession($surveyid,$preview=false)
{
$language_to_set = $thissurvey['language'];
}

if (!isset($_SESSION['survey_'.$surveyid]['s_lang']))
{
SetSurveyLanguage($surveyid, $language_to_set);
}
// Always SetSurveyLanguage : surveys controller SetSurveyLanguage too, if different : broke survey (#09769)
SetSurveyLanguage($surveyid, $language_to_set);


UpdateGroupList($surveyid, $_SESSION['survey_'.$surveyid]['s_lang']);
Expand Down

0 comments on commit ea7bf96

Please sign in to comment.