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

refs #9632
This commit is contained in:
Johannes Meyer 2015-08-03 15:45:54 +02:00
parent 6f0b51ed8f
commit d9539b2ad1

View File

@ -16,14 +16,6 @@ if (! $this->compact): ?>
</div>
<?php endif ?>
<div class="content">
<?php
if (count($downtimes) === 0) {
echo $this->translate('No downtimes found matching the filter,'
. ' maybe the downtime already expired.') . '</div>';
return;
}
?>
<table data-base-target="_next"
class="action multiselect"
data-icinga-multiselect-url="/icingaweb2/monitoring/downtimes/show"
@ -143,4 +135,7 @@ if (count($downtimes) === 0) {
<?php endforeach ?>
</tbody>
</table>
<?php if (! $downtimes->hasResult()): ?>
<?= $this->translate('No downtimes found matching the filter, maybe the downtime already expired.'); ?>
<?php endif ?>
</div>