From d4c1b86acb43a9d9a14098d4f75f688245ba472d Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Tue, 25 Aug 2015 16:14:19 -0500 Subject: [PATCH] Don't limit session list - refs #7768 --- main/inc/lib/auth.lib.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/main/inc/lib/auth.lib.php b/main/inc/lib/auth.lib.php index 1ebb7d9359..3242a48f59 100755 --- a/main/inc/lib/auth.lib.php +++ b/main/inc/lib/auth.lib.php @@ -654,12 +654,16 @@ class Auth $qb = $em->createQueryBuilder(); $_sessions = $qb->select('s') - ->from('ChamiloCoreBundle:Session', 's') - ->setFirstResult($limit['start']) - ->setMaxResults($limit['length']) - ->where( - $qb->expr()->gt('s.nbrCourses', 0) - ); + ->from('ChamiloCoreBundle:Session', 's'); + + if (!empty($limit)) { + $_sessions->setFirstResult($limit['start']) + ->setMaxResults($limit['length']); + } + + $_sessions->where( + $qb->expr()->gt('s.nbrCourses', 0) + ); if (!is_null($date)) { $_sessions