From e4e15af3ef6c5079fc6d9570260b5be9caa505f4 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 19 Jan 2015 10:52:25 +0100 Subject: [PATCH] Added erased when a plugin is also deleted in the policies. --- pandora_console/godmode/servers/plugin.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php index 1fcd2d693b..f10ace113e 100644 --- a/pandora_console/godmode/servers/plugin.php +++ b/pandora_console/godmode/servers/plugin.php @@ -595,6 +595,13 @@ else { foreach ($plugin_modules as $pm) { modules_delete_agent_module ($pm['id_agente_modulo']); } + if (enterprise_installed()) { + enterprise_include_once('include/functions_policies.php'); + $policies_ids = db_get_all_rows_filter('tpolicy_modules', array('id_plugin' => $plugin_id)); + foreach($policies_ids as $policies_id) { + policies_change_delete_pending_module ($policies_id['id']); + } + } } }