From 77761cd6861490775d0d617f962ad213019517d9 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Fri, 19 Oct 2007 12:58:48 +0000 Subject: 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 r=ghendricks, a=mkanat --- xmlrpc.cgi | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xmlrpc.cgi') 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; -- cgit v1.2.3-65-gdbad