From 0eb12f4c613427a391edb6baa6eab990bf4e9436 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 8 May 2016 11:39:37 +0200 Subject: [PATCH] Fix scrutinizer --- .../class/opensurveysondage.class.php | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index aaf5028fd8f..3b1c5beb6c1 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -313,15 +313,12 @@ class Opensurveysondage extends CommonObject { if (! $notrigger) { - // Uncomment this and change MYOBJECT to your own tag if you - // want this action calls a trigger. - - //// Call triggers - //include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); - //if ($result < 0) { $error++; $this->errors=$interface->errors; } - //// End call triggers + // Call triggers + include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; + $interface=new Interfaces($this->db); + $result=$interface->run_triggers('OPENSURVEY_MODIFY',$this,$user,$langs,$conf); + if ($result < 0) { $error++; $this->errors=$interface->errors; } + // End call triggers } } @@ -343,17 +340,16 @@ class Opensurveysondage extends CommonObject } } - - /** - * Delete object in database - * + /** + * Delete object in database + * * @param User $user User that deletes * @param int $notrigger 0=launch triggers after, 1=disable triggers * @param string $numsondage Num sondage admin to delete - * @return int <0 if KO, >0 if OK - */ - function delete($user, $notrigger, $numsondage) - { + * @return int <0 if KO, >0 if OK + */ + function delete($user, $notrigger, $numsondage) + { global $conf, $langs; $error=0;