diff options
Diffstat (limited to 'extensions/MoreBugUrl/lib/RT.pm')
-rw-r--r-- | extensions/MoreBugUrl/lib/RT.pm | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/extensions/MoreBugUrl/lib/RT.pm b/extensions/MoreBugUrl/lib/RT.pm index acb90cf39..54dc2dd4c 100644 --- a/extensions/MoreBugUrl/lib/RT.pm +++ b/extensions/MoreBugUrl/lib/RT.pm @@ -18,24 +18,25 @@ use parent qw(Bugzilla::BugUrl); ############################### sub should_handle { - my ($class, $uri) = @_; - - # RT URLs can look like various things: - # http://example.com/rt/Ticket/Display.html?id=1234 - # https://example.com/Public/Bug/Display.html?id=1234 - return ($uri->path =~ m|/Display\.html$| - and $uri->query_param('id') =~ /^\d+$/) ? 1 : 0; + my ($class, $uri) = @_; + + # RT URLs can look like various things: + # http://example.com/rt/Ticket/Display.html?id=1234 + # https://example.com/Public/Bug/Display.html?id=1234 + return ($uri->path =~ m|/Display\.html$| and $uri->query_param('id') =~ /^\d+$/) + ? 1 + : 0; } sub _check_value { - my $class = shift; + my $class = shift; - my $uri = $class->SUPER::_check_value(@_); + my $uri = $class->SUPER::_check_value(@_); - # And remove any # part if there is one. - $uri->fragment(undef); + # And remove any # part if there is one. + $uri->fragment(undef); - return $uri; + return $uri; } 1; |