Fix: add code mutualized

This commit is contained in:
Regis Houssin 2009-12-15 10:39:22 +00:00
parent db9e81f571
commit 068bc748a8
3 changed files with 12 additions and 26 deletions

View File

@ -401,6 +401,17 @@ class CommonObject
$this->adresse = $adresse;
return $result;
}
/**
* \brief Read linked document
*/
function fetch_object()
{
$object = $this->origin;
$class = ucfirst($object);
$this->$object = new $class($this->db);
$this->$object->fetch($this->origin_id);
}
/**

View File

@ -624,19 +624,6 @@ class Expedition extends CommonObject
}
}
/**
* Lit le document associe
*
*/
function fetch_object()
{
$object = $this->origin;
$class = ucfirst($object);
$this->$object = new $class($this->db);
$this->$object->fetch($this->origin_id);
}
/**
*
*

View File

@ -617,19 +617,7 @@ class Livraison extends CommonObject
}
}
/**
* \brief Read linked document
*/
function fetch_object()
{
$object = $this->origin;
$class = ucfirst($this->origin);
$this->$object = new $class($this->db);
$this->$object->fetch($this->origin_id);
}
/**
/**
*
*
*/