diff --git a/admin/inc/class.uiconfig.inc.php b/admin/inc/class.uiconfig.inc.php index 49176c8e02..a2be0f5dc3 100644 --- a/admin/inc/class.uiconfig.inc.php +++ b/admin/inc/class.uiconfig.inc.php @@ -40,10 +40,6 @@ class uiconfig { egw::redirect_link('/index.php'); } - $referer = $_POST['submit'] || $_POST['save'] || $_POST['apply'] || $_POST['cancel'] ? $_POST['referer'] : - common::get_referer('/admin/index.php',$_POST['referer']); - list(,$show_app) = explode('/',$referer); - if (!$show_app) $show_app = 'admin'; // load the translations of the app we show too, so they dont need to be in admin! if ($_appname != 'admin') @@ -111,7 +107,7 @@ class uiconfig $c->read_repository(); if ($_POST['cancel'] || ($_POST['submit'] || $_POST['save'] || $_POST['apply']) && $GLOBALS['egw']->acl->check('site_config_access',2,'admin')) { - egw::redirect_link($referer); + egw::redirect_link('/admin/index.php?ajax=true'); } if ($_POST['submit'] || $_POST['save'] || $_POST['apply']) @@ -157,7 +153,7 @@ class uiconfig if(!$errors && !$_POST['apply']) { egw_framework::message(lang('Configuration saved.'), 'success'); - egw::redirect_link($referer); + egw::redirect_link('/admin/index.php', null, 'admin'); } } @@ -178,8 +174,7 @@ class uiconfig $t->set_var('th_text', $GLOBALS['egw_info']['theme']['th_text']); $t->set_var('row_on', $GLOBALS['egw_info']['theme']['row_on']); $t->set_var('row_off', $GLOBALS['egw_info']['theme']['row_off']); - $t->set_var('hidden_vars', html::input_hidden('referer', $referer). - html::input_hidden('csrf_token', egw_csrf::token(__CLASS__))); + $t->set_var('hidden_vars', html::input_hidden('csrf_token', egw_csrf::token(__CLASS__))); $vars = $t->get_undefined('body'); diff --git a/admin/index.php b/admin/index.php index b0f90213fa..dba553f598 100755 --- a/admin/index.php +++ b/admin/index.php @@ -3,12 +3,14 @@ * EGgroupware administration * * @link http://www.egroupware.org - * @author Joseph Engo - * @author Stephen Brown distribute admin across the application directories * @package admin * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @version $Id$ */ -header('Location: ../index.php?menuaction=admin.admin_ui.index&ajax=true'. - (isset($_GET['sessionid']) ? '&sessionid='.$_GET['sessionid'].'&kp3='.$_GET['kp3'] : '')); +// redirect to admin with a meta-refresh, so admin/js/app.js can intercept, if loaded +echo ' + + + +'; diff --git a/admin/js/app.js b/admin/js/app.js index b64ed2a845..e2f5d938f2 100644 --- a/admin/js/app.js +++ b/admin/js/app.js @@ -87,6 +87,11 @@ app.classes.admin = AppJS.extend( var self = this; jQuery(iframe.getDOMNode()).off('load.admin') .bind('load.admin', function(){ + if (this.contentDocument.location.href.match(/(\/admin\/|\/admin\/index.php|menuaction=admin.admin_ui.index)/)) + { + this.contentDocument.location.href = 'about:blank'; // stops redirect from admin/index.php + self.load(); // load own top-level index aka user-list + } self._hide_navbar.call(self); } ); @@ -115,6 +120,8 @@ app.classes.admin = AppJS.extend( else { this.egw.app_header(''); + // blank iframe, to not keep something running there + this.iframe.getDOMNode().contentDocument.location.href = 'about:blank'; } this.iframe.set_disabled(!_url); this.nm.set_disabled(!!_url); @@ -160,6 +167,12 @@ app.classes.admin = AppJS.extend( return false; // --> no regular refresh } } + // not a user or group, eg. categories + else if (!_id) + { + this.load(); + return false; // --> no regular refresh needed + } } }, diff --git a/infolog/inc/class.infolog_customfields.inc.php b/infolog/inc/class.infolog_customfields.inc.php index 258378340a..3c0a270ea8 100644 --- a/infolog/inc/class.infolog_customfields.inc.php +++ b/infolog/inc/class.infolog_customfields.inc.php @@ -5,7 +5,7 @@ * @link http://www.egroupware.org * @author Ralf Becker * @package infolog - * @copyright (c) 2003-6 by Ralf Becker + * @copyright (c) 2003-14 by Ralf Becker * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @version $Id$ */ @@ -87,12 +87,9 @@ class infolog_customfields { break; } + // fall through case 'cancel': - $GLOBALS['egw']->redirect_link('/index.php',array( - 'menuaction' => 'infolog.infolog_ui.index', - 'ajax' => 'true', - )); - exit; + egw::redirect_link('/admin/index.php', null, 'admin'); } } else diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index 96c0dc7ea2..9272307cc6 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -2386,10 +2386,7 @@ class infolog_ui if($button == 'save' || $button == 'cancel') { - egw::redirect_link('/index.php',array( - 'menuaction' => 'infolog.infolog_ui.index', - 'ajax' => 'true', - )); + egw::redirect_link('/admin/index.php', null, 'admin'); } } else