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

View File

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