mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix load of conf when using alternative $db
This commit is contained in:
parent
12d591b848
commit
2fd47615eb
|
|
@ -173,7 +173,7 @@ class Conf
|
|||
{
|
||||
dol_syslog(get_class($this)."::setValues");
|
||||
|
||||
if (!defined('NOREQUIREDB')) {
|
||||
if (!is_null($db) && is_object($db)) {
|
||||
// Define all global constants into $this->global->key=value
|
||||
$sql = "SELECT ".$db->decrypt('name')." as name,";
|
||||
$sql .= " ".$db->decrypt('value')." as value, entity";
|
||||
|
|
|
|||
|
|
@ -133,6 +133,7 @@ if (!defined('NOREQUIRETRAN')) {
|
|||
/*
|
||||
* Object $db
|
||||
*/
|
||||
$db = null;
|
||||
if (!defined('NOREQUIREDB')) {
|
||||
$db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, $conf->db->port);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user