forked from Wavyzz/dolibarr
Fix deprecated code
This commit is contained in:
@@ -766,12 +766,10 @@ class Categorie extends CommonObject
|
||||
// For backward compatibility
|
||||
if ($type == 'societe') {
|
||||
$type = 'customer';
|
||||
dol_syslog( get_class( $this ) . "::del_type(): type 'societe' is deprecated, please use 'customer' instead",
|
||||
LOG_WARNING );
|
||||
dol_syslog( get_class( $this ) . "::del_type(): type 'societe' is deprecated, please use 'customer' instead", LOG_WARNING);
|
||||
} elseif ($type == 'fournisseur') {
|
||||
$type = 'supplier';
|
||||
dol_syslog( get_class( $this ) . "::del_type(): type 'fournisseur' is deprecated, please use 'supplier' instead",
|
||||
LOG_WARNING );
|
||||
dol_syslog( get_class( $this ) . "::del_type(): type 'fournisseur' is deprecated, please use 'supplier' instead", LOG_WARNING);
|
||||
}
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@@ -88,13 +88,13 @@ if ($id > 0 && $removeelem > 0)
|
||||
{
|
||||
$tmpobject = new Societe($db);
|
||||
$result = $tmpobject->fetch($removeelem);
|
||||
$elementtype = 'fournisseur';
|
||||
$elementtype = 'supplier';
|
||||
}
|
||||
else if ($type == Categorie::TYPE_CUSTOMER && $user->rights->societe->creer)
|
||||
{
|
||||
$tmpobject = new Societe($db);
|
||||
$result = $tmpobject->fetch($removeelem);
|
||||
$elementtype = 'societe';
|
||||
$elementtype = 'customer';
|
||||
}
|
||||
else if ($type == Categorie::TYPE_MEMBER && $user->rights->adherent->creer)
|
||||
{
|
||||
|
||||
@@ -1463,11 +1463,11 @@ class Societe extends CommonObject
|
||||
// Fill $toute_categs array with an array of (type => array of ("Categorie" instance))
|
||||
if ($this->client || $this->prospect)
|
||||
{
|
||||
$toute_categs['societe'] = $static_cat->containing($this->id,Categorie::TYPE_CUSTOMER);
|
||||
$toute_categs['customer'] = $static_cat->containing($this->id,Categorie::TYPE_CUSTOMER);
|
||||
}
|
||||
if ($this->fournisseur)
|
||||
{
|
||||
$toute_categs['fournisseur'] = $static_cat->containing($this->id,Categorie::TYPE_SUPPLIER);
|
||||
$toute_categs['supplier'] = $static_cat->containing($this->id,Categorie::TYPE_SUPPLIER);
|
||||
}
|
||||
|
||||
// Remove each "Categorie"
|
||||
|
||||
Reference in New Issue
Block a user