From 4eddb82724d5f489c6533566030d2ee0a3129c93 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 22 Mar 2016 09:31:20 +0000 Subject: [PATCH] make ancient xajaxResponse autoloadable, as json.php no longer loads it by default, because it uses new Api\Json\* classes and methods --- phpgwapi/inc/class.egw_json.inc.php | 33 ++----------------- phpgwapi/inc/class.xajaxResponse.inc.php | 42 ++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 31 deletions(-) create mode 100644 phpgwapi/inc/class.xajaxResponse.inc.php diff --git a/phpgwapi/inc/class.egw_json.inc.php b/phpgwapi/inc/class.egw_json.inc.php index 5e3517c02f..ef11a290e7 100644 --- a/phpgwapi/inc/class.egw_json.inc.php +++ b/phpgwapi/inc/class.egw_json.inc.php @@ -21,6 +21,8 @@ class egw_json_request extends Json\Request {} /** * Class used to send ajax responses + * + * @deprecated use Api\Json\Response */ class egw_json_response extends Json\Response { @@ -32,34 +34,3 @@ class egw_json_response extends Json\Response // do nothing, as output is triggered by egw::__destruct() } } - -/** - * Deprecated legacy xajax wrapper functions for the new egw_json interface - * - * @deprecated use Api\Json\Response methods - */ -class xajaxResponse -{ - public function __call($name, $args) - { - if (substr($name, 0, 3) == 'add') - { - $name = substr($name, 3); - $name[0] = strtolower($name[0]); - } - return call_user_func_array(array(egw_json_response::get(), $name), $args); - } - - public function addScriptCall() - { - $args = func_get_args(); - $func = array_shift($args); - - return call_user_func(array(egw_json_response::get(), 'apply'), $func, $args); - } - - public function getXML() - { - return ''; - } -} diff --git a/phpgwapi/inc/class.xajaxResponse.inc.php b/phpgwapi/inc/class.xajaxResponse.inc.php new file mode 100644 index 0000000000..4b0449d853 --- /dev/null +++ b/phpgwapi/inc/class.xajaxResponse.inc.php @@ -0,0 +1,42 @@ + + * @version $Id$ + */ + +/** + * Deprecated legacy xajax wrapper functions for the new egw_json interface + * + * @deprecated use Api\Json\Response methods + */ +class xajaxResponse +{ + public function __call($name, $args) + { + if (substr($name, 0, 3) == 'add') + { + $name = substr($name, 3); + $name[0] = strtolower($name[0]); + } + return call_user_func_array(array(egw_json_response::get(), $name), $args); + } + + public function addScriptCall() + { + $args = func_get_args(); + $func = array_shift($args); + + return call_user_func(array(egw_json_response::get(), 'apply'), $func, $args); + } + + public function getXML() + { + return ''; + } +}