Skip to content

Commit

Permalink
Merge pull request #243 from symfony-cmf/route-collection-limit-config
Browse files Browse the repository at this point in the history
support false for no limit as well
  • Loading branch information
lsmith77 committed Apr 24, 2014
2 parents fce8e56 + 4900d6d commit a3afe2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Doctrine/Orm/RouteProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function getRoutesByNames($names = null)
return array();
}

return $this->getRouteRepository()->findBy(array(), null, $this->routeCollectionLimit);
return $this->getRouteRepository()->findBy(array(), null, $this->routeCollectionLimit ?: null);
}

$routes = array();
Expand Down
2 changes: 1 addition & 1 deletion Doctrine/Phpcr/RouteProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private function getAllRoutes()
$this->candidatesStrategy->restrictQuery($qb);

$query = $qb->getQuery();
if (null !== $this->routeCollectionLimit) {
if ($this->routeCollectionLimit) {
$query->setMaxResults($this->routeCollectionLimit);
}

Expand Down

0 comments on commit a3afe2f

Please sign in to comment.