Fix message if not found

This commit is contained in:
Laurent Destailleur 2021-02-04 22:20:57 +01:00
parent 55e7bcb7ab
commit 98e5a655cc

View File

@ -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 '<tr class="oddeven">';
// ID
@ -539,7 +543,7 @@ if (is_array($blocks))
}
}
if (count($blocks) == 0) {
if ($nbshown == 0) {
print '<tr><td colspan="12"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
}
}