MDL-42078 multiple uninstall improvements and cleanup
Includes: * update checker refactored to \core\update\ namespace * plugininfo classes refactored to \core\plugininfo\ namespace * plugin_manager renamed to core_plugin_manager * redirect back to original page after plugin uninstall * fixed assign subplugin uninstall * move assign subplugins under the assignment in admin tree * fixed plugininfo for all question related plugin types * auth uninstall support * added missing block dependencies * added theme uninstall * subplugin types are following the plugin on plugin overview page * several performance improvements in plugin manager * new warnigns when plugininfo are outdated or missing * multiple fixes and other improvements
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
require_once(dirname(dirname(__FILE__)) . '/config.php');
|
||||
require_once($CFG->dirroot . '/repository/lib.php');
|
||||
require_once($CFG->libdir . '/adminlib.php');
|
||||
require_once($CFG->libdir . '/pluginlib.php');
|
||||
|
||||
require_sesskey();
|
||||
|
||||
@@ -103,7 +102,7 @@ if (!empty($edit) || !empty($new)) {
|
||||
$data = data_submitted();
|
||||
}
|
||||
if ($success) {
|
||||
plugin_manager::reset_caches();
|
||||
core_plugin_manager::reset_caches();
|
||||
redirect($parenturl);
|
||||
} else {
|
||||
print_error('instancenotsaved', 'repository', $parenturl);
|
||||
@@ -120,7 +119,7 @@ if (!empty($edit) || !empty($new)) {
|
||||
} else if (!empty($hide)) {
|
||||
$instance = repository::get_type_by_typename($hide);
|
||||
$instance->hide();
|
||||
plugin_manager::reset_caches();
|
||||
core_plugin_manager::reset_caches();
|
||||
$return = true;
|
||||
} else if (!empty($delete)) {
|
||||
$instance = repository::get_instance($delete);
|
||||
@@ -133,7 +132,7 @@ if (!empty($edit) || !empty($new)) {
|
||||
if ($sure) {
|
||||
if ($instance->delete($downloadcontents)) {
|
||||
$deletedstr = get_string('instancedeleted', 'repository');
|
||||
plugin_manager::reset_caches();
|
||||
core_plugin_manager::reset_caches();
|
||||
redirect($parenturl, $deletedstr, 3);
|
||||
} else {
|
||||
print_error('instancenotdeleted', 'repository', $parenturl);
|
||||
|
||||
Reference in New Issue
Block a user