From 5072e1652ad91ec19f4835412ee87241a38181d8 Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 24 Jul 2008 10:55:44 +0000 Subject: [PATCH] Updated index and logout git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11999 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/html/index.php | 4 ++-- gosa-core/html/logout.php | 13 ++++--------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/gosa-core/html/index.php b/gosa-core/html/index.php index 9b289caab..2c17abef8 100644 --- a/gosa-core/html/index.php +++ b/gosa-core/html/index.php @@ -286,11 +286,11 @@ if (($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['login'])) || $htacces } /* Check for locking area */ - $ldap->cat($config->current['CONFIG'], array("dn")); + $ldap->cat($config->get_cfg_value("config"), array("dn")); $attrs= $ldap->fetch(); if (!count ($attrs)){ $ldap->cd($config->current['BASE']); - $ldap->create_missing_trees($config->current['CONFIG']); + $ldap->create_missing_trees($config->get_cfg_value("config")); } /* Check for valid input */ diff --git a/gosa-core/html/logout.php b/gosa-core/html/logout.php index 3dc371e2e..b54fea5f0 100644 --- a/gosa-core/html/logout.php +++ b/gosa-core/html/logout.php @@ -45,10 +45,10 @@ if(session::is_set('ui')){ } /* Language setup */ -if ((!isset($config))||(empty($config->data['MAIN']['LANG']))){ +if ((!isset($config)) || $config->get_cfg_value("lang") == ""){ $lang= get_browser_language(); } else { - $lang= $config->data['MAIN']['LANG']; + $lang= $config->get_cfg_value("lang"); } $lang.=".UTF-8"; @@ -65,12 +65,7 @@ textdomain($domain); /* Create smarty & Set template compile directory */ $smarty= new smarty(); -if (isset ($config->data['MAIN']['COMPILE'])){ - $smarty->compile_dir= $config->data['MAIN']['COMPILE']; -} else { - $smarty->compile_dir= '/var/spool/gosa/'; -} - +$smarty->compile_dir= $config->get_cfg_value("compile", '/var/spool/gosa/'); /* If GET request is posted, the logout was forced by pressing the link */ if (isset($_GET['request'])){ @@ -79,7 +74,7 @@ if (isset($_GET['request'])){ session::destroy (); /* If we're not using htaccess authentication, just redirect... */ - if (isset($config->data['MAIN']['HTACCESS_AUTH']) && preg_match('/^(true|yes)$/i', $config->data['MAIN']['HTACCESS_AUTH'])){ + if ($config->get_cfg_value("htaccess_auth") == "true"){ /* Else notice that the user has to close the browser... */ $smarty->display (get_template_path('headers.tpl')); -- 2.30.2