From 98e5a655cc0ad00ac8fc5db84fc659337af9d8a5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Feb 2021 22:20:57 +0100 Subject: [PATCH] Fix message if not found --- htdocs/blockedlog/admin/blockedlog_list.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index 3612343280a..39e0c8c3eff 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -465,6 +465,8 @@ if (!empty($conf->global->BLOCKEDLOG_SCAN_ALL_FOR_LOWERIDINERROR)) { if (is_array($blocks)) { + $nbshown = 0; + foreach ($blocks as &$block) { $object_link = $block->getObjectLink(); @@ -472,6 +474,8 @@ if (is_array($blocks)) //if (empty($search_showonlyerrors) || ! $checkresult[$block->id] || ($loweridinerror && $block->id >= $loweridinerror)) if (empty($search_showonlyerrors) || !$checkresult[$block->id]) { + $nbshown++; + print ''; // ID @@ -539,7 +543,7 @@ if (is_array($blocks)) } } - if (count($blocks) == 0) { + if ($nbshown == 0) { print ''.$langs->trans("NoRecordFound").''; } }