Fix code comment and missing showLinkToObjectBlock hook declaration as

an addreplace hook.
This commit is contained in:
Laurent Destailleur
2017-01-21 17:30:35 +01:00
parent 3a2d9c8610
commit b8a80f9311
3 changed files with 32 additions and 10 deletions

View File

@@ -2554,9 +2554,9 @@ abstract class CommonObject
if (! empty($this->linkedObjectsIds))
{
foreach($this->linkedObjectsIds as $objecttype => $objectids)
foreach($this->linkedObjectsIds as $objecttype => $objectids) // $objecttype is a module name ('facture', 'mymodule', ...) or a module name with a suffix ('project_task', 'mymodule_myobj', ...)
{
// Parse element/subelement (ex: project_task)
// Parse element/subelement (ex: project_task, cabinetmed_consultation, ...)
$module = $element = $subelement = $objecttype;
if ($objecttype != 'supplier_proposal' && $objecttype != 'order_supplier' && $objecttype != 'invoice_supplier'
&& preg_match('/^([^_]+)_([^_]+)/i',$objecttype,$regs))
@@ -2621,7 +2621,7 @@ abstract class CommonObject
if ($conf->$module->enabled && (($element != $this->element) || $alsosametype))
{
dol_include_once('/'.$classpath.'/'.$classfile.'.class.php');
//print '/'.$classpath.'/'.$classfile.'.class.php';
//print '/'.$classpath.'/'.$classfile.'.class.php '.class_exists($classname);
if (class_exists($classname))
{
foreach($objectids as $i => $objectid) // $i is rowid into llx_element_element