From 089039d6efc00dd66228ae2a18fa4be5e0fed942 Mon Sep 17 00:00:00 2001
From: Regis Houssin <regis@dolibarr.fr>
Date: Wed, 1 Jun 2011 17:17:23 +0000
Subject: [PATCH] Fix: possibility to have more hooks in the same page New: add
 left search block hook and extra left block hook

---
 htdocs/core/tpl/freeproductline_edit.tpl.php       | 4 ++--
 htdocs/core/tpl/predefinedproductline_edit.tpl.php | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/htdocs/core/tpl/freeproductline_edit.tpl.php b/htdocs/core/tpl/freeproductline_edit.tpl.php
index b3052d42f21..5933e1eebce 100644
--- a/htdocs/core/tpl/freeproductline_edit.tpl.php
+++ b/htdocs/core/tpl/freeproductline_edit.tpl.php
@@ -40,8 +40,8 @@
 	<a name="<?php echo $line->id; ?>"></a>
 	
 	<?php
-	if (! empty($this->hooks)) {
-		foreach($this->hooks as $module) {
+	if (! empty($this->hooks['objectcard'])) {
+		foreach($this->hooks['objectcard'] as $module) {
 			$module->formEditProductOptions($this,$line->fk_parent_line);
 			echo '<br>';
 		}
diff --git a/htdocs/core/tpl/predefinedproductline_edit.tpl.php b/htdocs/core/tpl/predefinedproductline_edit.tpl.php
index c7a8092d58c..a75e2b65203 100644
--- a/htdocs/core/tpl/predefinedproductline_edit.tpl.php
+++ b/htdocs/core/tpl/predefinedproductline_edit.tpl.php
@@ -48,8 +48,8 @@
 	echo ' - '.nl2br($line->product_label);
 	echo '<br>';
 
-	if (! empty($this->hooks)) {
-		foreach($this->hooks as $module) {
+	if (! empty($this->hooks['objectcard'])) {
+		foreach($this->hooks['objectcard'] as $module) {
 			$module->formEditProductOptions($this,$line->fk_parent_line);
 			echo '<br>';
 		}
-- 
GitLab