mirror of
https://github.com/werkraum-media/events.git
synced 2024-11-14 05:16:10 +01:00
Fix wrong converted condition
The condition was changed when types where properly added. The actual meaning was changed by accident and is now fixed again.
This commit is contained in:
parent
6226fb32d4
commit
26cc0d3f8c
1 changed files with 3 additions and 3 deletions
|
@ -61,14 +61,14 @@ class DateRepository extends Repository
|
||||||
$constraints['userCategories'] = $query->in('event.categories.uid', $demand->getUserCategories());
|
$constraints['userCategories'] = $query->in('event.categories.uid', $demand->getUserCategories());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($demand->getStart() !== '') {
|
if ($demand->getStart() !== null) {
|
||||||
$constraints['starts'] = $query->greaterThanOrEqual('start', $demand->getStart());
|
$constraints['starts'] = $query->greaterThanOrEqual('start', $demand->getStart());
|
||||||
}
|
}
|
||||||
if ($demand->getEnd() != '') {
|
if ($demand->getEnd() != null) {
|
||||||
$constraints['ends'] = $query->lessThanOrEqual('end', $demand->getEnd());
|
$constraints['ends'] = $query->lessThanOrEqual('end', $demand->getEnd());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($demand->getStart() !== null && $demand->getEnd() !== null) {
|
if ($demand->getStart() === null && $demand->getEnd() === null) {
|
||||||
$now = new \DateTime('now', new \DateTimeZone('Europe/Berlin'));
|
$now = new \DateTime('now', new \DateTimeZone('Europe/Berlin'));
|
||||||
$constraints['untilnow'] = $query->greaterThanOrEqual('start', $now);
|
$constraints['untilnow'] = $query->greaterThanOrEqual('start', $now);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue