monitoring/list: fix limit=0 check

This used to be fixed, but got accidentally re-broken by last commit
this night.
This commit is contained in:
Thomas Gelf 2014-06-26 16:34:37 +02:00
parent 7f99be73fd
commit a4fc6dedea
1 changed files with 3 additions and 3 deletions

View File

@ -199,11 +199,11 @@ class Monitoring_ListController extends Controller
));
$limit = $this->params->get('limit');
$this->view->limit = $limit;
if ($limit) {
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($this->params->get('limit'));
} else {
$this->view->services = $query->getQuery()->fetchAll();
}
}