Code

Fixed bad interaction between language setup and session handling
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 9 Dec 2005 08:11:32 +0000 (08:11 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 9 Dec 2005 08:11:32 +0000 (08:11 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2267 594d385d-05f5-0310-b6e9-bd551577e9d8

html/logout.php

index aae94bc87896b9e950725fc1f0ba0b31ae494671..684f27c3e5544202e27e5a7c6f2857c917f3b336 100644 (file)
@@ -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();