Commit f667ecfe authored by martinlanghoff's avatar martinlanghoff
Browse files

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.
parent c24f4599
......@@ -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();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment