Fix: void warning and uniform code

This commit is contained in:
Regis Houssin 2011-11-10 10:13:44 +01:00
parent 79b9ceda30
commit a5b847f3c4

View File

@ -1356,13 +1356,14 @@ abstract class CommonObject
} }
/** /**
* Fetch array of objects linked to current object. Links are loaded into this->linked_object array. * Fetch array of objects linked to current object. Links are loaded into this->linked_object array.
* *
* @param sourceid * @param int $sourceid Object source id
* @param sourcetype * @param string $sourcetype Object source type
* @param targetid * @param int $targetid Object target id
* @param targettype * @param string $targettype Object target type
* @param clause OR, AND * @param string $clause OR, AND clause
* @return void
*/ */
function fetchObjectLinked($sourceid='',$sourcetype='',$targetid='',$targettype='',$clause='OR') function fetchObjectLinked($sourceid='',$sourcetype='',$targetid='',$targettype='',$clause='OR')
{ {
@ -1436,27 +1437,27 @@ abstract class CommonObject
if ($objecttype == 'facture') { if ($objecttype == 'facture') {
$classpath = 'compta/facture/class'; $classpath = 'compta/facture/class';
} }
if ($objecttype == 'propal') { else if ($objecttype == 'propal') {
$classpath = 'comm/propal/class'; $classpath = 'comm/propal/class';
} }
if ($objecttype == 'shipping') { else if ($objecttype == 'shipping') {
$classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon';
} }
if ($objecttype == 'delivery') { else if ($objecttype == 'delivery') {
$classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon'; $classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon';
} }
if ($objecttype == 'invoice_supplier') { else if ($objecttype == 'invoice_supplier') {
$classpath = 'fourn/class'; $classpath = 'fourn/class';
} }
if ($objecttype == 'order_supplier') { else if ($objecttype == 'order_supplier') {
$classpath = 'fourn/class'; $classpath = 'fourn/class';
} }
if ($objecttype == 'fichinter') { else if ($objecttype == 'fichinter') {
$classpath = 'fichinter/class'; $subelement = 'fichinter'; $module = 'ficheinter'; $classpath = 'fichinter/class'; $subelement = 'fichinter'; $module = 'ficheinter';
} }
// TODO ajout temporaire - MAXIME MANGIN // TODO ajout temporaire - MAXIME MANGIN
if ($objecttype == 'contratabonnement') { else if ($objecttype == 'contratabonnement') {
$classpath = 'contrat/class'; $subelement = 'contrat'; $module = 'contratabonnement'; $classpath = 'contrat/class'; $subelement = 'contrat'; $module = 'contratabonnement';
} }
@ -1464,7 +1465,7 @@ abstract class CommonObject
if ($objecttype == 'invoice_supplier') { if ($objecttype == 'invoice_supplier') {
$classfile = 'fournisseur.facture'; $classname = 'FactureFournisseur'; $classfile = 'fournisseur.facture'; $classname = 'FactureFournisseur';
} }
if ($objecttype == 'order_supplier') { else if ($objecttype == 'order_supplier') {
$classfile = 'fournisseur.commande'; $classname = 'CommandeFournisseur'; $classfile = 'fournisseur.commande'; $classname = 'CommandeFournisseur';
} }