summaryrefslogtreecommitdiffstats
path: root/extensions/Splinter/lib/Util.pm
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/Splinter/lib/Util.pm')
-rw-r--r--extensions/Splinter/lib/Util.pm22
1 files changed, 10 insertions, 12 deletions
diff --git a/extensions/Splinter/lib/Util.pm b/extensions/Splinter/lib/Util.pm
index c8c0d52d2..1861d7ab6 100644
--- a/extensions/Splinter/lib/Util.pm
+++ b/extensions/Splinter/lib/Util.pm
@@ -21,8 +21,6 @@
package Bugzilla::Extension::Splinter::Util;
-use strict;
-
use Bugzilla;
use Bugzilla::Util;
@@ -68,9 +66,9 @@ sub get_review_url {
my $bug_id = $bug->id;
if (defined $absolute && $absolute) {
- my $urlbase = correct_urlbase();
- $urlbase =~ s!/$!! if $base =~ "^/";
- $base = $urlbase . $base;
+ my $urlbase = correct_urlbase();
+ $urlbase =~ s!/$!! if $base =~ "^/";
+ $base = $urlbase . $base;
}
if ($base =~ /\?/) {
@@ -95,12 +93,12 @@ sub munge_create_attachment {
my ($bug, $intro_text, $attach_id, $view_link) = @_;
if (attachment_id_is_patch ($attach_id)) {
- return ("$intro_text" .
+ return ("$intro_text" .
" View: $view_link\015\012" .
" Review: " . get_review_url($bug, $attach_id, 1) . "\015\012");
}
else {
- return ("$intro_text --> ($view_link)");
+ return ("$intro_text --> ($view_link)");
}
}
@@ -117,24 +115,24 @@ sub add_review_links_to_email {
if ($email->header('Subject') =~ /^\[Bug\s+(\d+)\]/
&& Bugzilla->user->can_see_bug($1))
{
- $bug = Bugzilla::Bug->new($1);
+ $bug = Bugzilla::Bug->new($1);
}
return unless defined $bug;
if ($body =~ /Review\s+of\s+attachment\s+\d+\s*:/) {
- $body =~ s~(Review\s+of\s+attachment\s+(\d+)\s*:)
+ $body =~ s~(Review\s+of\s+attachment\s+(\d+)\s*:)
~"$1\015\012 --> (" . get_review_url($bug, $2, 1) . ")"
~egx;
- $new_body = 1;
+ $new_body = 1;
}
if ($body =~ /Created attachment \d+\015\012 --> /) {
- $body =~ s~(Created\ attachment\ (\d+)\015\012)
+ $body =~ s~(Created\ attachment\ (\d+)\015\012)
\ -->\ \(([^\015\012]*)\)[^\015\012]*
~munge_create_attachment($bug, $1, $2, $3)
~egx;
- $new_body = 1;
+ $new_body = 1;
}
$email->body_set($body) if $new_body;