deactivate all plugins function

This commit is contained in:
Diego Najar 2019-11-18 19:41:54 +01:00
parent 2b504938ec
commit f0e9bc62a2
1 changed files with 18 additions and 0 deletions

View File

@ -251,6 +251,24 @@ function deactivatePlugin($pluginClassName) {
return false; return false;
} }
function deactivateAllPlugin() {
global $plugins;
global $syslog;
global $L;
// Check if the plugin exists
foreach ($plugins['all'] as $plugin) {
if ($plugin->uninstall()) {
// Add to syslog
$syslog->add(array(
'dictionaryKey'=>'plugin-deactivated',
'notes'=>$plugin->name()
));
}
}
return false;
}
function changePluginsPosition($pluginClassList) { function changePluginsPosition($pluginClassList) {
global $plugins; global $plugins;
global $syslog; global $syslog;