From c93d30878b995bdc0f8a959bb1cef95d36f80a88 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Tue, 7 Jul 2015 17:44:36 +0200 Subject: [PATCH] Fixed an error which causes a weird update counter --- .../godmode/massive/massive_edit_modules.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index b92d5c41b2..9690ffaee2 100644 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -133,9 +133,20 @@ if ($update) { } foreach ($modules_ as $module_) { - $result = process_manage_edit ($module_, $agents_); - $count ++; - $success += (int)$result; + $filter = array('id_agente' => $agent_); + + if (!is_numeric($module_)) + $filter['nombre'] = $module_; + else + $filter['id_agente_modulo'] = $module_; + + $exists = (bool) db_get_value_filter('id_agente', 'tagente_modulo', $filter); + + if ($exists) { + $result = process_manage_edit ($module_, $agent_); + $count++; + $success += (int)$result; + } } }