Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(caldav): Add all selected columns to GROUP BY #47996

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading