summaryrefslogtreecommitdiffstats
path: root/extensions/Splinter/lib
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-07-05 20:43:18 +0200
committerDylan William Hardison <dylan@hardison.net>2017-07-07 00:19:20 +0200
commit37722eca39874bb6abdcd120e3e458bd62dea62b (patch)
tree57a9a9970c00ec77baecab7e154ef7dfcef863fe /extensions/Splinter/lib
parenta6f98de0d4e842351222b0173a1fff151da8738e (diff)
downloadbugzilla-37722eca39874bb6abdcd120e3e458bd62dea62b.tar.gz
bugzilla-37722eca39874bb6abdcd120e3e458bd62dea62b.tar.xz
Bug 1377933 - Remove trailing whitespace from all perl files
Diffstat (limited to 'extensions/Splinter/lib')
-rw-r--r--extensions/Splinter/lib/Util.pm16
1 files changed, 8 insertions, 8 deletions
diff --git a/extensions/Splinter/lib/Util.pm b/extensions/Splinter/lib/Util.pm
index a24881c1d..d85b0532b 100644
--- a/extensions/Splinter/lib/Util.pm
+++ b/extensions/Splinter/lib/Util.pm
@@ -53,14 +53,14 @@ use base qw(Exporter);
sub attachment_id_is_valid {
my ($attach_id, $dont_validate_access) = @_;
- # Validate the specified attachment id.
+ # Validate the specified attachment id.
detaint_natural($attach_id) || return 0;
# Make sure the attachment exists in the database.
my $attachment = new Bugzilla::Attachment({ id => $attach_id, cache => 1 })
|| return 0;
- return $attachment
+ return $attachment
if ($dont_validate_access || attachment_is_visible($attachment));
}
@@ -71,9 +71,9 @@ sub attachment_is_visible {
$attachment->isa('Bugzilla::Attachment') || return 0;
- return (Bugzilla->user->can_see_bug($attachment->bug->id)
- && (!$attachment->isprivate
- || Bugzilla->user->id == $attachment->attacher->id
+ return (Bugzilla->user->can_see_bug($attachment->bug->id)
+ && (!$attachment->isprivate
+ || Bugzilla->user->id == $attachment->attacher->id
|| Bugzilla->user->is_insider));
}
@@ -107,7 +107,7 @@ sub get_review_link {
my $attachment = attachment_id_is_valid($attach_id);
if (attachment_id_is_patch($attach_id)) {
- return "<a href='" . html_quote(get_review_url($attachment->bug, $attach_id)) .
+ return "<a href='" . html_quote(get_review_url($attachment->bug, $attach_id)) .
"'>$link_text</a>";
}
else {
@@ -122,7 +122,7 @@ sub munge_create_attachment {
return ("$intro_text" .
" View: $view_link\015\012" .
" Review: " . get_review_url($bug, $attach_id, 1) . "\015\012");
- }
+ }
else {
return ("$intro_text --> ($view_link)");
}
@@ -143,7 +143,7 @@ sub add_review_links_to_email {
my $new_body = 0;
my $bug;
- if ($email->header('Subject') =~ /^\[Bug\s+(\d+)\]/
+ if ($email->header('Subject') =~ /^\[Bug\s+(\d+)\]/
&& Bugzilla->user->can_see_bug($1))
{
$bug = Bugzilla::Bug->new({ id => $1, cache => 1 });