diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql
index aa5ab65d3ff..021cb61c1fc 100644
--- a/htdocs/install/mysql/migration/repair.sql
+++ b/htdocs/install/mysql/migration/repair.sql
@@ -185,6 +185,7 @@ delete from llx_categorie_project where fk_categorie not in (select rowid from l
-- Fix: delete orphelins in ecm_files
delete from llx_ecm_files where src_object_type = 'expensereport' and src_object_id NOT IN (select rowid from llx_expensereport);
+delete from llx_ecm_files where (src_object_type = 'contrat' OR src_object_type = 'contract') and src_object_id NOT IN (select rowid from llx_contrat);
-- Fix: delete orphelin deliveries. Note: deliveries are linked to shipment by llx_element_element only. No other links.
delete from llx_livraisondet where fk_livraison not in (select fk_target from llx_element_element where targettype = 'delivery') AND fk_livraison not in (select fk_source from llx_element_element where sourcetype = 'delivery');
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 553b5245939..7c72c6224de 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1597,6 +1597,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 2e8cd316bc0..be8ccd60ae6 100644
--- a/htdocs/product/class/productcustomerprice.class.php
+++ b/htdocs/product/class/productcustomerprice.class.php
@@ -217,6 +217,13 @@ class Productcustomerprice extends CommonObject
if (!$error) {
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."product_customer_price");
+
+ if (!$notrigger) {
+ $result = $this->call_trigger('PRODUCT_CUSTOMER_PRICE_CREATE', $user);
+ if ($result < 0) {
+ $error++;
+ }
+ }
}
if (!$error) {
@@ -834,6 +841,13 @@ class Productcustomerprice extends CommonObject
$this->db->begin();
+ if (!$error && !$notrigger) {
+ $result = $this->call_trigger('PRODUCT_CUSTOMER_PRICE_DELETE', $user);
+ if ($result < 0) {
+ $error++;
+ }
+ }
+
if (!$error) {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."product_customer_price";
$sql .= " WHERE rowid=".$this->id;