From 81b9a0cf28042064113dfb6cf1dda7e72c2204db Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 9 Dec 2005 08:11:32 +0000 Subject: [PATCH] Fixed bad interaction between language setup and session handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2267 594d385d-05f5-0310-b6e9-bd551577e9d8 --- html/logout.php | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/html/logout.php b/html/logout.php index aae94bc87..684f27c3e 100644 --- a/html/logout.php +++ b/html/logout.php @@ -24,26 +24,25 @@ require_once ("../include/php_setup.inc"); require_once ("functions.inc"); session_start (); -/* Language setup */ -if ($config->data['MAIN']['LANG'] == ""){ - $lang= get_browser_language(); -} else { - $lang= $config->data['MAIN']['LANG']; -} -$lang.=".UTF-8"; -putenv("LANGUAGE="); -putenv("LANG=$lang"); -setlocale(LC_ALL, $lang); -$GLOBALS['t_language']= $lang; -$GLOBALS['t_gettext_message_dir'] = $BASE_DIR.'/locale/'; - -/* Set the text domain as 'messages' */ -$domain = 'messages'; -bindtextdomain($domain, "$BASE_DIR/locale"); -textdomain($domain); - /* Do logout-logging and destroy session */ if (!isset($_SESSION["ui"])){ + /* Language setup */ + if ($config->data['MAIN']['LANG'] == ""){ + $lang= get_browser_language(); + } else { + $lang= $config->data['MAIN']['LANG']; + } + $lang.=".UTF-8"; + putenv("LANGUAGE="); + putenv("LANG=$lang"); + setlocale(LC_ALL, $lang); + $GLOBALS['t_language']= $lang; + $GLOBALS['t_gettext_message_dir'] = $BASE_DIR.'/locale/'; + + /* Set the text domain as 'messages' */ + $domain = 'messages'; + bindtextdomain($domain, "$BASE_DIR/locale"); + textdomain($domain); /* Set template compile directory */ $smarty= new smarty(); -- 2.30.2