diff --git a/html/setup.php b/html/setup.php
index 8e9220e6b7c49c05c051baf58bb6f7ffc1f10e27..e37452c06c6883aa017ad18a56a64e5eea1054bd 100644 (file)
--- a/html/setup.php
+++ b/html/setup.php
/* Get standard functions */
require_once ("../include/php_setup.inc");
require_once ("functions.inc");
/* Get standard functions */
require_once ("../include/php_setup.inc");
require_once ("functions.inc");
-require_once ("class_timezones.inc");
require_once("../setup/class_setup.inc");
require_once("../setup/class_setupStep.inc");
require_once("../setup/class_setup.inc");
require_once("../setup/class_setupStep.inc");
$_SESSION['LastError'] = "";
/* Set template compile directory */
$_SESSION['LastError'] = "";
/* Set template compile directory */
-if (isset ($config->data['MAIN']['COMPILE'])){
- $smarty->compile_dir= $config->data['MAIN']['COMPILE'];
-} else {
- $smarty->compile_dir= '/var/spool/gosa/';
-}
-
+$smarty->compile_dir= '/var/spool/gosa/';
+/* Check for compile directory */
+if (!(is_dir($smarty->compile_dir) && is_writable($smarty->compile_dir))){
+ echo sprintf(_("Directory '%s' specified as compile directory is not accessible!"),
+ $smarty->compile_dir);
+ exit();
+}
/* Get posted language */
if(!isset($_SESSION['lang'])){
/* Get posted language */
if(!isset($_SESSION['lang'])){
}
$lang = $_SESSION['lang'];
}
$lang = $_SESSION['lang'];
-$lang.=".UTF-8";
+/* Append .UTF-8 to language string if necessary */
+if(!preg_match("/utf(-)8$/i",$lang)){
+ $lang .= ".UTF-8";
+}
putenv("LANGUAGE=");
putenv("LANG=$lang");
setlocale(LC_ALL, $lang);
putenv("LANGUAGE=");
putenv("LANG=$lang");
setlocale(LC_ALL, $lang);