From 17dcb4928b287e12ce6a2430292781827db4fac2 Mon Sep 17 00:00:00 2001 From: Adam Zammit Date: Fri, 8 Mar 2013 15:29:13 +1100 Subject: [PATCH] Don't refer to files outside the tree if not used by an interviewer --- include/limesurvey/common_functions.php | 26 +++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/include/limesurvey/common_functions.php b/include/limesurvey/common_functions.php index 2bf25636..ac99a223 100644 --- a/include/limesurvey/common_functions.php +++ b/include/limesurvey/common_functions.php @@ -4227,13 +4227,27 @@ function getHeader($meta = false) $js_header_includes = array_unique($js_header_includes); $css_header_includes = array_unique($css_header_includes); - $js_header_includes[] = '/../../js/popup.js'; //queXS Addition - include_once("quexs.php"); - if (AUTO_LOGOUT_MINUTES !== false) - { - $js_header_includes[] = $rooturl . "/../../js/childnap.js"; //queXS Addition - } + $interviewer=returnglobal('interviewer'); + if (!empty($interviewer) || (isset($_SESSION['interviewer']) && $_SESSION['interviewer'] == true)) + { + $interviewer = true; + $_SESSION['interviewer'] = true; + } + else + { + $interviewer = false; + } + if ($interviewer) + { + $js_header_includes[] = '/../../js/popup.js'; //queXS Addition + include_once("quexs.php"); + if (AUTO_LOGOUT_MINUTES !== false) + { + $js_header_includes[] = $rooturl . "/../../js/childnap.js"; //queXS Addition + } + } + if (isset($_SESSION['s_lang']) && $_SESSION['s_lang']) { $surveylanguage= $_SESSION['s_lang'];