summaryrefslogtreecommitdiffstats
path: root/Bugzilla/BugUrl.pm
diff options
context:
space:
mode:
authorTiago Mello <timello@gmail.com>2012-02-19 18:36:22 +0100
committerTiago Mello <timello@gmail.com>2012-02-19 18:36:22 +0100
commit84982d8b04f6232d4eaa38fde78e8bfa67d496bb (patch)
treeea1fa9d6f5022b6d36de8773ac2eb0566feeb61a /Bugzilla/BugUrl.pm
parent8cf999925d27402a3c2a9abc4394d33b3f11c97a (diff)
downloadbugzilla-84982d8b04f6232d4eaa38fde78e8bfa67d496bb.tar.gz
bugzilla-84982d8b04f6232d4eaa38fde78e8bfa67d496bb.tar.xz
Bug 722580: Move 'ReviewBoard' and 'Rietveld' BugUrl sub-classes
to a new 'MoreBugUrl' extension. r/a=LpSolit
Diffstat (limited to 'Bugzilla/BugUrl.pm')
-rw-r--r--Bugzilla/BugUrl.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/Bugzilla/BugUrl.pm b/Bugzilla/BugUrl.pm
index 99d46bd24..888b11398 100644
--- a/Bugzilla/BugUrl.pm
+++ b/Bugzilla/BugUrl.pm
@@ -12,6 +12,7 @@ use base qw(Bugzilla::Object);
use Bugzilla::Util;
use Bugzilla::Error;
use Bugzilla::Constants;
+use Bugzilla::Hook;
use URI::QueryParam;
@@ -56,8 +57,6 @@ use constant SUB_CLASSES => qw(
Bugzilla::BugUrl::Trac
Bugzilla::BugUrl::MantisBT
Bugzilla::BugUrl::SourceForge
- Bugzilla::BugUrl::ReviewBoard
- Bugzilla::BugUrl::Rietveld
);
###############################
@@ -121,8 +120,12 @@ sub should_handle {
sub class_for {
my ($class, $value) = @_;
+ my @sub_classes = $class->SUB_CLASSES;
+ Bugzilla::Hook::process("bug_url_sub_classes",
+ { sub_classes => \@sub_classes });
+
my $uri = URI->new($value);
- foreach my $subclass ($class->SUB_CLASSES) {
+ foreach my $subclass (@sub_classes) {
eval "use $subclass";
die $@ if $@;
return wantarray ? ($subclass, $uri) : $subclass