From 08d7b9c82fdcdb51af43ca6a56bc7b5109a97136 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 17 Jul 2015 06:29:22 +0000 Subject: [PATCH] replace previous logout code with cd=1 "You have been successfully logged out" --- logout.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/logout.php b/logout.php index 6c45d62d12..e21abfbc52 100755 --- a/logout.php +++ b/logout.php @@ -26,10 +26,14 @@ $GLOBALS['kp3'] = egw_session::get_request('kp3'); $verified = $GLOBALS['egw']->session->verify(); -if(!$redirectTarget = $GLOBALS['egw']->session->appsession('referer', 'login')) +if(!($redirectTarget = $GLOBALS['egw']->session->appsession('referer', 'login'))) { $redirectTarget = $GLOBALS['egw_info']['server']['webserver_url'].'/login.php?cd=1&domain='.$GLOBALS['egw_info']['user']['domain']; } +elseif(strpos($redirectTarget, '[?&]cd=') !== false) +{ + $redirectTarget = preg_replace('/([?&])cd=[^&]+/', '$1cd=1', $redirectTarget); +} if($verified) {