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:
parent
e7cc7a2ede
commit
c6da118aba
|
@ -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>
|
2011-11-30 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* operation/agentes/estado_agente.php: Fixed pagination transfer
|
* operation/agentes/estado_agente.php: Fixed pagination transfer
|
||||||
|
|
|
@ -977,12 +977,15 @@ function agents_get_modules ($id_agent = null, $details = false, $filter = false
|
||||||
}
|
}
|
||||||
|
|
||||||
$id_agent = safe_int ($id_agent, 1);
|
$id_agent = safe_int ($id_agent, 1);
|
||||||
|
|
||||||
$extra_sql = enterprise_hook('policies_get_modules_sql_condition', array($id_agent));
|
$extra_sql = '';
|
||||||
if ($extra_sql === ENTERPRISE_NOT_HOOK) {
|
if ($id_agent != 0){
|
||||||
$extra_sql = '';
|
$extra_sql = enterprise_hook('policies_get_modules_sql_condition', array($id_agent));
|
||||||
}else if ($extra_sql != '') {
|
if ($extra_sql === ENTERPRISE_NOT_HOOK) {
|
||||||
$extra_sql .= ' OR ';
|
$extra_sql = '';
|
||||||
|
}else if ($extra_sql != '') {
|
||||||
|
$extra_sql .= ' OR ';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$userGroups = users_get_groups($config['id_user'], 'AR', false);
|
$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);
|
$result = db_get_all_rows_sql ($sql);
|
||||||
|
|
||||||
if (empty ($result)) {
|
if (empty ($result)) {
|
||||||
return array ();
|
return array ();
|
||||||
}
|
}
|
||||||
|
@ -1484,7 +1487,7 @@ function agents_get_status($id_agent = 0) {
|
||||||
if(($module_type >= 21 && $module_type <= 23) || $module_type == 100) {
|
if(($module_type >= 21 && $module_type <= 23) || $module_type == 100) {
|
||||||
$modules_async++;
|
$modules_async++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If all the modules are asynchronous or keep alive, the group cannot be unknown
|
// If all the modules are asynchronous or keep alive, the group cannot be unknown
|
||||||
if($modules_async < count($modules)) {
|
if($modules_async < count($modules)) {
|
||||||
|
|
Loading…
Reference in New Issue