From 9b40233dec41b96aa07e58e89f97bbe1b8b29ac4 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Wed, 29 Apr 2015 16:47:55 +0200 Subject: [PATCH] Fixed issue #9566: Survey language is mistakenly used for admin interface --- application/helpers/common_helper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/helpers/common_helper.php b/application/helpers/common_helper.php index 6ee247c3e12..46032c36429 100644 --- a/application/helpers/common_helper.php +++ b/application/helpers/common_helper.php @@ -1762,7 +1762,7 @@ function createFieldMap($surveyid, $style='short', $force_refresh=false, $questi if (isset(Yii::app()->session['fieldmap-' . $surveyid . $sLanguage]) && !$force_refresh && $questionid == false) { return Yii::app()->session['fieldmap-' . $surveyid . $sLanguage]; } - + $sOldLanguage=App()->language; App()->setLanguage($sLanguage); $fieldmap["id"]=array("fieldname"=>"id", 'sid'=>$surveyid, 'type'=>"id", "gid"=>"", "qid"=>"", "aid"=>""); if ($style == "full") @@ -2299,6 +2299,7 @@ function createFieldMap($surveyid, $style='short', $force_refresh=false, $questi --$questionSeq; // didn't generate a valid $fieldmap entry, so decrement the question counter to ensure they are sequential } } + App()->setLanguage($sOldLanguage); if (isset($fieldmap)) { if ($questionid == false)