not using options parameter on json_encode, as PHP5.2 returns empty string and loading template class only, if not autoloadable

This commit is contained in:
Ralf Becker 2010-06-02 18:11:15 +00:00
parent d9b9e79fcd
commit ea57302fce

View File

@ -70,7 +70,7 @@ class egw_json_request
{
@list($appName, $className, $functionName, $handler) = explode('.',$menuaction);
}
error_log("xajax.php: appName=$appName, className=$className, functionName=$functionName, handler=$handler");
//error_log("json.php: appName=$appName, className=$className, functionName=$functionName, handler=$handler");
switch($handler)
{
@ -110,7 +110,7 @@ class egw_json_request
if (isset($template))
{
require_once(EGW_SERVER_ROOT.'/phpgwapi/templates/'.$template.'/class.'.$className.'.inc.php');
if (!class_exists($className)) require_once(EGW_SERVER_ROOT.'/phpgwapi/templates/'.$template.'/class.'.$className.'.inc.php');
$ajaxClass = new $className;
}
else
@ -309,7 +309,7 @@ class egw_json_response
/* Wrap the result array into a parent "response" Object */
$res = array('response' => $this->responseArray);
return json_encode($res, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP);
return json_encode($res); //PHP5.3+, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP);
}
/**