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:
parent
2345163898
commit
1a8aa62487
|
@ -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>
|
2011-11-28 Junichi Satoh <junichi@rworks.jp>
|
||||||
|
|
||||||
* operation/agentes/status_monitor.php: Fixed the open version of
|
* operation/agentes/status_monitor.php: Fixed the open version of
|
||||||
|
|
|
@ -129,7 +129,7 @@ function agents_get_alerts_simple ($id_agent = false, $filter = '', $options = f
|
||||||
$filter = '';
|
$filter = '';
|
||||||
$disabled = $filter;
|
$disabled = $filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($disabled) {
|
switch ($disabled) {
|
||||||
case "notfired":
|
case "notfired":
|
||||||
$filter .= ' AND times_fired = 0 AND talert_template_modules.disabled = 0';
|
$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:
|
default:
|
||||||
$filter .= '';
|
$filter .= '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array ($options)) {
|
if (is_array ($options)) {
|
||||||
$filter .= db_format_array_where_clause_sql ($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);
|
$subQuery = implode (",", $id_modules);
|
||||||
}
|
}
|
||||||
|
|
||||||
$orderbyText = '';
|
$orderbyText = '';
|
||||||
if ($orderby !== false) {
|
if ($orderby !== false) {
|
||||||
if (is_array($orderby)) {
|
if (is_array($orderby)) {
|
||||||
|
@ -198,7 +198,7 @@ function agents_get_alerts_simple ($id_agent = false, $filter = '', $options = f
|
||||||
}else if ($extra_sql != '') {
|
}else if ($extra_sql != '') {
|
||||||
$extra_sql .= ' OR ';
|
$extra_sql .= ' OR ';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = sprintf ("SELECT %s
|
$sql = sprintf ("SELECT %s
|
||||||
FROM talert_template_modules
|
FROM talert_template_modules
|
||||||
INNER JOIN tagente_modulo t2
|
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) {
|
function agents_get_modules ($id_agent = null, $details = false, $filter = false, $indexed = true, $get_not_init_modules = true) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
if ($id_agent === null) {
|
if ($id_agent === null) {
|
||||||
//Extract the agents of group user.
|
//Extract the agents of group user.
|
||||||
$groups = users_get_groups(false, 'AR', false);
|
$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);
|
$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) {
|
if ($extra_sql === ENTERPRISE_NOT_HOOK) {
|
||||||
$extra_sql = '';
|
$extra_sql = '';
|
||||||
}else if ($extra_sql != '') {
|
}else if ($extra_sql != '') {
|
||||||
$extra_sql .= ' OR ';
|
$extra_sql .= ' OR ';
|
||||||
}
|
}
|
||||||
|
|
||||||
$userGroups = users_get_groups($config['id_user'], 'AR', false);
|
$userGroups = users_get_groups($config['id_user'], 'AR', false);
|
||||||
|
|
||||||
if(empty($userGroups)) {
|
if(empty($userGroups)) {
|
||||||
|
|
Loading…
Reference in New Issue