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

refs #9632
This commit is contained in:
Johannes Meyer 2015-08-03 15:35:07 +02:00
parent 028342adfe
commit 29fd849cca
1 changed files with 4 additions and 8 deletions

View File

@ -8,14 +8,7 @@
</div>
<?php endif ?>
<div data-base-target="_next" class="content contacts">
<?php
if (count($contacts) === 0) {
echo $this->translate('No contacts found matching the filter') . '</div>';
return;
}
?>
<?php foreach ($contacts as $contact): ?>
<?php foreach ($contacts as $contact): ?>
<div class="contact">
<?= $this->img('/static/gravatar', array('email' => $contact->contact_email)); ?>
<strong><?= $this->qlink(
@ -59,4 +52,7 @@ if (count($contacts) === 0) {
if (true): /* The following piece of HTML MUST be nested in <?php */ ?>
<div style="clear: both;"></div>
<?php endif; ?>
<?php if (! $contacts->hasResult()): ?>
<?= $this->translate('No contacts found matching the filter'); ?>
<?php endif ?>
</div>