Qual: big uniformize code

This commit is contained in:
Regis Houssin
2010-09-09 14:06:15 +00:00
parent b5c174a134
commit 9664f0af5f
29 changed files with 402 additions and 463 deletions

View File

@@ -499,15 +499,15 @@ class CommonObject
}
/**
* \brief Read linked document
* Read linked origin object
*/
function fetch_object()
function fetch_origin()
{
$object = $this->origin;
// TODO uniformise code
if ($object == 'shipping') $object = 'expedition';
if ($object == 'delivery') $object = 'livraison';
if ($this->origin == 'shipping') $this->origin = 'expedition';
if ($this->origin == 'delivery') $this->origin = 'livraison';
$object = $this->origin;
$classname = ucfirst($object);
$this->$object = new $classname($this->db);