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

refs #9632
This commit is contained in:
Johannes Meyer 2015-08-03 15:49:12 +02:00
parent d9539b2ad1
commit 57e0ce1b53
1 changed files with 3 additions and 7 deletions

View File

@ -12,13 +12,6 @@
</div>
<?php endif ?>
<div class="content">
<?php
if (count($comments) === 0) {
echo $this->translate('No comments found matching the filter') . '</div>';
return;
}
?>
<table data-base-target="_next"
class="action comments multiselect"
data-icinga-multiselect-url="/icingaweb2/monitoring/comments/show"
@ -91,4 +84,7 @@ if (count($comments) === 0) {
<?php endforeach ?>
</tbody>
</table>
<?php if (! $comments->hasResult()): ?>
<?= $this->translate('No comments found matching the filter'); ?>
<?php endif ?>
</div>