Fixed the force network modules execution. TICKET #1288

This commit is contained in:
mdtrooper 2014-09-22 14:05:04 +02:00
parent d58e077868
commit ad23e19a98
1 changed files with 11 additions and 3 deletions

View File

@ -32,10 +32,18 @@ if (! check_acl ($config['id_user'], 0, "AR")) {
// Made it a subquery, much faster on both the database and server side
if (isset ($_GET["update_netgroup"])) {
$group = get_parameter_get ("update_netgroup", 0);
if (check_acl ($config['id_user'], $group, "AW")) {
$where = array('id_agente' => 'ANY(SELECT id_agente FROM tagente WHERE id_grupo = ' . $group . ')');
db_process_sql_update('tagente_modulo', array('flag' => 1), $where);
if ($group == 0) {
db_process_sql_update('tagente_modulo', array('flag' => 1));
}
else {
db_process_sql("UPDATE `tagente_modulo`
SET `flag` = 1
WHERE `id_agente` = ANY(SELECT id_agente
FROM tagente
WHERE id_grupo = " . $group . ")");
}
}
else {
db_pandora_audit("ACL Violation", "Trying to set flag for groups");