diff --git a/htdocs/margin/admin/margin.php b/htdocs/margin/admin/margin.php index f8beb7cd1ca..b031a190f44 100644 --- a/htdocs/margin/admin/margin.php +++ b/htdocs/margin/admin/margin.php @@ -72,7 +72,6 @@ if ($action == 'remises') { if (dolibarr_set_const($db, 'MARGIN_METHODE_FOR_DISCOUNT', $_POST['MARGIN_METHODE_FOR_DISCOUNT'], 'chaine', 0, '', $conf->entity) > 0) { - $conf->global->MARGIN_METHODE_FOR_DISCOUNT = $_POST['MARGIN_METHODE_FOR_DISCOUNT']; setEventMessage($langs->trans("RecordModifiedSuccessfully")); } else @@ -85,7 +84,6 @@ if ($action == 'typemarges') { if (dolibarr_set_const($db, 'MARGIN_TYPE', $_POST['MARGIN_TYPE'], 'chaine', 0, '', $conf->entity) > 0) { - $conf->global->MARGIN_METHODE_FOR_DISCOUNT = $_POST['MARGIN_TYPE']; setEventMessage($langs->trans("RecordModifiedSuccessfully")); } else @@ -98,7 +96,6 @@ if ($action == 'contact') { if (dolibarr_set_const($db, 'AGENT_CONTACT_TYPE', $_POST['AGENT_CONTACT_TYPE'], 'chaine', 0, '', $conf->entity) > 0) { - $conf->global->AGENT_CONTACT_TYPE = $_POST['AGENT_CONTACT_TYPE']; setEventMessage($langs->trans("RecordModifiedSuccessfully")); } else diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index 915d4ef69ef..a29bb9a2d63 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -237,12 +237,7 @@ if ($action == 'deltask') // Set default model else if ($action == 'setdoc') { - if (dolibarr_set_const($db, "PROJECT_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) - { - // La constante qui a ete lue en avant du nouveau set - // on passe donc par une variable pour avoir un affichage coherent - $conf->global->PROJECT_ADDON_PDF = $value; - } + dolibarr_set_const($db, "PROJECT_ADDON_PDF",$value,'chaine',0,'',$conf->entity); // On active le modele $ret = delDocumentModel($value, $type); diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index 8fec81c686c..881946cb1cd 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -165,10 +165,7 @@ if ($action == 'setdoc') $db->begin(); - if (dolibarr_set_const($db, "COMPANY_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) - { - $conf->global->COMPANY_ADDON_PDF = $value; - } + dolibarr_set_const($db, "COMPANY_ADDON_PDF",$value,'chaine',0,'',$conf->entity); // On active le modele $type='company';