MDL-41245 fix multiple install, upgrade and uninstallation issues

Includes rework of cache parameter detection on admin/index.php.

Another problem is that uninstall does not leave system in consistent state,
we need to force users to go through upgrade after any type of uninstall.

This fixes also add-on installation redirect and other issues.
This commit is contained in:
Petr Škoda
2013-08-24 16:08:11 +02:00
parent d2aa53be1b
commit 82b1cf00b0
4 changed files with 52 additions and 39 deletions
+3 -1
View File
@@ -48,6 +48,7 @@ $uninstall = optional_param('uninstall', '', PARAM_COMPONENT);
$delete = optional_param('delete', '', PARAM_COMPONENT);
$confirmed = optional_param('confirm', false, PARAM_BOOL);
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
$pluginman = plugin_manager::instance();
@@ -143,7 +144,8 @@ if ($delete and $confirmed) {
if (function_exists('opcache_reset')) {
opcache_reset();
}
redirect($PAGE->url);
// We need to execute upgrade to make sure everything including caches is up to date.
redirect(new moodle_url('/admin/index.php'));
}
$checker = available_update_checker::instance();