fix compability

This commit is contained in:
Ibnu Maksum 2024-07-29 16:19:43 +07:00
parent 50b4db1723
commit 8e1d608e5f
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
2 changed files with 7 additions and 3 deletions

View File

@ -67,11 +67,11 @@ require_once $root_path . File::pathFixer('system/orm.php');
require_once $root_path . File::pathFixer('system/autoload/PEAR2/Autoload.php'); require_once $root_path . File::pathFixer('system/autoload/PEAR2/Autoload.php');
include $root_path . File::pathFixer('system/autoload/Hookers.php'); include $root_path . File::pathFixer('system/autoload/Hookers.php');
if(!empty($db_password)){ if($db_password != null && ($db_pass == null || empty($db_pass))){
// compability for old version // compability for old version
$db_pass = $db_password; $db_pass = $db_password;
} }
if(!empty($db_pass)){ if($db_pass != null){
// compability for old version // compability for old version
$db_password = $db_pass; $db_password = $db_pass;
} }

View File

@ -8,6 +8,11 @@
session_start(); session_start();
include "config.php"; include "config.php";
if($db_password != null && ($db_pass == null || empty($db_pass))){
// compability for old version
$db_pass = $db_password;
}
if (empty($update_url)) { if (empty($update_url)) {
$update_url = 'https://github.com/hotspotbilling/phpnuxbill/archive/refs/heads/master.zip'; $update_url = 'https://github.com/hotspotbilling/phpnuxbill/archive/refs/heads/master.zip';
} }
@ -100,7 +105,6 @@ if (empty($step)) {
} }
} else if ($step == 4) { } else if ($step == 4) {
if (file_exists("system/updates.json")) { if (file_exists("system/updates.json")) {
require 'config.php';
$db = new pdo( $db = new pdo(
"mysql:host=$db_host;dbname=$db_name", "mysql:host=$db_host;dbname=$db_name",
$db_user, $db_user,