diff --git a/html/setup.php b/html/setup.php
index 1f3796712c58d912a3aa9f2be8c2fb69b775a972..e37452c06c6883aa017ad18a56a64e5eea1054bd 100644 (file)
--- a/html/setup.php
+++ b/html/setup.php
require_once("../setup/class_setup.inc");
require_once("../setup/class_setupStep.inc");
require_once("../setup/class_setup.inc");
require_once("../setup/class_setupStep.inc");
-require_once("../setup/class_setupStep1.inc");
-require_once("../setup/class_setupStep2.inc");
-require_once("../setup/class_setupStep3.inc");
-require_once("../setup/class_setupStep4.inc");
-require_once("../setup/class_setupStep5.inc");
-require_once("../setup/class_setupStep6.inc");
-require_once("../setup/class_setupStep7.inc");
+require_once("../setup/class_setupStep_Welcome.inc");
+require_once("../setup/class_setupStep_Language.inc");
+require_once("../setup/class_setupStep_Checks.inc");
+require_once("../setup/class_setupStep_License.inc");
+require_once("../setup/class_setupStep_Ldap.inc");
+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");
/* Set header */
/* Set header */
$_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'])){
$_SESSION['lang'] = get_browser_language();
}
/* Get posted language */
if(!isset($_SESSION['lang'])){
$_SESSION['lang'] = get_browser_language();
}
-if(isset($_POST['lang'])){
- $_SESSION['lang'] = $_POST['lang'];
+if(isset($_POST['lang_selected'])){
+ if($_POST['lang_selected'] != ""){
+ $_SESSION['lang'] = $_POST['lang_selected'];
+ }else{
+ $_SESSION['lang'] = get_browser_language();
+ }
}
$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);
@@ -108,9 +121,10 @@ $header= "<!-- headers.tpl-->".$smarty->fetch(get_template_path('setup_headers.t
$smarty->assign("contents" , $display);
$smarty->assign("navigation", $_SESSION['setup']->get_navigation_html());
$smarty->assign("header", $_SESSION['setup']->get_header_html());
$smarty->assign("contents" , $display);
$smarty->assign("navigation", $_SESSION['setup']->get_navigation_html());
$smarty->assign("header", $_SESSION['setup']->get_header_html());
+$smarty->assign("bottom", $_SESSION['setup']->get_bottom_html());
if ($error_collector != ""){
if ($error_collector != ""){
- $smarty->assign("php_errors", $error_collector."</div>");
+ $smarty->assign("php_errors", preg_replace("/%BUGBODY%/",$error_collector_mailto,$error_collector)."</div>");
} else {
$smarty->assign("php_errors", "");
}
} else {
$smarty->assign("php_errors", "");
}
$smarty->assign("errors" , "");
}
$smarty->assign("errors" , "");
}
+$smarty->assign("version",get_gosa_version());
+
echo $header.$smarty->fetch("../setup/setup_frame.tpl");
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
echo $header.$smarty->fetch("../setup/setup_frame.tpl");
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>