Force use of singleton: $response = egw_json_response::get(); not using it causes response being wrapped in an other response

This commit is contained in:
Ralf Becker 2013-08-25 12:42:55 +00:00
parent d8984be747
commit 38798b872d
2 changed files with 10 additions and 2 deletions

View File

@ -18,7 +18,7 @@
*/
function xajax_redirect(&$anon_account)
{
$response = new egw_json_response();
$response = egw_json_response::get();
$response->redirect($GLOBALS['egw_info']['server']['webserver_url'].'/login.php?cd=10', true);
$response->printOutput();
@ -39,7 +39,7 @@ function ajax_exception_handler(Exception $e)
{
_egw_log_exception($e,$message);
}
$response = new egw_json_response();
$response = egw_json_response::get();
$message .= ($message ? "\n\n" : '').$e->getMessage();
// only show trace (incl. function arguments) if explicitly enabled, eg. on a development system

View File

@ -183,6 +183,14 @@ class egw_json_response
*/
private static $response = null;
/**
* Force use of singleton: $response = egw_json_response::get();
*/
private function __construct()
{
}
/**
* Singelton for class
*