Fixed bug in event filter.

This commit is contained in:
Vanessa Gil 2014-09-29 11:27:10 +02:00
parent 83314fac0e
commit 1a6659d116
1 changed files with 23 additions and 3 deletions

View File

@ -48,9 +48,29 @@ else {
$sql_post = ""; $sql_post = "";
} }
else { else {
//Otherwise select all groups the user has rights to. if ($meta) {
$sql_post = " AND id_grupo IN (" . // In metaconsole the group search is performed by name
implode (",", array_keys ($groups)) . ")";
$sql_post = " AND group_name IN ( ";
$i = 0;
foreach ($groups as $group_id=>$group_name) {
if ($group_id == 0) {
continue;
}
if ($i==0) {
$sql_post .= "'$group_name'";
} else {
$sql_post .= ",'$group_name'";
}
$i++;
}
$sql_post.= ")";
} else {
//Otherwise select all groups the user has rights to.
$sql_post = " AND id_grupo IN (" .
implode (",", array_keys ($groups)) . ")";
}
} }
} }