From fb37282a2c40fa13f7a34e838bf272e1f6243412 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 8 Jul 2014 14:15:48 +0000 Subject: [PATCH] Fallback to admin index after save/cancel from edit Custom fields or Site configuration --- admin/inc/class.customfields.inc.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/admin/inc/class.customfields.inc.php b/admin/inc/class.customfields.inc.php index d9c44cf105..37582ed59a 100644 --- a/admin/inc/class.customfields.inc.php +++ b/admin/inc/class.customfields.inc.php @@ -125,12 +125,11 @@ class customfields { break; } + //fall through case 'cancel': - $GLOBALS['egw']->redirect_link($content['referer'] ? $content['referer'] : '/admin/index.php'); - exit; + egw::redirect_link('/admin/index.php', null, 'admin'); } } - $referer = $content['referer']; } else { @@ -140,8 +139,6 @@ class customfields $this->content_type = $content_types[0]; } $content['use_private'] = !isset($_GET['use_private']) || (boolean)$_GET['use_private']; - - $referer = $GLOBALS['egw']->common->get_referer(); } $GLOBALS['egw_info']['flags']['app_header'] = $GLOBALS['egw_info']['apps'][$this->appname]['title'].' - '.lang('Custom fields'); $sel_options = array(); @@ -223,7 +220,6 @@ class customfields $this->tmpl->exec('admin.customfields.edit',$content,$sel_options,$readonlys,array( 'fields' => $preserv_fields, 'appname' => $this->appname, - 'referer' => $referer, 'use_private' => $content['use_private'], )); }