2012-01-17 Vanessa Gil <vanessa.gil@artica.es>

* include/functions_agents.php
	  extensions/module_groups.php: Fixed bug: sql error in
	extension "Module Groups" and popup alert.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5376 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
vgilc 2012-01-17 10:20:53 +00:00
parent c0c6844e9d
commit 1b30175835
3 changed files with 25 additions and 19 deletions

View File

@ -1,3 +1,9 @@
2012-01-17 Vanessa Gil <vanessa.gil@artica.es>
* include/functions_agents.php
extensions/module_groups.php: Fixed bug: sql error in
extension "Module Groups" and popup alert.
2012-01-16 Vanessa Gil <vanessa.gil@artica.es>
* godmode/netflow/nf_edit.php

View File

@ -30,7 +30,7 @@ if (is_ajax ()) {
if ($get_info_alert_module_group) {
$agents = agents_get_group_agents($id_agent_group);
if (!empty($agents)) {
$alerts = agents_get_alerts_simple($agents);
$alerts = agents_get_alerts_simple(array_keys($agents));
foreach ($alerts as $alert) {
$module = db_get_row_filter('tagente_modulo', array('id_agente_modulo' => $alert['id_agent_module']));
if ($module_group == $module['id_module_group']) {
@ -50,7 +50,6 @@ if (is_ajax ()) {
INNER JOIN talert_actions AS t2 ON t1.id_alert_action = t2.id
WHERE t1.id_alert_template_module = ' . $template['id'] . '
OR t2.id = ' . $template['id_alert_action'] . ';';
$actions = db_get_all_rows_sql($sql);
if ($actions === false) {
$actions = array();
@ -168,11 +167,10 @@ function mainModuleGroups() {
$rowsDB = db_get_all_rows_sql ($query);
$agents = agents_get_group_agents($idAgentGroup);
if (!empty($agents)) {
$alerts = agents_get_alerts_simple($agents);
$alerts = agents_get_alerts_simple(array_keys($agents));
foreach ($alerts as $alert) {
$module = db_get_row_filter('tagente_modulo', array('id_agente_modulo' => $alert['id_agent_module']));
@ -193,6 +191,7 @@ function mainModuleGroups() {
}
$count = 0;
foreach ($states as $idState => $state) {
$count += $state;
}

View File

@ -955,7 +955,6 @@ function agents_get_modules ($id_agent = null, $details = false, $filter = false
if ($id_agent === null) {
//Extract the agents of group user.
$groups = users_get_groups(false, 'AR', false);
if(empty($groups)) {
return array();
}
@ -976,7 +975,9 @@ function agents_get_modules ($id_agent = null, $details = false, $filter = false
$id_agent = $temp;
}
$id_agent = safe_int ($id_agent, 1);
if (!is_array($id_agent)) {
$id_agent = safe_int ($id_agent, 1);
}
$extra_sql = '';
if ($id_agent != 0){