2
0
forked from Wavyzz/dolibarr

Fix: Removed warning. Fix compatibility.

This commit is contained in:
Laurent Destailleur
2012-06-26 23:11:46 +02:00
parent 643e077c68
commit 62f14e3dd5

View File

@@ -2282,6 +2282,9 @@ abstract class CommonObject
if ($objecttype == 'member') {
$classpath = 'adherents/class'; $module='adherent'; $subelement='adherent';
}
if ($objecttype == 'cabinetmed_cons') {
$classpath = 'cabinetmed/class'; $module='cabinetmed'; $subelement='cabinetmedcons';
}
//print "objecttype=".$objecttype." module=".$module." subelement=".$subelement;
@@ -2293,13 +2296,15 @@ abstract class CommonObject
$classfile = 'fournisseur.commande'; $classname='CommandeFournisseur';
}
if ($conf->$module->enabled)
if (! empty($conf->$module->enabled))
{
dol_include_once('/'.$classpath.'/'.$classfile.'.class.php');
$object = new $classname($this->db);
$ret=$object->fetch($objectid);
if ($ret > 0) return $object->getNomUrl($withpicto,$option);
$res=dol_include_once('/'.$classpath.'/'.$classfile.'.class.php');
if ($res)
{
$object = new $classname($this->db);
$ret=$object->fetch($objectid);
if ($ret > 0) return $object->getNomUrl($withpicto,$option);
}
}
}