mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Fix Paginator use
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Doctrine\ORM\Tools\Pagination\Paginator;
|
||||
|
||||
/**
|
||||
*
|
||||
* @package
|
||||
@@ -98,6 +100,9 @@ class patch_361 implements patchInterface
|
||||
|
||||
$dql = "SELECT b FROM Entities\Basket b WHERE b.description != ''";
|
||||
|
||||
$n = 0;
|
||||
$perPage = 100;
|
||||
|
||||
$query = $em->createQuery($dql)
|
||||
->setFirstResult($n)
|
||||
->setMaxResults($perPage);
|
||||
@@ -106,9 +111,6 @@ class patch_361 implements patchInterface
|
||||
|
||||
$count = count($paginator);
|
||||
|
||||
$n = 0;
|
||||
$perPage = 100;
|
||||
|
||||
while ($n < $count)
|
||||
{
|
||||
$query = $em->createQuery($dql)
|
||||
|
Reference in New Issue
Block a user