Compare commits

...

1 Commits

Author SHA1 Message Date
Thomas Citharel c781e488a6
Consider only reminders with calendar data
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-05-01 11:37:50 +02:00
2 changed files with 10 additions and 2 deletions

View File

@ -68,8 +68,8 @@ class Backend {
$query->select(['cr.*', 'co.calendardata', 'c.displayname', 'c.principaluri'])
->from('calendar_reminders', 'cr')
->where($query->expr()->lte('cr.notification_date', $query->createNamedParameter($this->timeFactory->getTime())))
->leftJoin('cr', 'calendarobjects', 'co', $query->expr()->eq('cr.object_id', 'co.id'))
->leftJoin('cr', 'calendars', 'c', $query->expr()->eq('cr.calendar_id', 'c.id'));
->join('cr', 'calendarobjects', 'co', $query->expr()->eq('cr.object_id', 'co.id'))
->join('cr', 'calendars', 'c', $query->expr()->eq('cr.calendar_id', 'c.id'));
$stmt = $query->execute();
return array_map(

View File

@ -117,6 +117,10 @@ class ReminderService {
? stream_get_contents($reminder['calendardata'])
: $reminder['calendardata'];
if (!$calendarData) {
continue;
}
$vcalendar = $this->parseCalendarData($calendarData);
if (!$vcalendar) {
$this->backend->removeReminder($reminder['id']);
@ -190,6 +194,10 @@ class ReminderService {
? stream_get_contents($objectData['calendardata'])
: $objectData['calendardata'];
if (!$calendarData) {
return;
}
/** @var VObject\Component\VCalendar $vcalendar */
$vcalendar = $this->parseCalendarData($calendarData);
if (!$vcalendar) {