Fixed an error which causes a weird update counter

This commit is contained in:
Alejandro Gallardo Escobar 2015-07-07 17:44:36 +02:00
parent b8a6328d6e
commit c93d30878b
1 changed files with 14 additions and 3 deletions

View File

@ -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;
}
}
}