diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql
index d21c43bfb8a..fca9b8dbe23 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_deliverydet where fk_delivery not in (select fk_target from llx_element_element where targettype = 'delivery') AND fk_delivery 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 107f61e0f0f..06cfa6edfac 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1589,6 +1589,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 25a3c5cd836..b30f0b7fafe 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) {
@@ -833,6 +840,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;