Consider only reminders with calendar data
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
c724eb24d5
commit
c781e488a6
|
@ -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(
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue