Fixed bug in event filter.
This commit is contained in:
parent
83314fac0e
commit
1a6659d116
|
@ -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)) . ")";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue