mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Merge branch 'ent-7784-12114-en-las-templates-de-informes-en-metaconsola-no-busca-por-grupos-secundarios' into 'develop'
Fix list agent with secondaty grouos on selec See merge request artica/pandorafms!4303
This commit is contained in:
commit
e573e79bcd
@ -990,6 +990,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 = [];
|
||||||
@ -1219,7 +1221,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…
x
Reference in New Issue
Block a user