|
|
|
@ -44,11 +44,12 @@ class Backend { |
|
|
|
|
*/ |
|
|
|
|
public function getRemindersToProcess():array { |
|
|
|
|
$query = $this->db->getQueryBuilder(); |
|
|
|
|
$query->select(['cr.*', 'co.calendardata', 'c.displayname', 'c.principaluri']) |
|
|
|
|
$query->select(['cr.*', 'co.calendardata', 'c.displayname', 'c.principaluri','cr.notification_date', 'cr.event_hash', 'cr.type']) |
|
|
|
|
->from('calendar_reminders', 'cr') |
|
|
|
|
->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')); |
|
|
|
|
->join('cr', 'calendars', 'c', $query->expr()->eq('cr.calendar_id', 'c.id')) |
|
|
|
|
->groupBy('cr.event_hash', 'cr.notification_date', 'cr.type'); |
|
|
|
|
$stmt = $query->execute(); |
|
|
|
|
|
|
|
|
|
return array_map( |
|
|
|
|