Fixed problem with non existing variable $db and removed not used variable $conf

This commit is contained in:
Marcos García de La Fuente 2014-05-02 16:51:25 +02:00
parent 487c610f5a
commit af45ee1bc3

View File

@ -156,8 +156,6 @@ class Societe extends CommonObject
*/ */
public function __construct($db) public function __construct($db)
{ {
global $conf;
$this->db = $db; $this->db = $db;
$this->client = 0; $this->client = 0;
@ -2549,8 +2547,8 @@ class Societe extends CommonObject
{ {
dol_syslog("Your country setup use an old syntax. Reedit it using setup area.", LOG_WARNING); dol_syslog("Your country setup use an old syntax. Reedit it using setup area.", LOG_WARNING);
include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
$country_code=getCountry($country_id,2,$db); // This need a SQL request, but it's the old feature $country_code=getCountry($country_id,2,$this->db); // This need a SQL request, but it's the old feature
$country_label=getCountry($country_id,0,$db); // This need a SQL request, but it's the old feature $country_label=getCountry($country_id,0,$this->db); // This need a SQL request, but it's the old feature
} }
} }
$this->country_id=$country_id; $this->country_id=$country_id;