X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=html%2Fsetup.php;h=623394b1a5587758ba7df906583d0860e1ade9ec;hb=0159adcf213142c3c728cdb86e97f4d1dff2d685;hp=8e9220e6b7c49c05c051baf58bb6f7ffc1f10e27;hpb=63a0a9eb20483a216fd12569b8ec37b71c6fdd44;p=gosa.git diff --git a/html/setup.php b/html/setup.php index 8e9220e6b..623394b1a 100644 --- a/html/setup.php +++ b/html/setup.php @@ -71,13 +71,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'])){ @@ -92,7 +93,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);