Ver Fonte

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

Benjamin Lévêque há 13 anos atrás
pai
commit
5add096a59
1 ficheiros alterados com 2 adições e 2 exclusões
  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());