From ab558ee5fae5fbbaa92452160e80d8664e83453a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 14 Dec 2017 09:49:55 +0100 Subject: [PATCH 1/2] Update product.php --- htdocs/product/admin/product.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 2757234251d..69355a7f1e8 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -56,7 +56,6 @@ $select_pricing_rules=array( ); if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { - $langs->load("admin"); $select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY'] = $langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')'; // TODO If this is enabled, price must be hidden when price by qty is enabled, also price for quantity must be used when adding product into order/propal/invoice $select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY&PRODUIT_MULTIPRICES'] = $langs->trans('MultiPricesAbility') . '+' . $langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')'; } From 59a89b250da4b2b6ac8465b07161355af3c5bb08 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 27 Dec 2017 11:56:58 +0100 Subject: [PATCH 2/2] Fix: avoid warning (https://github.com/Dolibarr/dolibarr/issues/7993) --- htdocs/core/lib/ajax.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index dc86a2ef9f3..1fc5e23ebb4 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -414,7 +414,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $ if ($forcefocus) $msg.= '.select2(\'focus\')'; $msg.= ';'."\n"; - if (count($events)) // If an array of js events to do were provided. + if (is_array($events) && count($events)) // If an array of js events to do were provided. { $msg.= ' jQuery("#'.$htmlname.'").change(function () {