From 9b8940ac15d1c4d79c85ec5801246b5c4996fff0 Mon Sep 17 00:00:00 2001 From: Milen Karaganski Date: Wed, 7 Dec 2022 00:13:11 +0200 Subject: [PATCH 1/4] FIX|Fix[#23117] Error message not displayed, when trying to mass-delete validated OR approved holiday requests --- htdocs/core/actions_massactions.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index bd8de72ce15..3f0be6511cc 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -1040,8 +1040,8 @@ if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == ' } if ($objectclass == 'Holiday' && ! in_array($objecttmp->statut, array(Holiday::STATUS_DRAFT, Holiday::STATUS_CANCELED, Holiday::STATUS_REFUSED))) { - $nbignored++; - $resaction .= '
'.$langs->trans('ErrorLeaveRequestMustBeDraftCanceledOrRefusedToBeDeleted', $objecttmp->ref).'

'; + $langs->load("errors"); + $TMsg[] = '
'.$langs->trans('ErrorLeaveRequestMustBeDraftCanceledOrRefusedToBeDeleted', $objecttmp->ref).'

'; continue; } From 2a16198981c30c45527e3c608a009defc6172aa3 Mon Sep 17 00:00:00 2001 From: Milen Karaganski Date: Wed, 7 Dec 2022 17:09:54 +0200 Subject: [PATCH 2/4] Put back error counter $nbignored++; --- htdocs/core/actions_massactions.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 3f0be6511cc..f12110701db 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -1041,6 +1041,7 @@ if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == ' if ($objectclass == 'Holiday' && ! in_array($objecttmp->statut, array(Holiday::STATUS_DRAFT, Holiday::STATUS_CANCELED, Holiday::STATUS_REFUSED))) { $langs->load("errors"); + $nbignored++; $TMsg[] = '
'.$langs->trans('ErrorLeaveRequestMustBeDraftCanceledOrRefusedToBeDeleted', $objecttmp->ref).'

'; continue; } From 38e58d96337ca4301f5f1ca52f0c4d4ac63c962c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 12 Dec 2022 11:55:43 +0100 Subject: [PATCH 3/4] Fix link to set all perms has disappeared --- htdocs/user/perms.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 4248605f53a..87d2d466fcb 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -309,16 +309,14 @@ print ''; print ''; print ''; -if (($caneditperms && empty($objMod->rights_admin_allowed)) || empty($object->admin)) { - if ($caneditperms) { - print ''; - } - print ''; +if ($caneditperms) { + print ''; } +print ''; print ''; if ($user->admin) { print ''; From fe1fafa816bae66d21d17f5ab838adb938d3c247 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 13 Dec 2022 11:47:06 +0100 Subject: [PATCH 4/4] Fix edition of product notes --- htdocs/core/tpl/notes.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php index dbb27a99800..8fc35c585cd 100644 --- a/htdocs/core/tpl/notes.tpl.php +++ b/htdocs/core/tpl/notes.tpl.php @@ -91,7 +91,7 @@ if ($module == 'propal') { } elseif ($module == 'shipping') { $permission = $user->hasRight("expedition", "creer"); } elseif ($module == 'product') { - $permission = $user->hasRight("produit", "creer"); + $permission = $user->hasRight("product", "creer"); } elseif ($module == 'service') { $permission = $user->hasRight("service", "creer"); } elseif ($module == 'ecmfiles') {
'.$langs->trans("Module").''; - print ''.$langs->trans("All").""; - print ' / '; - print ''.$langs->trans("None").""; - print ' '; + print ''.$langs->trans("All").""; + print ' / '; + print ''.$langs->trans("None").""; + print ' '.$langs->trans("Permissions").'