summaryrefslogtreecommitdiffstats
path: root/xmlrpc.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-10-19 14:58:48 +0200
committermkanat%bugzilla.org <>2007-10-19 14:58:48 +0200
commit77761cd6861490775d0d617f962ad213019517d9 (patch)
treedd220626d75c0c22afb2c2bd25c5d06a53f5d260 /xmlrpc.cgi
parent415e32d463bbb881d991d886ddba6f859669c098 (diff)
downloadbugzilla-77761cd6861490775d0d617f962ad213019517d9.tar.gz
bugzilla-77761cd6861490775d0d617f962ad213019517d9.tar.xz
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;