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");
|
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
|
// Define all global constants into $this->global->key=value
|
||||||
$sql = "SELECT ".$db->decrypt('name')." as name,";
|
$sql = "SELECT ".$db->decrypt('name')." as name,";
|
||||||
$sql .= " ".$db->decrypt('value')." as value, entity";
|
$sql .= " ".$db->decrypt('value')." as value, entity";
|
||||||
|
|||||||
@ -133,6 +133,7 @@ if (!defined('NOREQUIRETRAN')) {
|
|||||||
/*
|
/*
|
||||||
* Object $db
|
* Object $db
|
||||||
*/
|
*/
|
||||||
|
$db = null;
|
||||||
if (!defined('NOREQUIREDB')) {
|
if (!defined('NOREQUIREDB')) {
|
||||||
$db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, $conf->db->port);
|
$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