mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 09:15:15 +02:00
fixed widget alert pandora_enterprise#9229
This commit is contained in:
parent
c4d085c24c
commit
9ac30676b6
@ -86,7 +86,8 @@ function groupview_get_modules_counters($groups_ids=false)
|
||||
WHERE tasg.id_group IN ($groups_ids)
|
||||
GROUP BY tasg.id_group
|
||||
) x GROUP BY g";
|
||||
return db_get_all_rows_sql($sql);
|
||||
$data = db_get_all_rows_sql($sql);
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
|
@ -392,6 +392,14 @@ class SystemGroupStatusWidget extends Widget
|
||||
|
||||
$selected_groups = explode(',', $this->values['groupId'][0]);
|
||||
|
||||
// Recursion.
|
||||
if ($this->values['groupRecursion'] === true) {
|
||||
foreach ($selected_groups as $father) {
|
||||
$children = \groups_get_children_ids($father);
|
||||
$selected_groups = ($selected_groups + $children);
|
||||
}
|
||||
}
|
||||
|
||||
if ($selected_groups[0] === '') {
|
||||
return false;
|
||||
}
|
||||
@ -456,10 +464,10 @@ class SystemGroupStatusWidget extends Widget
|
||||
$keys = array_column($module_counters, 'g');
|
||||
$values = array_values($module_counters);
|
||||
$result_groups = array_combine($keys, $values);
|
||||
}
|
||||
|
||||
if (empty($all_counters) === false) {
|
||||
$result_groups[0] = $all_counters;
|
||||
if (empty($all_counters) === false) {
|
||||
$result_groups[0] = $all_counters;
|
||||
}
|
||||
}
|
||||
|
||||
$this->values['groupId'] = explode(',', $this->values['groupId'][0]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user