2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Remove session expired message from Limesurvey

Make sure to destroy session so as to allow respondent selection module to operator correctly
This commit is contained in:
Adam Zammit
2014-04-01 12:42:20 +11:00
parent 83942ac2a1
commit 6602dbf33c

View File

@@ -57,6 +57,7 @@ if (isset($_GET['loadall']) && $_GET['loadall'] == "reload" && isset($_GET['toke
//Must destroy the session
session_unset();
@session_destroy();
}
//end queXS Addition
@@ -427,35 +428,6 @@ if (isset($_SESSION['srid']))
$saved_id = $_SESSION['srid'];
}
if (!isset($_SESSION['s_lang']) && (isset($move)) )
// geez ... a session time out! RUN!
{
if (isset($_REQUEST['rootdir']))
{
safe_die('You cannot start this script directly');
}
require_once(dirname(__FILE__).'/classes/core/language.php');
$baselang = GetBaseLanguageFromSurveyID($surveyid);
$clang = new limesurvey_lang($baselang);
//A nice exit
sendcacheheaders();
doHeader();
echo templatereplace(file_get_contents(sGetTemplatePath($defaulttemplate)."/startpage.pstpl"));
echo "\t<div id='wrapper'>\n"
."\t<p id='tokenmessage'>\n"
."\t<span class='error'>".$clang->gT("ERROR")."</span><br /><br />\n"
."\t".$clang->gT("We are sorry but your session has expired.")."<br /><br />\n"
."\t".$clang->gT("Either you have been inactive for too long, you have cookies disabled for your browser, or there were problems with your connection.")."<br /><br />\n"
."\t".sprintf($clang->gT("Please contact %s ( %s ) for further assistance."),$siteadminname,$siteadminemail)."<br /><br />\n"
."\t</p>\n"
."\t</div>\n";
echo templatereplace(file_get_contents(sGetTemplatePath($defaulttemplate)."/endpage.pstpl"));
doFooter();
exit;
};
if (isset($move) && (preg_match('/^changelang_/',$move)))
{
// Then changing language from the language changer