From d8983b6cd1c92d07c1728986c97896636f303e14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20St=C3=B6ckel?= Date: Fri, 11 Jun 2010 11:41:12 +0000 Subject: [PATCH] Added wrapper for xajax.addScriptCall(), added ?cd=10 to json.php response again --- json.php | 2 +- phpgwapi/inc/class.egw_json.inc.php | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/json.php b/json.php index 6829791743..4cb94d984e 100644 --- a/json.php +++ b/json.php @@ -19,7 +19,7 @@ function xajax_redirect(&$anon_account) { $response = new egw_json_response(); - $response->redirect($GLOBALS['egw_info']['server']['webserver_url'].'/login.php', true); + $response->redirect($GLOBALS['egw_info']['server']['webserver_url'].'/login.php?cd=10', true); $response->printOutput(); common::egw_exit(); diff --git a/phpgwapi/inc/class.egw_json.inc.php b/phpgwapi/inc/class.egw_json.inc.php index f740927730..445f38ee1b 100644 --- a/phpgwapi/inc/class.egw_json.inc.php +++ b/phpgwapi/inc/class.egw_json.inc.php @@ -54,7 +54,7 @@ class egw_json_request //Call the supplied callback function along with the menuaction and the passed parameters $this->handleRequest($menuaction, $parameters); } - } + } return NULL; } @@ -382,6 +382,14 @@ class xajaxResponse extends egw_json_response $this->redirect($url); } + public function addScriptCall($func) + { + $args = func_get_args(); + $func = array_shift($args); + + $this->script("$func(".implode(",", $args).");"); + } + public function getXML() { return '';