X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Fhtml%2Flogout.php;h=3dc371e2e147e8f82c1ed2a97b73cddf46fd0679;hb=d304d276784b0675372dcdb402a61bfdd3f8488d;hp=c06a7866e1f5530d07fe632cbea311242fbe4b16;hpb=8e7ac286389669883b1a5684127b6d1e0a63b91f;p=gosa.git diff --git a/gosa-core/html/logout.php b/gosa-core/html/logout.php index c06a7866e..3dc371e2e 100644 --- a/gosa-core/html/logout.php +++ b/gosa-core/html/logout.php @@ -1,21 +1,23 @@ dn); @@ -57,7 +60,7 @@ $GLOBALS['t_gettext_message_dir'] = $BASE_DIR.'/locale/'; /* Set the text domain as 'messages' */ $domain = 'messages'; -bindtextdomain($domain, "$BASE_DIR/locale"); +bindtextdomain($domain, LOCALE_DIR); textdomain($domain); /* Create smarty & Set template compile directory */ @@ -73,19 +76,19 @@ if (isset ($config->data['MAIN']['COMPILE'])){ if (isset($_GET['request'])){ /* destroy old session */ - @session_unset (); - @session_destroy (); + 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