From fecfe2e3a18d7b5cdf2caf76d03ed3ea2f53329e Mon Sep 17 00:00:00 2001 From: TuxGasy Date: Sat, 11 Apr 2020 18:37:06 +0200 Subject: [PATCH 1/6] Keep compatibility with old object declaration --- htdocs/core/class/html.form.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 4be8c74ffac..9b89a1bfc09 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6032,6 +6032,11 @@ class Form } if ($tmpfieldstoshow) $fieldstoshow = $tmpfieldstoshow; } + else + { + $fieldstoshow = 't.ref'; // Keep compatibility with old object not declare yet fields + } + if (empty($fieldstoshow)) { if (isset($objecttmp->fields['ref'])) { From 3f59ca6418d86f7f34f9c7ce7ee7a4f2aea21243 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 12 Apr 2020 10:13:37 +0200 Subject: [PATCH 2/6] Fix #13576 : links on variants --- htdocs/variants/combinations.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 306586ec504..b39991e7f31 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -777,8 +777,8 @@ if (!empty($id) || !empty($ref)) print ''.$prodstatic->getLibStatut(2, 0).''; print ''.$prodstatic->getLibStatut(2, 1).''; print ''; - print ''.img_edit().''; - print ''.img_delete().''; + print 'id.'">'.img_edit().''; + print 'id.'">'.img_delete().''; print ''; print ''; if ($productCombinations || $massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined From 8bca68cfba3c0e08cb9d4e17851b446c54ccfa28 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 12 Apr 2020 10:39:16 +0200 Subject: [PATCH 3/6] Fix missing token on product composition --- htdocs/product/composition/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 88945342af5..f67910cbef4 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -317,6 +317,7 @@ if ($id > 0 || ! empty($ref)) print load_fiche_titre($langs->trans("ProductAssociationList"), '', ''); print '
'; + print ''; print ''; print ''; From 20e684ec69691c550db997f7629f04a398f82a61 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 12 Apr 2020 15:30:58 +0200 Subject: [PATCH 4/6] Fix #13468 setup working days and hours --- htdocs/admin/ihm.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 83f7b03d67f..19c0bab7150 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -154,8 +154,8 @@ if ($action == 'update') //dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", GETPOST("MAIN_DISABLE_JAVASCRIPT", 'aZ09'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", GETPOST("MAIN_BUTTON_HIDE_UNAUTHORIZED", 'aZ09'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_START_WEEK", GETPOST("MAIN_START_WEEK", 'int'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", GETPOST("MAIN_DEFAULT_WORKING_DAYS", 'int'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", GETPOST("MAIN_DEFAULT_WORKING_HOURS", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", GETPOST("MAIN_DEFAULT_WORKING_DAYS", 'alpha'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", GETPOST("MAIN_DEFAULT_WORKING_HOURS", 'alpha'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_SHOW_LOGO", GETPOST("MAIN_SHOW_LOGO", 'aZ09'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity); From acab0200a692544bf66e6380af73e4c11368f9b4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 Apr 2020 16:46:21 +0200 Subject: [PATCH 5/6] Update html.form.class.php --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 9b89a1bfc09..d08d230b3bd 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6034,7 +6034,7 @@ class Form } else { - $fieldstoshow = 't.ref'; // Keep compatibility with old object not declare yet fields + $objecttmp->fields['ref']=array('type'=>'varchar(30)', 'label'=>'Ref'); } if (empty($fieldstoshow)) From 697043bbd378a557755fd0f06efb9544747df446 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 Apr 2020 16:47:56 +0200 Subject: [PATCH 6/6] Update html.form.class.php --- htdocs/core/class/html.form.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d08d230b3bd..6f911260afd 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6034,7 +6034,8 @@ class Form } else { - $objecttmp->fields['ref']=array('type'=>'varchar(30)', 'label'=>'Ref'); + // For backward compatibility + $objecttmp->fields['ref']=array('type'=>'varchar(30)', 'label'=>'Ref', 'showoncombobox'=>1); } if (empty($fieldstoshow))