X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=install%2Fsave.php;h=b11263a3e3d2836ac75ae25fa4d495e9ecaeb1e8;hb=967f3b0f52a7f6e4afedea35bf2303414a41022f;hp=30d2fa5f9ce5158188a7403f636d6111427c4cb8;hpb=7b771debfad8969c0bb64ada9d248b4a6b219409;p=fa-stable.git diff --git a/install/save.php b/install/save.php index 30d2fa5f..b11263a3 100644 --- a/install/save.php +++ b/install/save.php @@ -1,13 +1,10 @@ . + This installer is based on code from the + Website Baker Project + Copyright (C) 2004-2007, Ryan Djurovich. + The code is released under GPLv3 + modified by FrontAcounting, LLC. ***********************************************************************/ error_reporting(E_ALL); ini_set("display_errors", "On"); @@ -298,9 +295,33 @@ if ($admin_password != $admin_repassword) } // End admin user details code +if (!file_exists($path_to_root . "/config.php")) { + copy($path_to_root. "/config.default.php", $path_to_root. "/config.php"); +} + include_once($path_to_root . "/includes/db/connect_db.inc"); include_once($path_to_root . "/admin/db/maintenance_db.inc"); -include_once($path_to_root . "/config_db.php"); + +if (!file_exists($path_to_root . "/installed_extensions.php")) { + $next_extension_id = 1; + write_extensions(array()); + write_extensions(array(),0); +} +if (!file_exists($path_to_root . "/lang/installed_languages.inc")) { + $installed_languages = array ( + 0 => array ('code' => 'en_GB', 'name' => 'English', 'encoding' => 'iso-8859-1')); + $dflt_lang = 'en_GB'; + write_lang(); +} + +if (file_exists($path_to_root . "/config_db.php")) + include_once($path_to_root . "/config_db.php"); + else +{ + $def_coy = 0; + $tb_pref_counter = 0; + $db_connections = array (); +} $id = count($db_connections); if ($table_prefix != "" && $id > 0) @@ -363,7 +384,6 @@ if (!$db) session_unset(); session_destroy(); $_SESSION = array(); - header("Location: ".$path_to_root."/index.php"); exit();