From fcedb45128b9a62366c16aa6670b6e7b81ce29fa Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" Date: Thu, 5 Jan 2012 01:02:37 +0000 Subject: [PATCH] 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 --- mozilla/webtools/bugzilla/.bzrrev | 2 +- .../bugzilla/Bugzilla/WebService/Server/JSONRPC.pm | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index 10abd3c986c..2a5df8871fa 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -7674 \ No newline at end of file +7675 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/Bugzilla/WebService/Server/JSONRPC.pm b/mozilla/webtools/bugzilla/Bugzilla/WebService/Server/JSONRPC.pm index 8fe72408060..3b232aafafa 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/WebService/Server/JSONRPC.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/WebService/Server/JSONRPC.pm @@ -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;