From addc8db9e799440711dd1d38ccbcb480af004735 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 1 Mar 2012 16:51:59 +0100 Subject: [PATCH] Fix: rename hooks --- htdocs/fourn/commande/fiche.php | 4 ++-- htdocs/fourn/facture/fiche.php | 4 ++-- htdocs/product/fournisseurs.php | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 19b175a6c71..d3a1a850faa 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -62,7 +62,7 @@ $result = restrictedArea($user, 'commande_fournisseur', $id,''); // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); $hookmanager=new HookManager($db); -$hookmanager->callHooks(array('fournordercard')); +$hookmanager->callHooks(array('ordersuppliercard')); $mesg=''; @@ -1330,7 +1330,7 @@ if ($id > 0 || ! empty($ref)) if (is_object($hookmanager)) { $parameters=array('filtre'=>$filtre); - echo $hookmanager->executeHooks('formCreateProductFournOptions',$parameters,$object,$action); + echo $hookmanager->executeHooks('formCreateProductSupplierOptions',$parameters,$object,$action); } // Editor wysiwyg diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 1d192e5291e..3f9bdf62c3c 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -53,7 +53,7 @@ $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); $hookmanager=new HookManager($db); -$hookmanager->callHooks(array('fournpricecard')); +$hookmanager->callHooks(array('invoicesuppliercard')); $object=new FactureFournisseur($db); @@ -1652,7 +1652,7 @@ else if (is_object($hookmanager)) { $parameters=array('filtre'=>$filtre); - echo $hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action); + echo $hookmanager->executeHooks('formCreateProductSupplierOptions',$parameters,$object,$action); } print ''; diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index d9a48c6d8d7..4eb853d5754 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -53,10 +53,11 @@ $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : '')); $fieldtype = (! empty($ref) ? 'ref' : 'rowid'); if ($user->societe_id) $socid=$user->societe_id; $result=restrictedArea($user,'produit|service&fournisseur',$fieldvalue,'product&product','','',$fieldtype); + // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); $hookmanager=new HookManager($db); -$hookmanager->callHooks(array('fournpricecard')); +$hookmanager->callHooks(array('pricesuppliercard')); $sortfield = GETPOST("sortfield",'alpha'); @@ -283,7 +284,7 @@ if ($id || $ref) if (is_object($hookmanager)) { $parameters=array('filtre'=>"fournisseur=1",'html_name'=>'id_fourn','selected'=>GETPOST("id_fourn"),'showempty'=>1,'prod_id'=>$product->id); - echo $hookmanager->executeHooks('formCreateCompagnyOptions',$parameters,$object,$action); + echo $hookmanager->executeHooks('formCreateThirdpartyOptions',$parameters,$object,$action); } } print '';