From 8a52009111170b88deff4ce245617ca03877e670 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 7 Sep 2010 16:01:11 +0000 Subject: [PATCH] Works on module hook integration --- htdocs/comm/propal.php | 4 ++-- htdocs/commande/fiche.php | 6 +++--- htdocs/core/class/commonobject.class.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 4800e934b0b..894c5b6cfed 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1388,9 +1388,9 @@ if ($id > 0 || ! empty($ref)) } // Hook of thirdparty module - if (! empty($hooks->objModules)) + if (! empty($propal->objModules)) { - foreach($hooks->objModules as $module) + foreach($propal->objModules as $module) { $var=!$var; $module->formAddObject($propal); diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index d32de3c539d..076573aabcc 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1658,7 +1658,7 @@ else */ if ($commande->statut == 0 && $user->rights->commande->creer) { - if (! preg_match('/editline|edit_/',$_GET["action"])) + if ($_GET['action'] != 'editline') { $var=true; @@ -1672,9 +1672,9 @@ else } // Hook of thirdparty module - if (! empty($hooks->objModules)) + if (! empty($commande->objModules)) { - foreach($hooks->objModules as $module) + foreach($commande->objModules as $module) { $var=!$var; $module->formAddObject($commande); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 66a8887c332..42399a4029e 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1356,7 +1356,7 @@ class CommonObject if ($line->product_type == 9 && ! empty($line->special_code)) { - $this->objModules[$line->special_code]->printObjectLine($this,$num,$i); + $this->objModules[$line->special_code]->printObjectLine($this,$line,$num,$i); } else {