From 83def2cd57f6bc3c791a387b0cd9355fec58557d Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 25 Mar 2013 18:03:42 +0100 Subject: [PATCH] Fix : on a new trigger, using $this but not in a class... --- htdocs/fourn/commande/dispatch.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 1a41324479c..4c5dc82bcec 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -90,12 +90,12 @@ if ($_POST["action"] == 'dispatch' && $user->rights->fournisseur->commande->rece global $conf, $langs, $user; // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result_trigger=$interface->run_triggers('ORDER_SUPPLIER_DISPATCH',$this,$user,$langs,$conf); - if ($result_trigger < 0) { $error++; $this->errors=$interface->errors; } + $interface=new Interfaces($db); + $result_trigger=$interface->run_triggers('ORDER_SUPPLIER_DISPATCH',$commande,$user,$langs,$conf); + if ($result_trigger < 0) { $error++; $commande->errors=$interface->errors; } // Fin appel triggers - $this->db->commit(); + $db->commit(); } if ($result > 0)