From 85b1188593201dcfe6c6ca6ecc6e1ee31478c442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 13 Jan 2015 09:22:12 +0100 Subject: [PATCH] Fix: [ bug #1788 ] Duplicated doActions hook in product/fournisseurs.php --- ChangeLog | 1 + htdocs/product/fournisseurs.php | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b621467312..fd82ace0c20 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ English Dolibarr ChangeLog ***** ChangeLog for 3.6.3 compared to 3.6.2 ***** - Fix: ref_ext was not saved when recording a customer order from web service - Fix: amarok is a bugged theme making dolidroid failed. We swith to eldy automatically with dolidroid. +- Fix: [ bug #1788 ] Duplicated doActions hook in product/fournisseurs.php ***** ChangeLog for 3.6.2 compared to 3.6.1 ***** - Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice. diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 527615cc7c4..9999892469d 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -64,10 +64,6 @@ $hookmanager->initHooks(array('pricesuppliercard')); $product = new ProductFournisseur($db); $product->fetch($id,$ref); -$reshook=$hookmanager->executeHooks('doActions',$parameters,$product,$action); // Note that $action and $object may have been modified by some hooks -$error=$hookmanager->error; $errors=$hookmanager->errors; - - $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); @@ -81,7 +77,10 @@ if (! $sortorder) $sortorder="ASC"; $parameters=array('socid'=>$socid, 'id_prod'=>$id); $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks -$error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->errors); + +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if ($action == 'remove_pf') {