mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
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
83b24ef12d
commit
027a75a433
@ -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>
|
2011-09-16 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* include/help/en/help_export_server.php
|
* 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));
|
$modules = array_keys (agents_get_modules ($agent_id));
|
||||||
foreach ($query as $sql) {
|
foreach ($query as $sql) {
|
||||||
//Add up each table's data
|
//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);
|
$count[$agent_id] += (int) db_get_sql ($sql." WHERE id_agente_modulo IN (".implode (",", $modules).")", 0, true);
|
||||||
}
|
}
|
||||||
//Add total agent count to total count
|
//Add total agent count to total count
|
||||||
|
Loading…
x
Reference in New Issue
Block a user