mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Fixes by Alex (thank you)
Changed session backend to files to save some db processing
This commit is contained in:
@@ -81,6 +81,7 @@ else //SURVEY MATCHING $surveyid DOESN'T EXIST
|
||||
//OK. IF WE GOT THIS FAR, THEN THE SURVEY EXISTS AND IT IS ACTIVE, SO LETS GET TO WORK.
|
||||
|
||||
$surveyinfo=getSurveyInfo($surveyid);
|
||||
include_once("../quexs.php");
|
||||
require_once(dirname(__FILE__).'/sessioncontrol.php');
|
||||
|
||||
// Set language for questions and labels to base language of this survey
|
||||
@@ -787,7 +788,6 @@ elseif ($subaction == "all")
|
||||
$quexsfilterstate = questionnaireSampleFilterstate();
|
||||
|
||||
//queXS Addition
|
||||
include_once("../quexs.php");
|
||||
$browseoutput .= " ".T_("Questionnaire and Sample selection:")."<select id='quexsfilterinc' name='quexsfilterinc' onchange='javascript:document.getElementById(\"limit\").value=\"\";submit();'>\n"
|
||||
."\t<option value='all' >".T_("All queXS questionnaires and samples associated with this instrument")."</option>\n"
|
||||
. get_questionnaire_sample_list($surveyid,$quexsfilterstate)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
$LEMdebugLevel=0;
|
||||
|
||||
include_once("login_check.php");
|
||||
include_once("../quexs.php");
|
||||
require_once(dirname(__FILE__).'/sessioncontrol.php');
|
||||
|
||||
if (!isset($surveyid)) {$surveyid=returnglobal('sid');}
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
if (!isset($dbprefix) || isset($_REQUEST['dbprefix'])) {die("Cannot run this script directly");}
|
||||
|
||||
// Read the session name from the settings table
|
||||
$usresult = getGlobalSetting('SessionName');
|
||||
//$usresult = getGlobalSetting('SessionName');
|
||||
$usresult = LS_SESSION_NAME; //queXS Addition
|
||||
if ($usresult)
|
||||
{
|
||||
@session_name($usresult);
|
||||
|
||||
@@ -89,4 +89,3 @@ $siteadminemail = "quexs@acspri.org.au";
|
||||
// 'manage_label' => 1);
|
||||
//
|
||||
|
||||
$sessionhandler = 'db';
|
||||
|
||||
@@ -483,6 +483,7 @@ else
|
||||
}
|
||||
|
||||
|
||||
killSession();
|
||||
header("Location: {$url}");
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ if (isset($_GET['loadall']) && $_GET['loadall'] == "reload" && isset($_GET['toke
|
||||
|
||||
//end queXS Addition
|
||||
|
||||
|
||||
//LimeExpressionManager::SetSurveyId($surveyid); // must be called early - it clears internal cache if a new survey is being used
|
||||
|
||||
//DEFAULT SETTINGS FOR TEMPLATES
|
||||
@@ -96,12 +97,12 @@ if ($surveyid)
|
||||
// Session name is based:
|
||||
// * on this specific limesurvey installation (Value SessionName in DB)
|
||||
// * on the surveyid (from Get or Post param). If no surveyid is given we are on the public surveys portal
|
||||
$usquery = "SELECT stg_value FROM ".db_table_name("settings_global")." where stg_name='SessionName'";
|
||||
$usresult = db_execute_assoc($usquery,'',true); //Checked
|
||||
//$usquery = "SELECT stg_value FROM ".db_table_name("settings_global")." where stg_name='SessionName'";
|
||||
//$usresult = db_execute_assoc($usquery,'',true); //Checked
|
||||
$usresult = LS_SESSION_NAME; //queXS Addition
|
||||
if ($usresult)
|
||||
{
|
||||
$usrow = $usresult->FetchRow();
|
||||
$stg_SessionName=$usrow['stg_value'];
|
||||
$stg_SessionName=$usresult;
|
||||
if ($surveyid && $surveyexists)
|
||||
{
|
||||
@session_name($stg_SessionName.'-runtime-'.$surveyid);
|
||||
@@ -116,6 +117,9 @@ else
|
||||
session_name("LimeSurveyRuntime-$surveyid");
|
||||
}
|
||||
session_set_cookie_params(0,$relativeurl.'/');
|
||||
|
||||
|
||||
|
||||
if (!isset($_SESSION) || empty($_SESSION)) // the $_SESSION variable can be empty if register_globals is on
|
||||
@session_start();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user