summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authorReed Loden <reed@reedloden.com>2010-07-06 02:44:13 +0200
committerReed Loden <reed@reedloden.com>2010-07-06 02:44:13 +0200
commit108eb83fae1e54f9746698246551e188dede26cb (patch)
treeda7596c3a7b9f33d7762c9865c9cc198f4feede4 /Bugzilla/Template.pm
parentba4585ae8a1c63a49e40461d2e2efc12bc75c58a (diff)
downloadbugzilla-108eb83fae1e54f9746698246551e188dede26cb.tar.gz
bugzilla-108eb83fae1e54f9746698246551e188dede26cb.tar.xz
Bug 554964 - Show if a user is a "Default CC" under the Product Responsibilities section of editusers.cgi.
[r=mkanat a=mkanat]
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 71ade2f01..4bd3d2d77 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -380,14 +380,22 @@ $Template::Stash::PRIVATE = undef;
$Template::Stash::LIST_OPS->{ contains } =
sub {
my ($list, $item) = @_;
- return grep($_ eq $item, @$list);
+ if (ref $item && $item->isa('Bugzilla::Object')) {
+ return grep($_->id == $item->id, @$list);
+ } else {
+ return grep($_ eq $item, @$list);
+ }
};
$Template::Stash::LIST_OPS->{ containsany } =
sub {
my ($list, $items) = @_;
foreach my $item (@$items) {
- return 1 if grep($_ eq $item, @$list);
+ if (ref $item && $item->isa('Bugzilla::Object')) {
+ return 1 if grep($_->id == $item->id, @$list);
+ } else {
+ return 1 if grep($_ eq $item, @$list);
+ }
}
return 0;
};