X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=html%2Fsetup.php;h=d681cacf063f872a86ff2c7263fc6b1cc994b80e;hb=45037b88d126d22d0fe9af9b4bd2205b81edce82;hp=52f528b38b1fc285dbc4855a89959338f119c36e;hpb=1d999bc19312a3748d2b99f3df3ee9c4cc5f2479;p=gosa.git diff --git a/html/setup.php b/html/setup.php index 52f528b38..d681cacf0 100644 --- a/html/setup.php +++ b/html/setup.php @@ -36,6 +36,8 @@ require_once("../setup/class_setupStep_Config1.inc"); require_once("../setup/class_setupStep_Config2.inc"); require_once("../setup/class_setupStep_Config3.inc"); require_once("../setup/class_setupStep_Schema.inc"); +require_once("../setup/class_setupStep_Migrate.inc"); +require_once("../setup/class_setupStep_Feedback.inc"); require_once("../setup/class_setupStep_Finish.inc"); @@ -68,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))){ + msg_dialog::display(_("Smarty"),sprintf(_("Directory '%s' specified as compile directory is not accessible!"), + $smarty->compile_dir),FATAL_ERROR_DIALOG); + exit(); +} /* Get posted language */ if(!isset($_SESSION['lang'])){ @@ -89,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); @@ -118,7 +124,7 @@ $smarty->assign("header", $_SESSION['setup']->get_header_html()); $smarty->assign("bottom", $_SESSION['setup']->get_bottom_html()); if ($error_collector != ""){ - $smarty->assign("php_errors", $error_collector.""); + $smarty->assign("php_errors", preg_replace("/%BUGBODY%/",$error_collector_mailto,$error_collector).""); } else { $smarty->assign("php_errors", ""); }