From adbd2f52cc8d4a46aebc960f5df7fa3fc41d43c3 Mon Sep 17 00:00:00 2001 From: azammitdcarf Date: Thu, 12 Feb 2009 04:22:31 +0000 Subject: [PATCH] Check for server side authentication Make sure questionnaire is displayed Q by Q --- functions/functions.limesurvey.php | 2 +- functions/functions.operator.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/functions/functions.limesurvey.php b/functions/functions.limesurvey.php index 5eeda045..26d72432 100644 --- a/functions/functions.limesurvey.php +++ b/functions/functions.limesurvey.php @@ -105,7 +105,7 @@ function create_limesurvey_questionnaire($title) . "VALUES ($surveyid, 1,\n" . "'', 'N', \n" . "'N','1980-01-01', '', 'N',\n" - . "'', 'G', 'quexs', '" . QUEXS_URL . "rs_project_end.php',\n" + . "'', 'S', 'quexs', '" . QUEXS_URL . "rs_project_end.php',\n" . "'en', 'Y', 'N', 'N',\n" . "'N', '0', 'Y',\n" . "'att1', 'att2', \n" diff --git a/functions/functions.operator.php b/functions/functions.operator.php index d53a696e..dede0f56 100644 --- a/functions/functions.operator.php +++ b/functions/functions.operator.php @@ -520,6 +520,12 @@ function get_extension($operator_id) */ function get_operator_id() { + if (!isset($_SERVER['PHP_AUTH_USER'])) + { + print "

" . T_("ERROR: You do not have server side authentication enabled therefore queXS cannot determine which user is accessing the system.") . "

"; + return false; + } + global $db; $sql = "SELECT operator_id