diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 2beb4f74787..a29de165775 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1591,6 +1591,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead if (!empty($conf->global->MAIN_FEATURES_LEVEL)) $appli .= "
".$langs->trans("LevelOfFeature").': '.$conf->global->MAIN_FEATURES_LEVEL; $logouttext = ''; + $logouthtmltext = ''; if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { //$logouthtmltext=$appli.'
'; diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 6c8cc269eba..f7d8e53fc7a 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -219,15 +219,10 @@ class Productcustomerprice extends CommonObject $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."product_customer_price"); 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_CREATE',$this,$user,$langs,$conf); - // if ($result < 0) { $error++; $this->errors=$interface->errors; } - // // End call triggers + $result = $this->call_trigger('PRODUCT_CUSTOMER_PRICE_CREATE', $user); + if ($result < 0) { + $error++; + } } } @@ -708,14 +703,12 @@ class Productcustomerprice extends CommonObject $this->errors [] = "Error ".$this->db->lasterror(); } - if (!$error) { - if (!$notrigger) { - // Call triggers - include_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php'; - $interface = new Interfaces($this->db); - $result = $interface->run_triggers('PRODUCT_CUSTOMER_PRICE_UPDATE', $this, $user, $langs, $conf); - if ($result < 0) { $error++; $this->errors = $interface->errors; } - // End call triggers + if (! $error) { + if (! $notrigger) { + $result = $this->call_trigger('PRODUCT_CUSTOMER_PRICE_UPDATE', $user); + if ($result < 0) { + $error++; + } } } @@ -849,17 +842,12 @@ class Productcustomerprice extends CommonObject $this->db->begin(); - if (!$error) { - 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_DELETE',$this,$user,$langs,$conf); - // if ($result < 0) { $error++; $this->errors=$interface->errors; } - // // End call triggers + if (! $error) { + if (! $notrigger) { + $result = $this->call_trigger('PRODUCT_CUSTOMER_PRICE_DELETE', $user); + if ($result < 0) { + $error++; + } } }