Bug 706753: Bugzilla will not work with newest version of JSON::RPC 1.01 due to non-backward compatibility

r=dkl r=mkanat a=LpSolit


git-svn-id: svn://10.0.0.236/branches/BUGZILLA-4_0-BRANCH@263226 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkanat%bugzilla.org
2012-01-05 01:02:37 +00:00
parent c6ee7aa266
commit fcedb45128
2 changed files with 13 additions and 2 deletions

View File

@@ -22,7 +22,18 @@
package Bugzilla::WebService::Server::JSONRPC;
use strict;
use base qw(JSON::RPC::Server::CGI Bugzilla::WebService::Server);
use Bugzilla::WebService::Server;
BEGIN {
our @ISA = qw(Bugzilla::WebService::Server);
if (eval { require JSON::RPC::Server::CGI }) {
unshift(@ISA, 'JSON::RPC::Server::CGI');
}
else {
require JSON::RPC::Legacy::Server::CGI;
unshift(@ISA, 'JSON::RPC::Legacy::Server::CGI');
}
}
use Bugzilla::Error;
use Bugzilla::WebService::Constants;