summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2012-03-01 23:24:08 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2012-03-01 23:24:08 +0100
commit670ea222ff6b4e7b1d544c939972a7252665e3fc (patch)
tree5c85767377c76d389a203cc4ccdd5e67a332eff5 /Bugzilla/User.pm
parent2e3a5735240ad3bc777e245bf1ce1505e3579fda (diff)
downloadbugzilla-670ea222ff6b4e7b1d544c939972a7252665e3fc.tar.gz
bugzilla-670ea222ff6b4e7b1d544c939972a7252665e3fc.tar.xz
Bug 731562: Cache the global/user.html.tmpl template for improved performance
r=dkl a=LpSolit
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r--Bugzilla/User.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index bda055af4..5462b33db 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -774,6 +774,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->groups };
+ return \@groups;
+}
+
sub get_products_by_permission {
my ($self, $group) = @_;
# Make sure $group exists on a per-product basis.