Host Overview: Use $query->hasResult() instead of $query->count()

refs #9632
This commit is contained in:
Johannes Meyer 2015-08-03 15:22:14 +02:00
parent c0b82eff94
commit e1b3c42818

View File

@ -15,14 +15,6 @@ if (! $this->compact): ?>
</div> </div>
<?php endif ?> <?php endif ?>
<div class="content"> <div class="content">
<?php
if (count($hosts) === 0) {
echo $this->translate('No hosts found matching the filter') . '</div>';
return;
}
?>
<table <table
data-base-target="_next" data-base-target="_next"
class="action multiselect" class="action multiselect"
@ -99,4 +91,7 @@ if (count($hosts) === 0) {
<?php endforeach ?> <?php endforeach ?>
</tbody> </tbody>
</table> </table>
<?php if (! $hosts->hasResult()): ?>
<?= $this->translate('No hosts found matching the filter'); ?>
<?php endif ?>
</div> </div>