Commit 5f0314ab authored by moodler's avatar moodler
Browse files

Make the accesslib upgrade trigger a redirect

parent 0b9dcf3d
......@@ -54,13 +54,13 @@
define('BLOCK_R_MIN_WIDTH', $rmin);
define('BLOCK_R_MAX_WIDTH', $rmax);
// check if major upgrade needed - also present in login/index.php
// check if major upgrade needed - also present in login/index.php
if ((int)$CFG->version < 2006101100) { //1.7 or older
@require_logout();
redirect("$CFG->wwwroot/$CFG->admin/");
}
// Trigger 1.9 accesslib upgrade?
if ((int)$CFG->version < 2007090700
if ((int)$CFG->version < 2007092000
&& isset($USER->id)
&& is_siteadmin($USER->id)) { // this test is expensive, but is only triggered during the upgrade
redirect("$CFG->wwwroot/$CFG->admin/");
......
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