From 6ffb45f5d87459b810353cd7c0499a7586f9707f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 30 Apr 2016 13:58:35 +0200 Subject: [PATCH] FIX Missing param user on update() --- htdocs/compta/bank/class/account.class.php | 2 +- htdocs/compta/facture/class/facture.class.php | 4 ++-- htdocs/fourn/facture/card.php | 2 +- htdocs/hrm/establishment/card.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 9be83a2e73d..478633490f8 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -589,7 +589,7 @@ class Account extends CommonObject { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."bank_account"); - $result=$this->update(); + $result=$this->update($user); if ($result > 0) { $accline = new AccountLine($this->db); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 7261b8b1af3..8fee9cc5758 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2606,7 +2606,7 @@ class Facture extends CommonInvoice $this->line->array_options=$array_options; } - $result=$this->line->update(); + $result=$this->line->update($user); if ($result > 0) { // Reorder if child line @@ -2680,7 +2680,7 @@ class Facture extends CommonInvoice $line->total_ttc = $tabprice[2]; $line->total_localtax1 = $tabprice[9]; $line->total_localtax2 = $tabprice[10]; - $line->update(); + $line->update($user); $this->update_price(1); $this->db->commit(); } diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 96311d7175e..eb6392eba06 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -249,7 +249,7 @@ if (empty($reshook)) { $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); - if ($object->update() < 0) { + if ($object->update($user) < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index fb6f41f4f39..11179d218f8 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -136,7 +136,7 @@ else if ($action == 'update') $object->country_id = $_POST["country_id"]; $object->fk_user_mod = $user->id; - $result = $object->update(); + $result = $object->update($user); if ($result > 0) {