Fixed problems with bulk actions with modules. Tiquet: #2963
This commit is contained in:
parent
e2d33d91d3
commit
e2f32d65ce
|
@ -123,29 +123,19 @@ if ($update) {
|
||||||
// We empty the agents array to skip the standard procedure
|
// We empty the agents array to skip the standard procedure
|
||||||
$agents_ = array();
|
$agents_ = array();
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// Standard procedure
|
||||||
|
foreach ($agents_ as $agent_) {
|
||||||
|
|
||||||
|
if ($modules_ == false)
|
||||||
|
$modules_ = array();
|
||||||
|
|
||||||
|
foreach ($modules_ as $module_) {
|
||||||
|
|
||||||
foreach ($agents_ as $agent_) {
|
|
||||||
|
|
||||||
if ($modules_ == false) {
|
|
||||||
$modules_ = array();
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -440,7 +440,7 @@ function modules_update_agent_module ($id, $values, $onlyNoDeletePending = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ($result_disable == ERR_GENERIC ){
|
if ( ERR_GENERIC === $result_disable ){
|
||||||
return ERR_DB;
|
return ERR_DB;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
Loading…
Reference in New Issue