Commit 89948e45 authored by toyomoyo's avatar toyomoyo
Browse files

merged fix upgrading from 1.6 not redirecting problem

parent bb40325e
......@@ -48,8 +48,14 @@
require_login();
}
if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
if (moodle_needs_upgrading()) {
if ($CFG->rolesactive) { // if already using roles system
if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
if (moodle_needs_upgrading()) {
redirect($CFG->wwwroot .'/'. $CFG->admin .'/index.php');
}
}
} else { // if upgrading from 1.6 or below
if (isadmin() && moodle_needs_upgrading()) {
redirect($CFG->wwwroot .'/'. $CFG->admin .'/index.php');
}
}
......
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