MDL-49329 admin: Do not force admin to reconfirm the core upgrade
This commit is contained in:
+10
-1
@@ -2401,8 +2401,17 @@ function upgrade_install_plugins(array $installable, $confirmed, $heading='', $c
|
||||
if (!$pluginman->install_plugins($installable, true, true)) {
|
||||
throw new moodle_exception('install_plugins_failed', 'core_plugin', $return);
|
||||
}
|
||||
|
||||
// Always redirect to admin/index.php to perform the database upgrade.
|
||||
redirect(new moodle_url('/admin/index.php?cache=0'));
|
||||
// Do not throw away the existing $PAGE->url parameters such as
|
||||
// confirmupgrade or confirmrelease if $PAGE->url is a superset of the
|
||||
// URL we must go to.
|
||||
$mustgoto = new moodle_url('/admin/index.php', array('cache' => 0, 'confirmplugincheck' => 0));
|
||||
if ($mustgoto->compare($PAGE->url, URL_MATCH_PARAMS)) {
|
||||
redirect($PAGE->url);
|
||||
} else {
|
||||
redirect($mustgoto);
|
||||
}
|
||||
|
||||
} else {
|
||||
$output = $PAGE->get_renderer('core', 'admin');
|
||||
|
||||
Reference in New Issue
Block a user