From a2dd3b00284fd4724d3408274cb1156c7a77d187 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sat, 24 Oct 2009 05:21:06 +0000 Subject: Bug 520948: Use Bugzilla->feature and feature_enabled everywhere instead of checking if modules are installed Patch by Max Kanat-Alexander r=LpSolit, a=LpSolit --- xmlrpc.cgi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xmlrpc.cgi') diff --git a/xmlrpc.cgi b/xmlrpc.cgi index c98dd1b73..994e3a485 100755 --- a/xmlrpc.cgi +++ b/xmlrpc.cgi @@ -22,11 +22,12 @@ use Bugzilla; use Bugzilla::Constants; use Bugzilla::Error; use Bugzilla::WebService::Constants; - +if (!Bugzilla->feature('xmlrpc')) { + ThrowCodeError('feature_disabled', { feature => 'xmlrpc' }); +} # Use an eval here so that runtests.pl accepts this script even if SOAP-Lite # is not installed. eval { require Bugzilla::WebService::Server::XMLRPC; }; -$@ && ThrowCodeError('soap_not_installed'); Bugzilla->usage_mode(USAGE_MODE_XMLRPC); -- cgit v1.2.3-24-g4f1b