Removed innecesary test

This commit is contained in:
Marcos García de La Fuente 2015-05-25 14:01:15 +02:00
parent 9ebae9520a
commit 8627f2f19b

View File

@ -472,7 +472,7 @@ class Categorie extends CommonObject
* Link an object to the category
*
* @param Object $obj Object to link to category
* @param string $type Type of category ('societe', 'member', 'customer', 'supplier', 'product', 'contact')
* @param string $type Type of category ('societe', 'member', 'product', 'contact', 'fournisseur)
* @return int 1 : OK, -1 : erreur SQL, -2 : id not defined, -3 : Already linked
*/
function add_type($obj,$type)
@ -485,8 +485,8 @@ class Categorie extends CommonObject
// For backward compatibility
if ($type == 'company') $type='societe';
if ($type == 'customer') $type='societe';
if ($type == 'supplier') $type='fournisseur';
elseif ($type == 'customer') $type='societe';
elseif ($type == 'supplier') $type='fournisseur';
/**
* llx_categorie_contact => fk_socpeople
@ -496,7 +496,7 @@ class Categorie extends CommonObject
*/
if ($type == 'contact') {
$column_name = 'socpeople';
} elseif ($type == 'supplier' || ($type == 'societe')) {
} elseif ($type == 'fournisseur' || ($type == 'societe')) {
$column_name = 'soc';
} else {
$column_name = 'type';