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

refs #9632
This commit is contained in:
Johannes Meyer 2015-08-03 16:28:25 +02:00
parent d78f69368c
commit 3b36009122
1 changed files with 9 additions and 3 deletions

View File

@ -49,7 +49,12 @@ if ($this->hasPermission('config/authentication/groups/edit') && $backend instan
<?php endif ?> <?php endif ?>
</div> </div>
<div class="content members" data-base-target="_next"> <div class="content members" data-base-target="_next">
<?php if (count($members) > 0): ?> <?php
$firstRow = true;
foreach ($members as $member): ?>
<?php if ($firstRow): ?>
<?php $firstRow = false; ?>
<table data-base-target="_next" class="action member-list"> <table data-base-target="_next" class="action member-list">
<thead> <thead>
<tr> <tr>
@ -60,7 +65,7 @@ if ($this->hasPermission('config/authentication/groups/edit') && $backend instan
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php foreach ($members as $member): ?> <?php endif ?>
<tr> <tr>
<td class="member-name"><?= $this->escape($member->user_name); ?></td> <td class="member-name"><?= $this->escape($member->user_name); ?></td>
<?php if (isset($removeForm)): ?> <?php if (isset($removeForm)): ?>
@ -69,7 +74,8 @@ if ($this->hasPermission('config/authentication/groups/edit') && $backend instan
</td> </td>
<?php endif ?> <?php endif ?>
</tr> </tr>
<?php endforeach ?> <?php endforeach ?>
<?php if ($members->hasResult()): ?>
</tbody> </tbody>
</table> </table>
<?php else: ?> <?php else: ?>