From 459821d74e74e307c732181687c17c95d32dc903 Mon Sep 17 00:00:00 2001 From: Olle Haerstedt Date: Fri, 20 Jan 2017 10:37:58 +0100 Subject: [PATCH] Dev: Remove unused variables in _niceExit() and fix surveyid to doFooter() --- application/controllers/survey/index.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/application/controllers/survey/index.php b/application/controllers/survey/index.php index c49980b0bdd..9acfede6f96 100644 --- a/application/controllers/survey/index.php +++ b/application/controllers/survey/index.php @@ -701,12 +701,11 @@ function _niceExit(&$redata, $iDebugLine, $sTemplateDir = null, $asMessage = arr if(isset($redata['surveyid']) && $redata['surveyid'] && !isset($thisurvey)) { - $thissurvey=getSurveyInfo($redata['surveyid']); - $sTemplateDir= $oTemplate->viewPath; + $surveyId = $redata['surveyid']; } else { - $sTemplateDir= $oTemplate->viewPath; + $surveyId = null; } sendCacheHeaders(); @@ -719,7 +718,7 @@ function _niceExit(&$redata, $iDebugLine, $sTemplateDir = null, $asMessage = arr $this->_printMessage($asMessage); $this->_printTemplateContent($oTemplate->viewPath.'/endpage.pstpl', $redata, $iDebugLine); - doFooter($thissurvey['sid']); + doFooter($surveyId); // It's OK for surveyId to be null here exit; }