Skip to content

Commit

Permalink
Dev: Ugly hack when sid is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Nov 20, 2017
1 parent 685eb3b commit 25f7afb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions application/core/LSETwigViewRenderer.php
Expand Up @@ -258,9 +258,12 @@ public function renderTemplateFromString( $line, $aDatas, $oTemplate, $bReturn=f
$aDatas["aSurveyInfo"]['bShowxquestions'] = ( $showxquestions == 'show' || ($showxquestions == 'choose' && !isset($aDatas['aSurveyInfo']['showxquestions'])) || ($showxquestions == 'choose' && $aDatas['aSurveyInfo']['showxquestions'] == 'Y'));
$aDatas["aSurveyInfo"]['languagecode'] = $languagecode;
$aDatas["aSurveyInfo"]['dir'] = (getLanguageRTL($languagecode))?"rtl":"ltr";
$aDatas["aSurveyInfo"]['iTotalquestions'] = $_SESSION['survey_'.$aDatas['aSurveyInfo']['sid']]['totalquestions'];
}

// NB: Session is flushed at submit, so sid is not defined here.
if (isset($_SESSION['survey_' . $aDatas['aSurveyInfo']['sid']])) {
$aDatas["aSurveyInfo"]['iTotalquestions'] = $_SESSION['survey_'.$aDatas['aSurveyInfo']['sid']]['totalquestions'];
}
}

// Add all mother templates path
while($oRTemplate->oMotherTemplate instanceof TemplateConfiguration){
Expand Down

0 comments on commit 25f7afb

Please sign in to comment.