aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-10-19 12:58:48 +0000
committermkanat%bugzilla.org <>2007-10-19 12:58:48 +0000
commit77761cd6861490775d0d617f962ad213019517d9 (patch)
treedd220626d75c0c22afb2c2bd25c5d06a53f5d260 /xmlrpc.cgi
parentBug 399954: Make Bugzilla able to hold its dependencies in a local directory (diff)
downloadbugzilla-77761cd6861490775d0d617f962ad213019517d9.tar.gz
bugzilla-77761cd6861490775d0d617f962ad213019517d9.tar.bz2
bugzilla-77761cd6861490775d0d617f962ad213019517d9.zip
Bug 396243: Allow extensions (aka plugins) to extend the WebService interface
This also includes the first checkin of the example plugin. Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=ghendricks, a=mkanat
Diffstat (limited to 'xmlrpc.cgi')
-rwxr-xr-xxmlrpc.cgi6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmlrpc.cgi b/xmlrpc.cgi
index 227815d26..2ac34e675 100755
--- a/xmlrpc.cgi
+++ b/xmlrpc.cgi
@@ -20,6 +20,7 @@ use lib qw(. lib);
use Bugzilla;
use Bugzilla::Constants;
+use Bugzilla::Hook;
# Use an eval here so that runtests.pl accepts this script even if SOAP-Lite
# is not installed.
@@ -29,11 +30,16 @@ $@ && ThrowCodeError('soap_not_installed');
Bugzilla->usage_mode(Bugzilla::Constants::USAGE_MODE_WEBSERVICE);
+my %hook_dispatch;
+Bugzilla::Hook::process('webservice', { dispatch => \%hook_dispatch });
+local @INC = (bz_locations()->{extensionsdir}, @INC);
+
my $response = Bugzilla::WebService::XMLRPC::Transport::HTTP::CGI
->dispatch_with({'Bugzilla' => 'Bugzilla::WebService::Bugzilla',
'Bug' => 'Bugzilla::WebService::Bug',
'User' => 'Bugzilla::WebService::User',
'Product' => 'Bugzilla::WebService::Product',
+ %hook_dispatch
})
->on_action(\&Bugzilla::WebService::handle_login)
->handle;