mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 17:04:14 +01:00
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:
parent
d8984be747
commit
38798b872d
4
json.php
4
json.php
@ -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
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user