From c19ec2b041d406f08928cdf2955bd0b4f8fb992f Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Fri, 22 Mar 2019 10:47:40 +0100 Subject: [PATCH] fix bug when filtering events by group Former-commit-id: f5ee52f47cd615007f22ce54e67c1c345eed802b --- pandora_console/operation/events/events.build_query.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/operation/events/events.build_query.php b/pandora_console/operation/events/events.build_query.php index 8402eac1c5..2d335ff7e7 100755 --- a/pandora_console/operation/events/events.build_query.php +++ b/pandora_console/operation/events/events.build_query.php @@ -91,7 +91,7 @@ if ($id_group > 0 && in_array($id_group, array_keys($groups))) { $childrens_str = implode(',', $childrens_ids); $sql_post .= " AND (id_grupo IN ($childrens_str)"; - if ($is_using_secondary_group === true) + if ($is_using_secondary_group === 1) $sql_post .= " OR id_group IN ($childrens_str)"; $sql_post .= ")"; @@ -99,14 +99,14 @@ if ($id_group > 0 && in_array($id_group, array_keys($groups))) { // If a group is selected and it's in the groups allowed. $sql_post .= " AND (id_grupo = $id_group"; - if ($is_using_secondary_group === true) + if ($is_using_secondary_group === 1) $sql_post .= " OR id_group = $id_group"; $sql_post .= ")"; } } else { if (!users_is_admin() && !users_can_manage_group_all('ER')) { - if ($is_using_secondary_group === true) { + if ($is_using_secondary_group === 1) { $sql_post .= sprintf( ' AND (id_grupo IN (%s) OR id_group IN (%s)) ', implode(',', array_keys($groups)),