2011-11-30 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* include/functions_agents.php: Fixed call to agents_get_modules
	with id_agent = 0.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5218 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2011-11-30 16:31:09 +00:00
parent f818b4a00b
commit 07b7b9bdc1
2 changed files with 16 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2011-11-30 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_agents.php: Fixed call to agents_get_modules
with id_agent = 0.
2011-11-30 Sergio Martin <sergio.martin@artica.es>
* operation/agentes/estado_agente.php: Fixed pagination transfer

View File

@ -977,12 +977,15 @@ function agents_get_modules ($id_agent = null, $details = false, $filter = false
}
$id_agent = safe_int ($id_agent, 1);
$extra_sql = enterprise_hook('policies_get_modules_sql_condition', array($id_agent));
if ($extra_sql === ENTERPRISE_NOT_HOOK) {
$extra_sql = '';
}else if ($extra_sql != '') {
$extra_sql .= ' OR ';
$extra_sql = '';
if ($id_agent != 0){
$extra_sql = enterprise_hook('policies_get_modules_sql_condition', array($id_agent));
if ($extra_sql === ENTERPRISE_NOT_HOOK) {
$extra_sql = '';
}else if ($extra_sql != '') {
$extra_sql .= ' OR ';
}
}
$userGroups = users_get_groups($config['id_user'], 'AR', false);
@ -1152,7 +1155,7 @@ function agents_get_modules ($id_agent = null, $details = false, $filter = false
}
$result = db_get_all_rows_sql ($sql);
if (empty ($result)) {
return array ();
}
@ -1484,7 +1487,7 @@ function agents_get_status($id_agent = 0) {
if(($module_type >= 21 && $module_type <= 23) || $module_type == 100) {
$modules_async++;
}
}
}
// If all the modules are asynchronous or keep alive, the group cannot be unknown
if($modules_async < count($modules)) {