Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps/dav
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2020-05-01 12:37:50 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2022-02-18 17:57:02 +0300
commit2217e459dc07e7126abdcc4d14fb2134aecb9fdf (patch)
tree0b9eed7c06f6cb08f25e545d31be1547e775c08d /apps/dav
parentf69a79ed6c15559cdf68cf3a9d7120f8b4a81671 (diff)
Consider only reminders with calendar data
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/CalDAV/Reminder/Backend.php4
-rw-r--r--apps/dav/lib/CalDAV/Reminder/ReminderService.php8
2 files changed, 10 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/Reminder/Backend.php b/apps/dav/lib/CalDAV/Reminder/Backend.php
index 48b1e9aed46..b0476e9594c 100644
--- a/apps/dav/lib/CalDAV/Reminder/Backend.php
+++ b/apps/dav/lib/CalDAV/Reminder/Backend.php
@@ -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(
diff --git a/apps/dav/lib/CalDAV/Reminder/ReminderService.php b/apps/dav/lib/CalDAV/Reminder/ReminderService.php
index ad5c18d477d..109fc95e9be 100644
--- a/apps/dav/lib/CalDAV/Reminder/ReminderService.php
+++ b/apps/dav/lib/CalDAV/Reminder/ReminderService.php
@@ -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) {