Fix: possibility to have more hooks in the same page

New: add left search block hook and extra left block hook
This commit is contained in:
Regis Houssin
2011-05-31 14:04:45 +00:00
parent e2efc8abcc
commit 8e25cb1ae5
11 changed files with 117 additions and 89 deletions

View File

@@ -808,9 +808,9 @@ class Commande extends CommonObject
if (! $error)
{
// Hook of thirdparty module
if (! empty($object->hooks))
if (! empty($object->hooks['objectcard']))
{
foreach($object->hooks as $module)
foreach($object->hooks['objectcard'] as $module)
{
$result = $module->createfrom($objFrom,$result,$object->element);
if ($result < 0) $error++;
@@ -902,9 +902,9 @@ class Commande extends CommonObject
if ($ret > 0)
{
// Hooks
if (! empty($object->hooks))
if (! empty($object->hooks['objectcard']))
{
foreach($object->hooks as $module)
foreach($object->hooks['objectcard'] as $module)
{
$result = $module->createfrom($object,$ret,$this->element);
if ($result < 0) $error++;