diff options
Diffstat (limited to 'extensions/MoreBugUrl/lib/ReviewBoard.pm')
-rw-r--r-- | extensions/MoreBugUrl/lib/ReviewBoard.pm | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/extensions/MoreBugUrl/lib/ReviewBoard.pm b/extensions/MoreBugUrl/lib/ReviewBoard.pm index af5ff0684..48cbecf11 100644 --- a/extensions/MoreBugUrl/lib/ReviewBoard.pm +++ b/extensions/MoreBugUrl/lib/ReviewBoard.pm @@ -18,29 +18,30 @@ use parent qw(Bugzilla::BugUrl); ############################### sub should_handle { - my ($class, $uri) = @_; - return ($uri->path =~ m|/r/\d+/?$|) ? 1 : 0; + my ($class, $uri) = @_; + return ($uri->path =~ m|/r/\d+/?$|) ? 1 : 0; } sub _check_value { - my $class = shift; + my $class = shift; - my $uri = $class->SUPER::_check_value(@_); + my $uri = $class->SUPER::_check_value(@_); - # Review Board URLs have only one form (the trailing slash is optional): - # http://reviews.reviewboard.org/r/111/ + # Review Board URLs have only one form (the trailing slash is optional): + # http://reviews.reviewboard.org/r/111/ - # Make sure there are no query parameters. - $uri->query(undef); - # And remove any # part if there is one. - $uri->fragment(undef); + # Make sure there are no query parameters. + $uri->query(undef); - # make sure the trailing slash is present - if ($uri->path !~ m|/$|) { - $uri->path($uri->path . '/'); - } + # And remove any # part if there is one. + $uri->fragment(undef); - return $uri; + # make sure the trailing slash is present + if ($uri->path !~ m|/$|) { + $uri->path($uri->path . '/'); + } + + return $uri; } 1; |