Skip to content

Commit

Permalink
Fixed issue #9566: Survey language is mistakenly used for admin inter…
Browse files Browse the repository at this point in the history
…face
  • Loading branch information
c-schmitz committed Apr 29, 2015
1 parent ce6a8ee commit 9b40233
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion application/helpers/common_helper.php
Expand Up @@ -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")
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 9b40233

Please sign in to comment.