Code

Added ie workarround check
[gosa.git] / gosa-core / html / logout.php
index b54fea5f0f7a709ea16b37a8cac32c84aebdba20..d5ef67d4af9902a5d05488eed40293c94df3ec84 100644 (file)
@@ -29,13 +29,13 @@ header("Content-type: text/html; charset=UTF-8");
   if the old session is still available */
 @session::start();
 session::set('errorsAlreadyPosted',array());
-if(session::is_set('ui')){
+if(session::global_is_set('ui')){
   
   /* Get config & ui informations */
-  $ui= session::get("ui");
+  $ui= session::global_get("ui");
   
   /* config used for del_user_locks & some lines below to detect the language */  
-  $config= session::get("config");
+  $config= session::global_get("config");
 
   /* Remove all locks of this user */
   del_user_locks($ui->dn);
@@ -45,13 +45,12 @@ if(session::is_set('ui')){
 }
 
 /* Language setup */
-if ((!isset($config)) || $config->get_cfg_value("lang") == ""){
+if ((!isset($config)) || $config->get_cfg_value("language") == ""){
   $lang= get_browser_language();
 } else {
-  $lang= $config->get_cfg_value("lang");
+  $lang= $config->get_cfg_value("language");
 }
 
-$lang.=".UTF-8";
 putenv("LANGUAGE=");
 putenv("LANG=$lang");
 setlocale(LC_ALL, $lang);
@@ -65,7 +64,11 @@ textdomain($domain);
 
 /* Create smarty & Set template compile directory */
 $smarty= new smarty();
-$smarty->compile_dir= $config->get_cfg_value("compile", '/var/spool/gosa/');
+if (isset($config)){
+       $smarty->compile_dir= $config->get_cfg_value("compile", '/var/spool/gosa/');
+} else {
+       $smarty->compile_dir= '/var/spool/gosa/';
+}
     
 /* If GET request is posted, the logout was forced by pressing the link */
 if (isset($_GET['request'])){
@@ -74,9 +77,10 @@ if (isset($_GET['request'])){
   session::destroy ();
   
   /* If we're not using htaccess authentication, just redirect... */
-  if ($config->get_cfg_value("htaccess_auth") == "true"){
+  if (isset($config) && $config->get_cfg_value("htaccessAuthentication") == "true"){
 
     /* Else notice that the user has to close the browser... */
+    $smarty->assign("iePngWorkaround", FALSE);
     $smarty->display (get_template_path('headers.tpl'));
     $smarty->display (get_template_path('logout-close.tpl'));
     exit;