aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2020-01-29 06:50:00 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2020-01-29 06:56:28 -0800
commit976f4aa6d3e82e568149dd58a0197b36641b7b81 (patch)
tree5df93d3bd42ed5eebfce726bdf559d45d2684075 /extensions/MoreBugUrl/lib/PHP.pm
parentMerge remote-tracking branch 'origin/master' into bugstest (diff)
parentMerge tag 'release-5.0.6' into bugstest (diff)
downloadbugzilla-976f4aa6d3e82e568149dd58a0197b36641b7b81.tar.gz
bugzilla-976f4aa6d3e82e568149dd58a0197b36641b7b81.tar.bz2
bugzilla-976f4aa6d3e82e568149dd58a0197b36641b7b81.zip
Merge branch 'bugstest-5.0.6' into bugstest
Merge my 5.0.6 import changes. This is specifically a merge to make it easier to merge upstream changes again after the code reformatting. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'extensions/MoreBugUrl/lib/PHP.pm')
-rw-r--r--extensions/MoreBugUrl/lib/PHP.pm26
1 files changed, 13 insertions, 13 deletions
diff --git a/extensions/MoreBugUrl/lib/PHP.pm b/extensions/MoreBugUrl/lib/PHP.pm
index 6f201d7b1..9419bcd14 100644
--- a/extensions/MoreBugUrl/lib/PHP.pm
+++ b/extensions/MoreBugUrl/lib/PHP.pm
@@ -18,27 +18,27 @@ use parent qw(Bugzilla::BugUrl);
###############################
sub should_handle {
- my ($class, $uri) = @_;
+ my ($class, $uri) = @_;
- # PHP Bug URLs have only one form:
- # https://bugs.php.net/bug.php?id=1234
- return (lc($uri->authority) eq 'bugs.php.net'
- and $uri->path =~ m|/bug\.php$|
- and $uri->query_param('id') =~ /^\d+$/) ? 1 : 0;
+ # PHP Bug URLs have only one form:
+ # https://bugs.php.net/bug.php?id=1234
+ return (lc($uri->authority) eq 'bugs.php.net'
+ and $uri->path =~ m|/bug\.php$|
+ 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(@_);
- # PHP Bug URLs redirect to HTTPS, so just use the HTTPS scheme.
- $uri->scheme('https');
+ # PHP Bug URLs redirect to HTTPS, so just use the HTTPS scheme.
+ $uri->scheme('https');
- # 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;