diff --git a/login.php b/login.php index eeb32e670e..8122d81de7 100755 --- a/login.php +++ b/login.php @@ -336,7 +336,10 @@ else else { list($forward,$extra_vars) = explode('?',$forward,2); - $extra_vars .= ($extra_vars ? '&' : '').'cd=yes'; + if (!isset($_GET['suppress_cd'])) + { + $extra_vars .= ($extra_vars ? '&' : '').'cd=yes'; + } } if(strpos($_SERVER['HTTP_REFERER'], $_SERVER['REQUEST_URI']) === false) { diff --git a/phpgwapi/inc/class.egw.inc.php b/phpgwapi/inc/class.egw.inc.php index d55d6d6b92..52470a64a4 100644 --- a/phpgwapi/inc/class.egw.inc.php +++ b/phpgwapi/inc/class.egw.inc.php @@ -338,7 +338,21 @@ class egw extends egw_minimal if ($relpath) $redirect .= 'phpgw_forward='.urlencode($relpath.(!empty($query) ? '?'.$query : '')); //Header('Location: '.$GLOBALS['egw_info']['server']['webserver_url'].$redirect); // do NOT redirect, but set top.location, as this works in framed template too - echo "\n
\n\n"; + $redirect = $GLOBALS['egw_info']['server']['webserver_url'].$redirect; + + echo "\n\n\n\n"; exit; } } diff --git a/phpgwapi/js/egw_json.js b/phpgwapi/js/egw_json.js index f1039fe556..f0961222b0 100644 --- a/phpgwapi/js/egw_json.js +++ b/phpgwapi/js/egw_json.js @@ -312,8 +312,7 @@ egw_json_request.prototype.handleResponse = function(data, textStatus, XMLHttpRe typeof res.data.global == 'boolean') { //Special handling for framework reload - if (res.data.url.indexOf("?cd=10") > 0) - res.data.global = true; + res.data.global |= (res.data.url.indexOf("?cd=10") > 0); if (res.data.global) { diff --git a/phpgwapi/js/jsapi/jsapi.js b/phpgwapi/js/jsapi/jsapi.js index b81cadf693..68fdea4e59 100644 --- a/phpgwapi/js/jsapi/jsapi.js +++ b/phpgwapi/js/jsapi/jsapi.js @@ -97,6 +97,27 @@ function egw_appWindow(_app) return window; } +/** + * Returns the current egw application + * @param string _name is only used for fallback, if an onlder version of jdots is used. + */ +function egw_getApp(_name) +{ + var napp = null; + if (typeof window.frameElement != "undefined" && + window.frameElement != null && + typeof window.frameElement.egw_app != "undefined") + { + napp = window.frameElement.egw_app; + } + else + { + napp = window.parent.framework.getApplicationByName(_name); + } + + return napp; +} + function egw_set_checkbox_multiselect_enabled(_id, _enabled) { //Retrieve the checkbox_multiselect base div diff --git a/phpgwapi/templates/default/login.tpl b/phpgwapi/templates/default/login.tpl index a13e544fe3..d47045cf4b 100644 --- a/phpgwapi/templates/default/login.tpl +++ b/phpgwapi/templates/default/login.tpl @@ -6,7 +6,7 @@