fix search events pandora_enterprise#12704
This commit is contained in:
parent
2d06d5f94d
commit
88308da560
|
@ -953,12 +953,18 @@ function events_get_all(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$groups = (isset($filter['id_group_filter']) === true) ? $filter['id_group_filter'] : null;
|
$groups = false;
|
||||||
if ((bool) $user_is_admin === false
|
$filter_groups = false;
|
||||||
&& isset($groups) === false
|
if ((bool) $user_is_admin === false) {
|
||||||
) {
|
if (isset($filter['id_group_filter']) === true
|
||||||
// Not being filtered by group but not an admin, limit results.
|
&& empty($filter['id_group_filter']) === false
|
||||||
$groups = array_keys(users_get_groups(false, 'AR'));
|
) {
|
||||||
|
$filter_groups = true;
|
||||||
|
$groups = $filter['id_group_filter'];
|
||||||
|
} else {
|
||||||
|
// Not being filtered by group but not an admin, limit results.
|
||||||
|
$groups = array_keys(users_get_groups(false, 'AR'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($groups) === true
|
if (isset($groups) === true
|
||||||
|
@ -1594,7 +1600,10 @@ function events_get_all(
|
||||||
&& (is_array($groups) === true
|
&& (is_array($groups) === true
|
||||||
|| $groups > 0)
|
|| $groups > 0)
|
||||||
) {
|
) {
|
||||||
$tgrupo_join = 'INNER';
|
if ($filter_groups === true) {
|
||||||
|
$tgrupo_join = 'INNER';
|
||||||
|
}
|
||||||
|
|
||||||
if (is_array($groups) === true) {
|
if (is_array($groups) === true) {
|
||||||
if ((bool) $filter['search_secondary_groups'] === true) {
|
if ((bool) $filter['search_secondary_groups'] === true) {
|
||||||
$tgrupo_join_filters[] = sprintf(
|
$tgrupo_join_filters[] = sprintf(
|
||||||
|
|
Loading…
Reference in New Issue