release 1.16.1 (#2938)

* optional csrf token name
* fix regression when selecting all projects as super user
* prevent invalid sql
This commit is contained in:
Kevin Papst
2021-11-16 21:48:50 +01:00
committed by GitHub
parent 99ebd1d503
commit c858edf5c9
4 changed files with 9 additions and 5 deletions

View File

@@ -372,7 +372,9 @@ class ProjectRepository extends EntityRepository
// begin > from and end < to
// ... and more ...
$times = $this->addProjectStartAndEndDate($qb, $query->getProjectStart(), $query->getProjectEnd());
$qb->andWhere($times);
if ($times->count() > 0) {
$qb->andWhere($times);
}
$this->addPermissionCriteria($qb, $query->getCurrentUser());

View File

@@ -228,6 +228,8 @@ class TeamRepository extends EntityRepository
$qb->setParameter('teamIds', array_unique($ids));
}
$qb->andWhere($or);
if ($or->count() > 0) {
$qb->andWhere($or);
}
}
}

View File

@@ -533,8 +533,8 @@ class TimesheetRepository extends EntityRepository
$or->add($qb->expr()->between('t.end', ':begin', ':end'));
$qb->select('t, p, a, c')
->from(Timesheet::class, 't')
->andWhere($qb->expr()->isNotNull('t.end'))
->from(Timesheet::class, 't')
->andWhere($qb->expr()->isNotNull('t.end'))
->andWhere($or)
->orderBy('t.begin', 'DESC')
->setParameter('begin', $begin)