From 2bea3e2abd44e07198199eb9ac86aebc4c3f0f2a Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Tue, 6 Mar 2012 12:05:35 -0500 Subject: Bug 732189 - Backport 731562 to bmo: Cache the global/user.html.tmpl template, r=glob https://bugzilla.mozilla.org/show_bug.cgi?id=731562 --- Bugzilla/User.pm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Bugzilla/User.pm') diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index d6e343429..e9d2754f7 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -779,6 +779,15 @@ sub in_group_id { return grep($_->id == $id, @{ $self->groups }) ? 1 : 0; } +# This is a helper to get all groups which have an icon to be displayed +# besides the name of the commenter. +sub groups_with_icon { + my $self = shift; + + my @groups = grep { $_->icon_url } @{ $self->direct_group_membership }; + return \@groups; +} + sub get_products_by_permission { my ($self, $group) = @_; # Make sure $group exists on a per-product basis. -- cgit v1.2.3-24-g4f1b