2009-12-23 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_db.php: fix warning messages when pass only group as string or integer in the function "isAllGroups". * include/functions_reporting.php: fix ambiguous colummn in query in the function "get_group_stats". git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2233 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
d05afd025d
commit
586f6f0ee7
|
@ -1,3 +1,10 @@
|
|||
2009-12-23 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_db.php: fix warning messages when pass only group as
|
||||
string or integer in the function "isAllGroups".
|
||||
* include/functions_reporting.php: fix ambiguous colummn in query in the
|
||||
function "get_group_stats".
|
||||
|
||||
2009-12-22 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_custom_graphs.php: fix the name of custom graphs in the
|
||||
|
|
|
@ -353,12 +353,14 @@ function give_disabled_group ($id_group) {
|
|||
function isAllGroups($idGroups) {
|
||||
if (!is_array($idGroups))
|
||||
$arrayGroups = array($idGroups);
|
||||
else
|
||||
$arrayGroups = $idGroups;
|
||||
|
||||
$groupsDB = get_db_all_rows_in_table ('tgrupo');
|
||||
|
||||
$returnVar = true;
|
||||
foreach ($groupsDB as $group) {
|
||||
if (!in_array($group['id_grupo'],$idGroups)) {
|
||||
if (!in_array($group['id_grupo'], $arrayGroups)) {
|
||||
$returnVar = false;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -123,6 +123,7 @@ function get_group_stats ($id_group = 0) {
|
|||
$id_group = array_keys (get_user_groups ());
|
||||
}
|
||||
|
||||
|
||||
if (isAllGroups($id_group)) {
|
||||
$filter = ' 1 = 1 ';
|
||||
$total_agents = get_db_value_sql('SELECT count(id_agente) FROM tagente WHERE disabled = 0');
|
||||
|
@ -136,7 +137,7 @@ function get_group_stats ($id_group = 0) {
|
|||
//No agents in this group, means no data
|
||||
return $data;
|
||||
}
|
||||
$filter = 'id_agente IN ('.implode (",", $agents).') ';
|
||||
$filter = 'tagente_estado.id_agente IN ('.implode (",", $agents).') ';
|
||||
|
||||
$alerts = get_agent_alerts ($agents);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue