X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=html%2Fsetup.php;h=e37452c06c6883aa017ad18a56a64e5eea1054bd;hb=648eb5a4ac1728572ee349e3e58243fddf51fa1f;hp=06164aa001de834fed06b04d9f97f7b4463ab10a;hpb=41fd4a4b7ce9abec36b49cc8fcc80758bbf1d30c;p=gosa.git diff --git a/html/setup.php b/html/setup.php index 06164aa00..e37452c06 100644 --- a/html/setup.php +++ b/html/setup.php @@ -70,13 +70,14 @@ $_SESSION['errorsAlreadyPosted']= array(); $_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'])){ @@ -91,7 +92,10 @@ if(isset($_POST['lang_selected'])){ } $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);