accesslib 1.9 upgrade: homepage check to see if we need to upgrade
This check adds a DB query _only when the upgrade is pending_. So for a few minutes at the most.
This commit is contained in:
@@ -59,6 +59,12 @@
|
||||
@require_logout();
|
||||
redirect("$CFG->wwwroot/$CFG->admin/");
|
||||
}
|
||||
// Trigger 1.9 accesslib upgrade?
|
||||
if ((int)$CFG->version < 2007090700
|
||||
&& isset($USER->id)
|
||||
&& is_siteadmin($USER->id)) { // this test is expensive, but is only triggered during the upgrade
|
||||
redirect("$CFG->wwwroot/$CFG->admin/");
|
||||
}
|
||||
|
||||
if ($CFG->forcelogin) {
|
||||
require_login();
|
||||
|
||||
Reference in New Issue
Block a user