From 30c76623e12de38b67f8518a44701011cf7fa8a2 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Thu, 23 Feb 2023 10:46:20 +0100 Subject: [PATCH 1/3] FIX : missing w option in dol_print_date --- htdocs/core/lib/functions.lib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index d503026a868..053bbfe98ca 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2696,8 +2696,8 @@ function dol_print_date($time, $format = '', $tzoutput = 'auto', $outputlangs = $dtts->setTimestamp($time); $dtts->setTimezone($tzo); $newformat = str_replace( - array('%Y', '%y', '%m', '%d', '%H', '%I', '%M', '%S', '%p', 'T', 'Z', '__a__', '__A__', '__b__', '__B__'), - array('Y', 'y', 'm', 'd', 'H', 'h', 'i', 's', 'A', '__£__', '__$__', '__{__', '__}__', '__[__', '__]__'), + array('%Y', '%y', '%m', '%d', '%H', '%I', '%M', '%S', '%p', '%w', 'T', 'Z', '__a__', '__A__', '__b__', '__B__'), + array('Y', 'y', 'm', 'd', 'H', 'h', 'i', 's', 'A', 'w', '__£__', '__$__', '__{__', '__}__', '__[__', '__]__'), $format); $ret = $dtts->format($newformat); $ret = str_replace( @@ -2722,8 +2722,8 @@ function dol_print_date($time, $format = '', $tzoutput = 'auto', $outputlangs = $dtts->setTimestamp($timetouse); $dtts->setTimezone($tzo); $newformat = str_replace( - array('%Y', '%y', '%m', '%d', '%H', '%I', '%M', '%S', '%p', 'T', 'Z', '__a__', '__A__', '__b__', '__B__'), - array('Y', 'y', 'm', 'd', 'H', 'h', 'i', 's', 'A', '__£__', '__$__', '__{__', '__}__', '__[__', '__]__'), + array('%Y', '%y', '%m', '%d', '%H', '%I', '%M', '%S', '%p', '%w', 'T', 'Z', '__a__', '__A__', '__b__', '__B__'), + array('Y', 'y', 'm', 'd', 'H', 'h', 'i', 's', 'A', 'w', '__£__', '__$__', '__{__', '__}__', '__[__', '__]__'), $format); $ret = $dtts->format($newformat); $ret = str_replace( From 5d5634cc505a7b2ce990d645e785ca5faee77281 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 23 Feb 2023 11:41:46 +0100 Subject: [PATCH 2/3] fix : Warning: Undefined property: Conf:: in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/contrat/card.php on line 1652 --- htdocs/contrat/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 6b3937df76a..b41d913a92e 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1649,9 +1649,9 @@ if ($action == 'create') { if ($objp->subprice >= 0) { $colspan = 6; - if ($conf->margin->enabled && getDolGlobalString('PRODUCT_USE_UNITS')) { + if (isModEnabled('margin') && getDolGlobalString('PRODUCT_USE_UNITS')) { $colspan = 8; - } elseif ($conf->margin->enabled || getDolGlobalString('PRODUCT_USE_UNITS')) { + } elseif (isModEnabled('margin') || getDolGlobalString('PRODUCT_USE_UNITS')) { $colspan = 7; } From 4252db1c7938d691c452e816624ee96dfa7737e8 Mon Sep 17 00:00:00 2001 From: Adrien Raze Date: Thu, 23 Feb 2023 15:51:52 +0100 Subject: [PATCH 3/3] FIX : Impossible to create value for product attribute (variant) --- htdocs/variants/card.php | 4 +--- .../tpl/productattributevalueline_create.tpl.php | 14 -------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/htdocs/variants/card.php b/htdocs/variants/card.php index 5f1065f5171..8daf1239deb 100644 --- a/htdocs/variants/card.php +++ b/htdocs/variants/card.php @@ -330,9 +330,7 @@ if ($action == 'create') { print ''; } - if (!empty($object->lines)) { - $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1, '/variants/tpl', ($permissiontoedit ? 1 : 0)); - } + $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1, '/variants/tpl', ($permissiontoedit ? 1 : 0)); if (!empty($object->lines) || ($permissiontoedit && $action != 'selectlines' && $action != 'editline')) { print '
'; diff --git a/htdocs/variants/tpl/productattributevalueline_create.tpl.php b/htdocs/variants/tpl/productattributevalueline_create.tpl.php index f23e7175f58..21ea651f3ef 100644 --- a/htdocs/variants/tpl/productattributevalueline_create.tpl.php +++ b/htdocs/variants/tpl/productattributevalueline_create.tpl.php @@ -40,20 +40,6 @@ $objectline = null; print "\n"; $nolinesbefore = (count($this->lines) == 0 || $forcetoshowtitlelines); -if ($nolinesbefore) { - ?> - - global->MAIN_VIEW_LINE_NUMBER)) { ?> - - - -
trans('AddNewLine'); ?> - - trans('Value'); ?> -   - -