summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/lib/MonkeyPatches.pm
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/BugModal/lib/MonkeyPatches.pm')
-rw-r--r--extensions/BugModal/lib/MonkeyPatches.pm21
1 files changed, 11 insertions, 10 deletions
diff --git a/extensions/BugModal/lib/MonkeyPatches.pm b/extensions/BugModal/lib/MonkeyPatches.pm
index 54bd6e560..042dabc38 100644
--- a/extensions/BugModal/lib/MonkeyPatches.pm
+++ b/extensions/BugModal/lib/MonkeyPatches.pm
@@ -17,10 +17,10 @@ use warnings;
use Bugzilla::User;
sub treeherder_user {
- return Bugzilla->process_cache->{treeherder_user} //=
- Bugzilla::User->new({ name => 'tbplbot@gmail.com', cache => 1 })
- || Bugzilla::User->new({ name => 'orangefactor@bots.tld', cache => 1 })
- || Bugzilla::User->new();
+ return Bugzilla->process_cache->{treeherder_user}
+ //= Bugzilla::User->new({name => 'tbplbot@gmail.com', cache => 1})
+ || Bugzilla::User->new({name => 'orangefactor@bots.tld', cache => 1})
+ || Bugzilla::User->new();
}
package Bugzilla::Bug;
@@ -32,10 +32,11 @@ use warnings;
use Bugzilla::Attachment;
sub active_attachments {
- my ($self) = @_;
- return [] if $self->{error};
- return $self->{active_attachments} //= Bugzilla::Attachment->get_attachments_by_bug(
- $self, { exclude_obsolete => 1, preload => 1 });
+ my ($self) = @_;
+ return [] if $self->{error};
+ return $self->{active_attachments}
+ //= Bugzilla::Attachment->get_attachments_by_bug($self,
+ {exclude_obsolete => 1, preload => 1});
}
1;
@@ -47,8 +48,8 @@ use strict;
use warnings;
sub is_image {
- my ($self) = @_;
- return substr($self->contenttype, 0, 6) eq 'image/';
+ my ($self) = @_;
+ return substr($self->contenttype, 0, 6) eq 'image/';
}
1;