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

* include/functions_agents.php: Changed parameter in 
	policies_get_modules_sql_condition function call. 



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5178 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2011-11-28 08:23:28 +00:00
parent 2345163898
commit 1a8aa62487
2 changed files with 13 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2011-11-28 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_agents.php: Changed parameter in
policies_get_modules_sql_condition function call.
2011-11-28 Junichi Satoh <junichi@rworks.jp>
* operation/agentes/status_monitor.php: Fixed the open version of

View File

@ -129,7 +129,7 @@ function agents_get_alerts_simple ($id_agent = false, $filter = '', $options = f
$filter = '';
$disabled = $filter;
}
switch ($disabled) {
case "notfired":
$filter .= ' AND times_fired = 0 AND talert_template_modules.disabled = 0';
@ -146,7 +146,7 @@ function agents_get_alerts_simple ($id_agent = false, $filter = '', $options = f
default:
$filter .= '';
}
if (is_array ($options)) {
$filter .= db_format_array_where_clause_sql ($options);
}
@ -176,7 +176,7 @@ function agents_get_alerts_simple ($id_agent = false, $filter = '', $options = f
$subQuery = implode (",", $id_modules);
}
$orderbyText = '';
if ($orderby !== false) {
if (is_array($orderby)) {
@ -198,7 +198,7 @@ function agents_get_alerts_simple ($id_agent = false, $filter = '', $options = f
}else if ($extra_sql != '') {
$extra_sql .= ' OR ';
}
$sql = sprintf ("SELECT %s
FROM talert_template_modules
INNER JOIN tagente_modulo t2
@ -933,7 +933,7 @@ function agents_get_group_agents ($id_group = 0, $search = false, $case = "lower
*/
function agents_get_modules ($id_agent = null, $details = false, $filter = false, $indexed = true, $get_not_init_modules = true) {
global $config;
if ($id_agent === null) {
//Extract the agents of group user.
$groups = users_get_groups(false, 'AR', false);
@ -959,14 +959,14 @@ 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);
$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);
if(empty($userGroups)) {