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

@ -402,6 +402,17 @@ class CommonObject
return $result; 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);
}
/** /**
* \brief Load properties id_previous and id_next * \brief Load properties id_previous and id_next

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,18 +617,6 @@ 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);
}
/** /**
* *
* *