Skip to content

Commit

Permalink
Merge pull request Dolibarr#32578 from fappels/21_modulebuilder_backw…
Browse files Browse the repository at this point in the history
…ard_compat

Fix modulebuilder backward compatibility.
  • Loading branch information
eldy authored Jan 9, 2025
2 parents 631a31c + 504a8b8 commit 8b8e0c2
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions htdocs/modulebuilder/template/myobject_card.php
Original file line number Diff line number Diff line change
Expand Up @@ -629,12 +629,15 @@

// Show links to link elements
$tmparray = $form->showLinkToObjectBlock($object, array(), array('myobject'), 1);
$linktoelem = $tmparray['linktoelem'];
$htmltoenteralink = $tmparray['htmltoenteralink'];
print $htmltoenteralink;

$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);

if (is_array($tmparray)) {
$linktoelem = $tmparray['linktoelem'];
$htmltoenteralink = $tmparray['htmltoenteralink'];
print $htmltoenteralink;
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
} else {
// backward compatibility
$somethingshown = $form->showLinkedObjectBlock($object, $tmparray);
}

print '</div><div class="fichehalfright">';

Expand Down

0 comments on commit 8b8e0c2

Please sign in to comment.