X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=install%2Fsave.php;h=e832d87a8ae28d25c1028594a2f146ee5babad01;hb=da0f29ef8eb73e7a3cf6484af8fd04726e0e5ef1;hp=1396d806fb169bdd5b09a9e7847755d6adef9c4d;hpb=63ac6425e9e925da331083f83706cfa34fe853d4;p=fa-stable.git diff --git a/install/save.php b/install/save.php index 1396d806..e832d87a 100644 --- a/install/save.php +++ b/install/save.php @@ -21,6 +21,11 @@ if(!defined('SESSION_STARTED')) define('SESSION_STARTED', true); } +if (!function_exists("_")) { + function _($msg) { + return $msg; + } +} // Installer version of display_error function. // function display_error($message) @@ -338,14 +343,6 @@ $def_coy = $id; $config_filename = $path_to_root . '/config_db.php'; -$err = write_config_db($table_prefix != ""); -if ($err == -1) - display_error("Cannot open the configuration file ($config_filename)"); -else if ($err == -2) - display_error("Cannot write to the configuration file ($config_filename)"); -else if ($err == -3) - display_error("The configuration file $config_filename is not writable. Change its permissions so it is, then re-run step 4."); - // Try connecting to database $db = mysql_connect($database_host, $database_username, $database_password); @@ -354,6 +351,14 @@ if (!$db) display_error('Database host name, username and/or password incorrect. MySQL Error:
'.mysql_error()); } +$err = write_config_db($table_prefix != ""); +if ($err == -1) + display_error("Cannot open the configuration file ($config_filename)"); +else if ($err == -2) + display_error("Cannot write to the configuration file ($config_filename)"); +else if ($err == -3) + display_error("The configuration file $config_filename is not writable. Change its permissions so it is, then re-run step 4."); + if($install_tables == true) { if (!mysql_select_db($database_name, $db))