Skip to content

Commit

Permalink
fix(caldav): Add all selected columns to GROUP BY
Browse files Browse the repository at this point in the history
Signed-off-by: Git'Fellow <[email protected]>

fix: code style

Signed-off-by: Git'Fellow <[email protected]>
  • Loading branch information
solracsf committed Sep 15, 2024
1 parent 427c7db commit 932bf6e
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions apps/dav/lib/CalDAV/Reminder/Backend.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,10 @@
*/
class Backend {

/** @var IDBConnection */
protected $db;

/** @var ITimeFactory */
private $timeFactory;

/**
* Backend constructor.
*
* @param IDBConnection $db
* @param ITimeFactory $timeFactory
*/
public function __construct(IDBConnection $db,
ITimeFactory $timeFactory) {
$this->db = $db;
$this->timeFactory = $timeFactory;
}
public function __construct(
protected IDBConnection $db,
private ITimeFactory $timeFactory
) {}

/**
* Get all reminders with a notification date before now
Expand All @@ -49,7 +36,7 @@ public function getRemindersToProcess():array {
->where($query->expr()->lte('cr.notification_date', $query->createNamedParameter($this->timeFactory->getTime())))
->join('cr', 'calendarobjects', 'co', $query->expr()->eq('cr.object_id', 'co.id'))
->join('cr', 'calendars', 'c', $query->expr()->eq('cr.calendar_id', 'c.id'))
->groupBy('cr.event_hash', 'cr.notification_date', 'cr.type');
->groupBy('cr.id', 'cr.notification_date', 'cr.event_hash', 'cr.type', 'co.calendardata', 'c.displayname', 'c.principaluri');
$stmt = $query->execute();

return array_map(
Expand Down

0 comments on commit 932bf6e

Please sign in to comment.