diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index cf9d3c3cf7..3a7ac45374 100644 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -123,29 +123,19 @@ if ($update) { // We empty the agents array to skip the standard procedure $agents_ = array(); } - - - - foreach ($agents_ as $agent_) { - - if ($modules_ == false) { - $modules_ = array(); - } - - foreach ($modules_ as $module_) { - $filter = array('id_agente' => $agent_); + else { + // Standard procedure + foreach ($agents_ as $agent_) { - if (!is_numeric($module_)) - $filter['nombre'] = $module_; - else - $filter['id_agente_modulo'] = $module_; + if ($modules_ == false) + $modules_ = array(); - $exists = (bool) db_get_value_filter('id_agente', 'tagente_modulo', $filter); - - if ($exists) { + foreach ($modules_ as $module_) { + $result = process_manage_edit ($module_, $agent_); $count++; $success += (int)$result; + } } } diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 9629b78f56..032882419e 100644 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -440,7 +440,7 @@ function modules_update_agent_module ($id, $values, $onlyNoDeletePending = false } } else { - if ($result_disable == ERR_GENERIC ){ + if ( ERR_GENERIC === $result_disable ){ return ERR_DB; } else{