From 26927538c086cd0b415129427dc8da7cd44a639c Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 12 Oct 2010 13:00:47 +0000 Subject: [PATCH] Updated JsonRPC class -Updated debug handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20001 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_jsonRPC.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gosa-core/include/class_jsonRPC.inc b/gosa-core/include/class_jsonRPC.inc index d1287d1d8..f7b7a501f 100644 --- a/gosa-core/include/class_jsonRPC.inc +++ b/gosa-core/include/class_jsonRPC.inc @@ -145,8 +145,12 @@ class jsonRPC { }else{ DEBUG (DEBUG_RPC, __LINE__, __FUNCTION__, __FILE__,bold($this->get_error())."
".$response, "Result (FAILED): "); } - if(isset($response['error']) && !empty($response['error'])){ - print_a(array($response)); + + global $config; + $debugLevel = $config->get_cfg_value('core', 'debugLevel'); + if($debugLevel & DEBUG_RPC){ + print_a(array('CALLED:' => array($method => $params))); + print_a(array('RESPONSE' => $response)); } return($response['result']); } -- 2.30.2