Skip to content
Snippets Groups Projects
Commit 787f4234 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Removed warning. Fix compatibility.

parent 3b9d7c01
No related branches found
No related tags found
No related merge requests found
......@@ -2283,6 +2283,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;
......@@ -2294,13 +2297,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);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment