From a529fe305d073e30e1539e891b1975bb8744fa4c Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 2 Jan 2008 11:40:51 +0000 Subject: [PATCH] Updated logout to recognize htaccess option git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8171 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/html/logout.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gosa-core/html/logout.php b/gosa-core/html/logout.php index c06a7866e..fef58fb1b 100644 --- a/gosa-core/html/logout.php +++ b/gosa-core/html/logout.php @@ -77,15 +77,16 @@ if (isset($_GET['request'])){ @session_destroy (); /* If we're not using htaccess authentication, just redirect... */ - if (!isset($config->data['MAIN']['HTACCESS_AUTH']) && !isset($_SERVER['REMOTE_USER'])){ - header ("Location: index.php"); - exit(); + if (isset($config->data['MAIN']['HTACCESS_AUTH']) && preg_match('/^(true|yes)$/i', $config->data['MAIN']['HTACCESS_AUTH'])){ + + /* Else notice that the user has to close the browser... */ + $smarty->display (get_template_path('headers.tpl')); + $smarty->display (get_template_path('logout-close.tpl')); + exit; } - /* Else notice that the user has to close the browser... */ - $smarty->display (get_template_path('headers.tpl')); - $smarty->display (get_template_path('logout-close.tpl')); - exit; + header ("Location: index.php"); + exit(); }else{ // The logout wasn't forced, so the session is invalid -- 2.30.2