mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
Fixed the count of ok agents in the group view into the treeview
(cherry picked from commit b711dcdd342dad2f9aeaeb1498030dfa441670a0) Conflicts: pandora_console/include/functions_groups.php
This commit is contained in:
parent
1bd2166d7e
commit
d20c945af8
@ -1189,6 +1189,8 @@ function groups_agent_total($group_array) {
|
|||||||
WHERE tagente.disabled = 0
|
WHERE tagente.disabled = 0
|
||||||
AND id_grupo IN $group_clause");
|
AND id_grupo IN $group_clause");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $count > 0 ? $count : 0;
|
return $count > 0 ? $count : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1207,7 +1209,13 @@ function groups_agent_ok ($group_array) {
|
|||||||
$group_clause = implode (",", $group_array);
|
$group_clause = implode (",", $group_array);
|
||||||
$group_clause = "(" . $group_clause . ")";
|
$group_clause = "(" . $group_clause . ")";
|
||||||
|
|
||||||
$count = db_get_sql ("SELECT COUNT(*) FROM tagente WHERE tagente.disabled=0 AND normal_count=total_count AND id_grupo IN $group_clause");
|
$count = db_get_sql ("SELECT COUNT(*)
|
||||||
|
FROM tagente
|
||||||
|
WHERE tagente.disabled = 0
|
||||||
|
AND normal_count = total_count
|
||||||
|
AND id_grupo IN $group_clause");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $count > 0 ? $count : 0;
|
return $count > 0 ? $count : 0;
|
||||||
}
|
}
|
||||||
@ -1623,6 +1631,7 @@ function groups_get_tree(&$groups, $parent = false) {
|
|||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function groups_get_all_hierarchy_group ($id_group, $hierarchy = array()) {
|
function groups_get_all_hierarchy_group ($id_group, $hierarchy = array()) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
@ -619,6 +619,8 @@ function treeview_getData ($type) {
|
|||||||
return array ();
|
return array ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$fgroups = array();
|
$fgroups = array();
|
||||||
|
|
||||||
foreach ($full_groups as $fg) {
|
foreach ($full_groups as $fg) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user