summaryrefslogtreecommitdiffstats
path: root/extensions/Splinter/lib
diff options
context:
space:
mode:
authorDavid Lawrence <dlawrence@mozilla.com>2011-10-05 00:25:23 +0200
committerDavid Lawrence <dlawrence@mozilla.com>2011-10-05 00:25:23 +0200
commit57584dc4744fea59833ef355f7513690d246c70f (patch)
tree805f2b2941eca17eaf97263165d11d9e676ad9d1 /extensions/Splinter/lib
parent785580c6c290b93fe25868cfbb5d4e300749de62 (diff)
downloadbugzilla-57584dc4744fea59833ef355f7513690d246c70f.tar.gz
bugzilla-57584dc4744fea59833ef355f7513690d246c70f.tar.xz
more porting work
Diffstat (limited to 'extensions/Splinter/lib')
-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;