diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-01-12 11:54:31 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-02-25 05:18:13 +0900 |
commit | 5c1d751f03ddca21442fc782da0fb21dd178c372 (patch) | |
tree | ff99d49039f1284e0f7afcc05084d5bbd5229c4c /extensions | |
parent | Bug 1167919: See Also: support debbugs.gnu.org tracker (diff) | |
download | bugzilla-5c1d751f03ddca21442fc782da0fb21dd178c372.tar.gz bugzilla-5c1d751f03ddca21442fc782da0fb21dd178c372.tar.bz2 bugzilla-5c1d751f03ddca21442fc782da0fb21dd178c372.zip |
Bug 1229994: MoreBugUrl: Savane: support more sub-urls than just bugs. r=gerv.
X-Gentoo-Bug: 362977
X-Gentoo-Bug-URL: https://bugs.gentoo.org/362977
(cherry picked from commit a0c3ade6d450ee0403612199a96db5bb8a577006)
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/MoreBugUrl/lib/Savane.pm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/extensions/MoreBugUrl/lib/Savane.pm b/extensions/MoreBugUrl/lib/Savane.pm index efda1fa4f..5b35bbf7d 100644 --- a/extensions/MoreBugUrl/lib/Savane.pm +++ b/extensions/MoreBugUrl/lib/Savane.pm @@ -19,7 +19,12 @@ use parent qw(Bugzilla::BugUrl); sub should_handle { my ($class, $uri) = @_; - return ($uri->as_string =~ m|/bugs/(index\.php)?\?\d+$|) ? 1 : 0; + # Savane URLs look like the following (the index.php is optional): + # https://savannah.gnu.org/bugs/index.php?107657 + # https://savannah.gnu.org/patch/index.php?107657 + # https://savannah.gnu.org/support/index.php?107657 + # https://savannah.gnu.org/task/index.php?107657 + return ($uri->as_string =~ m|/(bugs\|patch\|support\|task)/(index\.php)?\?\d+$|) ? 1 : 0; } sub _check_value { @@ -27,10 +32,6 @@ sub _check_value { my $uri = $class->SUPER::_check_value(@_); - # Savane URLs have only two forms: - # http://gna.org/bugs/index.php?12345 - # http://gna.org/bugs/?12345 - # And remove any # part if there is one. $uri->fragment(undef); |