2011-09-16 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_agents.php: Avoid bad syntax sql query in agents_get_modules_data_count() function when an agent doesn't have modules. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4962 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
e43929d2dc
commit
863a8c3047
|
@ -1,3 +1,9 @@
|
|||
2011-09-16 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_agents.php: Avoid bad syntax sql query
|
||||
in agents_get_modules_data_count() function when an agent doesn't
|
||||
have modules.
|
||||
|
||||
2011-09-16 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/help/en/help_export_server.php
|
||||
|
|
|
@ -1198,6 +1198,8 @@ function agents_get_modules_data_count ($id_agent = 0) {
|
|||
$modules = array_keys (agents_get_modules ($agent_id));
|
||||
foreach ($query as $sql) {
|
||||
//Add up each table's data
|
||||
//Avoid the count over empty array
|
||||
if (!empty($modules))
|
||||
$count[$agent_id] += (int) db_get_sql ($sql." WHERE id_agente_modulo IN (".implode (",", $modules).")", 0, true);
|
||||
}
|
||||
//Add total agent count to total count
|
||||
|
|
Loading…
Reference in New Issue