summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Search.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Search.pm')
-rw-r--r--Bugzilla/Search.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 2f8d86c8e..77000ce31 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -775,8 +775,9 @@ sub init {
" ON bug_group_map.bug_id = bugs.bug_id ";
if ($user->id) {
- if (%{$user->groups}) {
- $query .= " AND bug_group_map.group_id NOT IN (" . join(',', values(%{$user->groups})) . ") ";
+ if (scalar @{ $user->groups }) {
+ $query .= " AND bug_group_map.group_id NOT IN ("
+ . $user->groups_as_string . ") ";
}
$query .= " LEFT JOIN cc ON cc.bug_id = bugs.bug_id AND cc.who = " . $user->id;