Skip to content
Snippets Groups Projects
Commit 5614af69 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

using session instead of phpsession to store cached data

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1228 44740490-163a-0410-bde0-09ae8108e29a
parent 3a669678
No related branches found
No related tags found
No related merge requests found
......@@ -61,14 +61,12 @@ function checkConfig($conf, $req) {
}
$results = NULL;
if (array_key_exists('reset', $_GET) && $_GET['reset'] === '1') {
$results = $session->getData('module:ldapstatus', 'results');
if (empty($results)) {
$results = array();
} elseif (array_key_exists('reset', $_GET) && $_GET['reset'] === '1') {
$results = array();
} else {
if (array_key_exists('_ldapstatus_results', $_SESSION)) {
$results = $_SESSION['_ldapstatus_results'];
} else {
$results = array();
}
}
#echo('<pre>'); print_r($results); exit;
......@@ -88,7 +86,7 @@ foreach ($orgs AS $orgkey => $orgconfig) {
SimpleSAML_Logger::debug('ldapstatus: Completing execution after maxtime [' .(microtime(TRUE) - $start) . ' of maxtime ' . $maxtime . ']');
break;
}
if (array_key_exists($orgkey, $_SESSION['_ldapstatus_results'])) {
if (array_key_exists($orgkey, $results)) {
SimpleSAML_Logger::debug('ldapstatus: Skipping org already tested [' .$orgkey. ']');
continue;
} else {
......@@ -198,6 +196,8 @@ foreach ($orgs AS $orgkey => $orgconfig) {
$_SESSION['_ldapstatus_results'] = $results;
$session->setData('module:ldapstatus', 'results', $results);
#echo '<pre>'; print_r($results); exit;
$lightCounter = array(0,0,0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment