mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-19010 fixed redirect at main page if upgrade required, otherwise it would end with exception due to DB structure changes
This commit is contained in:
parent
728f96c756
commit
80b3328712
@ -35,8 +35,11 @@
|
||||
require_once($CFG->libdir .'/filelib.php');
|
||||
|
||||
// check if major upgrade needed - also present in login/index.php
|
||||
if (empty($CFG->version) or (int)$CFG->version < 2009011900 or !empty($CFG->adminsetuppending)) { //1.9 or older
|
||||
@require_logout();
|
||||
if (empty($CFG->version) or (int)$CFG->version < 2009071000 or !empty($CFG->adminsetuppending)) { //1.9 or older
|
||||
try {
|
||||
@require_logout();
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
redirect("$CFG->wwwroot/$CFG->admin/");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user