list/limits: special treatment for 0 only, not null
This commit is contained in:
parent
7112ed23f4
commit
c85a0ac11e
|
@ -175,11 +175,11 @@ class Monitoring_ListController extends Controller
|
|||
));
|
||||
$limit = $this->params->get('limit');
|
||||
$this->view->limit = $limit;
|
||||
if ($limit) {
|
||||
// TODO: Workaround, paginate should be able to fetch limit from new params
|
||||
$this->view->services = $query->paginate($this->params->get('limit'));
|
||||
} else {
|
||||
if ($limit === 0) {
|
||||
$this->view->services = $query->getQuery()->fetchAll();
|
||||
} else {
|
||||
// TODO: Workaround, paginate should be able to fetch limit from new params
|
||||
$this->view->services = $query->paginate($limit);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,11 +10,11 @@ if (!$this->compact): ?>
|
|||
<?= $this->filterPreview ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php if ($this->limit): ?>
|
||||
<?php if ($this->limit === 0): ?>
|
||||
<?= $this->widget('limiter') ?>
|
||||
<?php else: ?>
|
||||
<?= $this->widget('limiter')->setCurrentPageCount($this->services->count()) ?>
|
||||
<?= $this->paginationControl($services, null, null, array('preserve' => $this->preserve)) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->widget('limiter') ?>
|
||||
<?php endif ?>
|
||||
<?= $this->selectionToolbar('multi', $this->href('monitoring/multi/service?' . $this->filter->toQueryString())) ?>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue