Fix list agent with secondaty grouos on selec
This commit is contained in:
parent
bf890c0d11
commit
77552805a4
|
@ -976,6 +976,8 @@ if ($update_agent) {
|
||||||
$cps = get_parameter_switch('cps', -1);
|
$cps = get_parameter_switch('cps', -1);
|
||||||
$old_values = db_get_row('tagente', 'id_agente', $id_agente);
|
$old_values = db_get_row('tagente', 'id_agente', $id_agente);
|
||||||
$fields = db_get_all_fields_in_table('tagent_custom_fields');
|
$fields = db_get_all_fields_in_table('tagent_custom_fields');
|
||||||
|
$secondary_groups = (string) get_parameter('secondary_hidden', '');
|
||||||
|
|
||||||
|
|
||||||
if ($fields === false) {
|
if ($fields === false) {
|
||||||
$fields = [];
|
$fields = [];
|
||||||
|
@ -1205,7 +1207,16 @@ if ($update_agent) {
|
||||||
"Quiet":"'.(int) $quiet.'",
|
"Quiet":"'.(int) $quiet.'",
|
||||||
"Cps":"'.(int) $cps.'"}';
|
"Cps":"'.(int) $cps.'"}';
|
||||||
|
|
||||||
enterprise_hook('update_agent', [$id_agente]);
|
// Create the secondary groups.
|
||||||
|
enterprise_hook(
|
||||||
|
'agents_update_secondary_groups',
|
||||||
|
[
|
||||||
|
$id_agente,
|
||||||
|
explode(',', $secondary_groups),
|
||||||
|
[],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
ui_print_success_message(__('Successfully updated'));
|
ui_print_success_message(__('Successfully updated'));
|
||||||
db_pandora_audit(
|
db_pandora_audit(
|
||||||
'Agent management',
|
'Agent management',
|
||||||
|
|
|
@ -1283,7 +1283,7 @@ function agents_get_group_agents(
|
||||||
if (!$add_alert_bulk_op) {
|
if (!$add_alert_bulk_op) {
|
||||||
// Add the rest of the filter from the search array.
|
// Add the rest of the filter from the search array.
|
||||||
foreach ($search as $key => $value) {
|
foreach ($search as $key => $value) {
|
||||||
$filter[] = $value;
|
$filter[$key] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ($filter !== true) {
|
} else if ($filter !== true) {
|
||||||
|
|
Loading…
Reference in New Issue