From 9beb210ead2367f9d986082b78b9d461609766b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9?= Date: Wed, 31 Jan 2024 15:11:37 +0100 Subject: [PATCH 1/2] FIX: Save global filter when clicking on massaction buttons --- htdocs/core/tpl/massactions_pre.tpl.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/core/tpl/massactions_pre.tpl.php b/htdocs/core/tpl/massactions_pre.tpl.php index c5c561c5ec5..5fb8978bdcc 100644 --- a/htdocs/core/tpl/massactions_pre.tpl.php +++ b/htdocs/core/tpl/massactions_pre.tpl.php @@ -30,6 +30,11 @@ // $object = Object fetched; // $sendto // $withmaindocfilemail +if(!empty($sall) || !empty($search_all)) { + $sall = empty($sall) ? $search_all : $sall; + + print ''; +} if ($massaction == 'predeletedraft') { print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassDraftDeletion"), $langs->trans("ConfirmMassDeletionQuestion", count($toselect)), "delete", null, '', 0, 200, 500, 1); From f152d5e0fd41b396ebfd4ffe2f8f98ea48771d25 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Jan 2024 19:24:58 +0100 Subject: [PATCH 2/2] Update massactions_pre.tpl.php --- htdocs/core/tpl/massactions_pre.tpl.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/tpl/massactions_pre.tpl.php b/htdocs/core/tpl/massactions_pre.tpl.php index 5fb8978bdcc..cf7933b1792 100644 --- a/htdocs/core/tpl/massactions_pre.tpl.php +++ b/htdocs/core/tpl/massactions_pre.tpl.php @@ -30,10 +30,10 @@ // $object = Object fetched; // $sendto // $withmaindocfilemail -if(!empty($sall) || !empty($search_all)) { - $sall = empty($sall) ? $search_all : $sall; +if (!empty($sall) || !empty($search_all)) { + $search_all = empty($sall) ? $search_all : $sall; - print ''; + print ''; } if ($massaction == 'predeletedraft') {