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:
skodak 2009-07-10 08:03:06 +00:00
parent 728f96c756
commit 80b3328712

View File

@ -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/");
}