From 5333e1ad313b810055da73e9cd2fdee45ed7eb35 Mon Sep 17 00:00:00 2001 From: Denis Chenu Date: Tue, 30 Oct 2012 11:21:43 +0100 Subject: [PATCH] Fixed issue #06744: Expressionmanager show false error if admin lang are not in default survey lang Dev : in view, all survey are to be set in default lang, because survey is shown in default lang Dev : GetLastPrettyPrintExpression seems to be updated without StartProcessingPage --- application/controllers/admin/surveyadmin.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/controllers/admin/surveyadmin.php b/application/controllers/admin/surveyadmin.php index f26fb4d87ea..40b0e0ae527 100644 --- a/application/controllers/admin/surveyadmin.php +++ b/application/controllers/admin/surveyadmin.php @@ -286,6 +286,12 @@ public function view($iSurveyID, $gid = null, $qid = null) if (isset($qid)) $qid = sanitize_int($qid); + // Reinit LEMlang and LEMsid: ensure LEMlang are set to default lang, surveyid are set to this survey id + // Ensure Last GetLastPrettyPrintExpression get info from this sid and default lang + LimeExpressionManager::SetEMLanguage(Survey::model()->findByPk($iSurveyID)->language); + LimeExpressionManager::SetSurveyId($iSurveyID); + LimeExpressionManager::StartProcessingPage(false,true); + $aData['surveyid'] = $iSurveyID; $aData['gid'] = $gid; $aData['qid'] = $qid;