mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
#12704 fixed filter in list events
This commit is contained in:
parent
88308da560
commit
5fbf3fea7a
@ -955,17 +955,14 @@ function events_get_all(
|
|||||||
|
|
||||||
$groups = false;
|
$groups = false;
|
||||||
$filter_groups = false;
|
$filter_groups = false;
|
||||||
if ((bool) $user_is_admin === false) {
|
|
||||||
if (isset($filter['id_group_filter']) === true
|
if (isset($filter['id_group_filter']) === true
|
||||||
&& empty($filter['id_group_filter']) === false
|
&& empty($filter['id_group_filter']) === false
|
||||||
) {
|
) {
|
||||||
$filter_groups = true;
|
$filter_groups = true;
|
||||||
$groups = $filter['id_group_filter'];
|
$groups = $filter['id_group_filter'];
|
||||||
} else {
|
} else if ((bool) $user_is_admin === false) {
|
||||||
// Not being filtered by group but not an admin, limit results.
|
|
||||||
$groups = array_keys(users_get_groups(false, 'AR'));
|
$groups = array_keys(users_get_groups(false, 'AR'));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($groups) === true
|
if (isset($groups) === true
|
||||||
&& (is_array($groups) === true || ($groups > 0))
|
&& (is_array($groups) === true || ($groups > 0))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user