mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
Merge branch 'w49_MDL-37060_m25_sessinit' of git://github.com/skodak/moodle
This commit is contained in:
commit
7a6ef4ee8f
@ -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.
|
||||
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 (is_null($session)) {
|
||||
if (empty($CFG->sessiontimeout)) {
|
||||
$CFG->sessiontimeout = 7200;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user