|
@@ -90,9 +90,14 @@ class FilmRepository extends ServiceEntityRepository
|
|
|
$qb = $this->createQueryBuilder('f')
|
|
|
->orderBy('f.'.($filters['sortBy'] ?? 'dateSubmited'), $filters['sortOrder'] ?? 'DESC')
|
|
|
->setMaxResults((int)($filters['limit'] ?? 100))
|
|
|
- ->andWhere('f.note >= :note')
|
|
|
- ->setParameter('note', $filters['note'] ?? 0)
|
|
|
;
|
|
|
+ if ($filters['note']) {
|
|
|
+ $qb
|
|
|
+ ->andWhere('f.note >= :note')
|
|
|
+ ->setParameter('note', $filters['note'])
|
|
|
+ ;
|
|
|
+ }
|
|
|
+
|
|
|
if ($filters['username']) {
|
|
|
$qb
|
|
|
->andWhere('f.authered = :authered')
|