]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 706753: Bugzilla will not work with newest version of JSON::RPC 1.01 due to non...
authorFrédéric Buclin <LpSolit@gmail.com>
Thu, 5 Jan 2012 00:46:36 +0000 (01:46 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Thu, 5 Jan 2012 00:46:36 +0000 (01:46 +0100)
r=dkl r=mkanat a=LpSolit

Bugzilla/WebService/Server/JSONRPC.pm

index 8fe72408060871cd4cfe7e00a9e72b83ca9bfa5b..3b232aafafaa946607559342414d4eac0de2efc0 100644 (file)
 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;