Skip to content

Commit

Permalink
MDL-70362 admin_cli: Add showdebugging and showsql to uninstall_plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
golenkovm committed Dec 18, 2020
1 parent 4ec279a commit 5d7941c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions admin/cli/uninstall_plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
--purge-missing Uninstall all missing from disk plugins.
--plugins=<plugin name> A comma separated list of plugins to be uninstalled. E.g. mod_assign,mod_forum
--run Execute uninstall. If this option is not set, then the script will be run in a dry mode.
--showsql Show sql queries before they are executed.
--showdebugging Show developer level debugging information.
Examples:
Expand Down Expand Up @@ -72,6 +74,8 @@
'purge-missing' => false,
'plugins' => false,
'run' => false,
'showsql' => false,
'showdebugging' => false,
], [
'h' => 'help'
]);
Expand All @@ -86,6 +90,14 @@
exit(0);
}

if ($options['showdebugging']) {
set_debugging(DEBUG_DEVELOPER, true);
}

if ($options['showsql']) {
$DB->set_debug(true);
}

$pluginman = core_plugin_manager::instance();
$plugininfo = $pluginman->get_plugins();

Expand Down

0 comments on commit 5d7941c

Please sign in to comment.