From: Marc Schumann Date: Mon, 28 Nov 2011 08:04:08 +0000 (+0100) Subject: Bug 428490 - Display group icons for indirect memberships, too. X-Git-Tag: bugzilla-4.3.1~194 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1710b67cdaf36baf843cd3ad292114d312903a42;p=thirdparty%2Fbugzilla.git Bug 428490 - Display group icons for indirect memberships, too. r/a=LpSolit --- diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 849c1d915b..02312cc400 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -1143,24 +1143,6 @@ sub can_set_flag { || $self->in_group_id($flag_type->grant_group_id)) ? 1 : 0; } -sub direct_group_membership { - my $self = shift; - my $dbh = Bugzilla->dbh; - - if (!$self->{'direct_group_membership'}) { - my $gid = $dbh->selectcol_arrayref('SELECT id - FROM groups - INNER JOIN user_group_map - ON groups.id = user_group_map.group_id - WHERE user_id = ? - AND isbless = 0', - undef, $self->id); - $self->{'direct_group_membership'} = Bugzilla::Group->new_from_list($gid); - } - return $self->{'direct_group_membership'}; -} - - # visible_groups_inherited returns a reference to a list of all the groups # whose members are visible to this user. sub visible_groups_inherited { @@ -2456,11 +2438,6 @@ Returns a reference to an array of users. The array is populated with hashrefs containing the login, identity and visibility. Users that are not visible to this user will have 'visible' set to zero. -=item C - -Returns a reference to an array of group objects. Groups the user belong to -by group inheritance are excluded from the list. - =item C Returns a list of all groups whose members should be visible to this user. diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index ad84521dcd..dffc5dff86 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -186,7 +186,7 @@ - [% FOREACH group = comment.author.direct_group_membership %] + [% FOREACH group = comment.author.groups %] [% NEXT UNLESS group.icon_url %]