forked from Wavyzz/dolibarr
Fix: Removed warning. Fix compatibility.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user