Skip to content

Commit

Permalink
Fixed issue #17732: Direct access to response browsing break (#2167)
Browse files Browse the repository at this point in the history
Co-authored-by: encuestabizdevgit <devgit@encuesta.biz>
  • Loading branch information
gabrieljenik and encuestabizdevgit committed Dec 14, 2021
1 parent bde4401 commit 8ab86bc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions application/controllers/ResponsesController.php
Expand Up @@ -957,6 +957,12 @@ private function getData(int $surveyId = null, int $responseId = null, string $l

$thissurvey = getSurveyInfo($surveyId);

// 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($thissurvey['oSurvey']->language);
LimeExpressionManager::SetSurveyId($surveyId);
LimeExpressionManager::StartProcessingPage(false, true);

if (!$thissurvey) {
App()->session['flashmessage'] = gT("Invalid survey ID");
$this->redirect(["admin/index"]);
Expand Down

0 comments on commit 8ab86bc

Please sign in to comment.