From 38e30836a5972bea3621cb080801ef94c76f4dc3 Mon Sep 17 00:00:00 2001 From: fhenry Date: Wed, 10 Apr 2013 15:08:03 +0200 Subject: [PATCH] Fix bug with multicompany (SYSLOG_FILE on wrong entity) --- htdocs/admin/syslog.php | 4 ++-- htdocs/install/mysql/migration/3.2.0-3.3.0.sql | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 5bb0e85de84..075f975adb2 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -98,14 +98,14 @@ if ($action == 'set') if ($_POST[$option['constant']]) { dolibarr_del_const($db, $option['constant'], 0); - dolibarr_set_const($db, $option['constant'], $_POST[$option['constant']], 'chaine'); + dolibarr_set_const($db, $option['constant'], $_POST[$option['constant']], 'chaine',0, '', 0); } } } } } - dolibarr_set_const($db, 'SYSLOG_HANDLERS', json_encode($activeModules), 'chaine'); + dolibarr_set_const($db, 'SYSLOG_HANDLERS', json_encode($activeModules), 'chaine',0,'',0); if (! $error) { diff --git a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql index b756659d987..76f48ed7d61 100755 --- a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql +++ b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql @@ -927,3 +927,6 @@ UPDATE llx_c_departements SET ncc='ALAVA', nom='Álava' WHERE code_departement=' ALTER TABLE llx_product_fournisseur_price DROP FOREIGN KEY fk_product_fournisseur; UPDATE llx_const set name='PRODUIT_MULTI_PRICES' where name='PRODUIT_MUTLI_PRICES'; + +DELETE FROM llx_const WHERE entity<>0 AND name IN ('SYSLOG_HANDLERS','SYSLOG_LEVEL'); +UPDATE llx_const SET entity=0 WHERE name = 'SYSLOG_FILE';