Fixed problems with bulk actions with modules. Tiquet: #2963

This commit is contained in:
m-lopez-f 2015-11-16 15:52:11 +01:00
parent dbbf3939f6
commit ca0ec7364c
2 changed files with 5 additions and 14 deletions

View File

@ -139,20 +139,11 @@ if ($update) {
$modules_ = array(); $modules_ = array();
foreach ($modules_ as $module_) { foreach ($modules_ as $module_) {
$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_); $result = process_manage_edit ($module_, $agent_);
$count++; $count++;
$success += (int)$result; $success += (int)$result;
}
} }
} }
} }

View File

@ -441,7 +441,7 @@ function modules_update_agent_module ($id, $values,
} }
} }
else { else {
if ($result_disable == ERR_GENERIC ){ if ( ERR_GENERIC === $result_disable ){
return ERR_DB; return ERR_DB;
} }
else{ else{