X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=install%2Findex.php;h=e9e0ef59630379763a9f41588f8940940f3f7c9d;hb=8638cffdf5eb106d2c9a6f8ee68b9f91427ace2f;hp=590b5b4d0672d7a16d225f923bd8602ac6ad994f;hpb=c128e08aea1e33a74bf918578013998a4d8b5c36;p=fa-stable.git diff --git a/install/index.php b/install/index.php index 590b5b4d..e9e0ef59 100644 --- a/install/index.php +++ b/install/index.php @@ -127,7 +127,7 @@ function install_connect_db() { function do_install() { - global $path_to_root, $db_connections, $def_coy, $installed_extensions, + global $path_to_root, $db_connections, $def_coy, $installed_extensions, $tb_pref_counter, $dflt_lang, $installed_languages; $coa = $_SESSION['inst_set']['coa']; @@ -150,9 +150,10 @@ function do_install() { update_company_prefs(array('coy_name'=>$con['name'])); $admin = get_user_by_login('admin'); -// update_admin_password($con, md5($con['pass'])); - update_user_prefs($admin['id'], array('language' => $_POST['lang'], - 'password' => md5($con['pass']))); + update_user_prefs($admin['id'], array( + 'language' => $con['lang'], + 'password' => md5($con['pass']), + 'user_id' => $con['admin'])); if (!copy($path_to_root. "/config.default.php", $path_to_root. "/config.php")) { display_error(_("Cannot save system configuration file 'config.php'.")); @@ -176,7 +177,7 @@ function do_install() { $dflt_lang = $_POST['lang']; write_lang(); if (!isset($installed_extensions)) - write_extensions(array()); + update_extensions(array()); return true; } return false; @@ -386,7 +387,8 @@ start_form(); case '6': // final screen subpage_title(_('FrontAccounting ERP has been installed successsfully.')); display_note(_('Please do not forget to remove install wizard folder.')); - $install_done = true; + session_unset(); + session_destroy(); hyperlink_no_params($path_to_root.'/index.php', _('Click here to start.')); break;