Fixed sql error in event list.

This commit is contained in:
Vanessa Gil 2014-09-18 10:26:25 +02:00
parent 427bb5fe12
commit 8b87df0812
1 changed files with 7 additions and 1 deletions

View File

@ -1921,9 +1921,15 @@ function html_print_autocomplete_modules($name = 'module',
$groups = users_get_groups($config['id_user'], "AW", false);
$groups = array_keys($groups);
if (empty($groups)) {
$id_groups = 0;
} else {
$id_groups = implode(',', $groups);
}
$agents = db_get_all_rows_sql('SELECT id_agente
FROM tagente
WHERE id_grupo IN (' . implode(',', $groups) . ')');
WHERE id_grupo IN (' . $id_groups . ')');
}
else {
$agents = db_get_all_rows_sql('SELECT id_agente