mirror of
https://github.com/nextcloud/server.git
synced 2026-05-22 10:06:37 -04:00
Consider only reminders with calendar data
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
0e57419a4d
commit
57aa0716a1
2 changed files with 10 additions and 2 deletions
|
|
@ -67,8 +67,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(
|
||||
|
|
|
|||
|
|
@ -119,6 +119,10 @@ class ReminderService {
|
|||
? stream_get_contents($reminder['calendardata'])
|
||||
: $reminder['calendardata'];
|
||||
|
||||
if (!$calendarData) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$vcalendar = $this->parseCalendarData($calendarData);
|
||||
if (!$vcalendar) {
|
||||
$this->backend->removeReminder($reminder['id']);
|
||||
|
|
@ -168,6 +172,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 a new issue