Skip to content

Commit

Permalink
Merge branch 'w49_MDL-37060_m24_sessinit' of git://github.com/skodak/…
Browse files Browse the repository at this point in the history
…moodle into MOODLE_24_STABLE
  • Loading branch information
Sam Hemelryk committed Dec 11, 2012
2 parents 35cb0e4 + 8c35475 commit 1c90b99
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/sessionlib.php
Expand Up @@ -41,13 +41,13 @@ function session_get_instance() {

static $session = null;

if (!defined('NO_MOODLE_COOKIES')) {
// Moodle session was not initialised yet in lib/setup.php.
$session = new emergency_session();
return $session;
}

if (is_null($session)) {
if (!defined('NO_MOODLE_COOKIES') or empty($DB)) {
// Moodle was not initialised properly in lib/setup.php.
$session = new emergency_session();
return $session;
}

if (empty($CFG->sessiontimeout)) {
$CFG->sessiontimeout = 7200;
}
Expand Down

0 comments on commit 1c90b99

Please sign in to comment.