From 0373cad2cdc7d3051246c957c19502fa6b931be9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 28 Nov 2018 16:11:00 +0100 Subject: [PATCH] FIX Method setValid not found --- htdocs/don/class/don.class.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 2fa0ee44178..51676d78acf 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -683,10 +683,21 @@ class Don extends CommonObject dol_print_error($this->db); return -1; } - } - /** + /** + * Validate a intervention + * + * @param User $user User that validate + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @return int <0 if KO, >0 if OK + */ + function setValid($user, $notrigger=0) + { + return $this->valid_promesse($this->id, $user->id, $notrigger); + } + + /** * Validate a promise of donation * * @param int $id id of donation @@ -694,8 +705,8 @@ class Don extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - function valid_promesse($id, $userid, $notrigger=0) - { + function valid_promesse($id, $userid, $notrigger=0) + { global $langs, $user; $error=0;