Some formatting
Die if installer.php fails to create password file
Update target counts after importing eChecklist and CKL
This commit is contained in:
2018-10-25 17:48:57 -04:00
parent d43775b26f
commit 7f2f6a9046
8 changed files with 26 additions and 11 deletions

View File

@ -181,7 +181,9 @@ function save_Database($params)
* CREATE DB PASSWORD FILE
* --------------------------------- */
$enc_pwd = my_encrypt($params['web-pwd']);
file_put_contents(DOC_ROOT . "/" . PWD_FILE, $enc_pwd);
if(!file_put_contents(DOC_ROOT . "/" . PWD_FILE, $enc_pwd)) {
die(json_encode(['error' => "Could not create the password file"]));
}
if (isset($params['conf-root-pwd']) && $params['conf-root-pwd'] == $params['root-pwd']) {
$db = new mysqli(DB_SERVER, $params['root-uname'], '', 'mysql');