浏览代码

Allow the user to define null as maxPerPage and display all the result instead of 0

Benjamin Lévêque 13 年之前
父节点
当前提交
5add096a59
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Datagrid/ORM/Pager.php

+ 2 - 2
Datagrid/ORM/Pager.php

@@ -69,8 +69,8 @@ class Pager extends BasePager
 
         $this->setNbResults($this->computeNbResult());
 
-        $this->getQuery()->setFirstResult(0);
-        $this->getQuery()->setMaxResults(0);
+        $this->getQuery()->setFirstResult(null);
+        $this->getQuery()->setMaxResults(null);
 
         if (count($this->getParameters()) > 0) {
             $this->getQuery()->setParameters($this->getParameters());