aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/CalDAV
diff options
context:
space:
mode:
authorHilmar R <u02@u29lx193>2021-02-28 21:06:16 +0100
committerHilmar R <u02@u29lx193>2021-03-01 18:48:11 +0100
commitc26dede97f626b52b7bf8962ed55d1dbda86abe8 (patch)
tree3c8c9bc97aa09f7ce9afe9bf467cf87bbf2c7d0b /vendor/sabre/dav/lib/CalDAV
parentea3390d626f85b7293a750958bfd1b5460958365 (diff)
downloadvolse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.gz
volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.bz2
volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.zip
get dev
Diffstat (limited to 'vendor/sabre/dav/lib/CalDAV')
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Backend/PDO.php23
-rw-r--r--vendor/sabre/dav/lib/CalDAV/CalendarQueryValidator.php26
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Schedule/Plugin.php1
-rw-r--r--vendor/sabre/dav/lib/CalDAV/SharingPlugin.php4
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Xml/Filter/CalendarData.php1
5 files changed, 34 insertions, 21 deletions
diff --git a/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php b/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php
index 7a07724b3..0d5df3968 100644
--- a/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php
+++ b/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php
@@ -7,6 +7,7 @@ namespace Sabre\CalDAV\Backend;
use Sabre\CalDAV;
use Sabre\DAV;
use Sabre\DAV\Exception\Forbidden;
+use Sabre\DAV\PropPatch;
use Sabre\DAV\Xml\Element\Sharee;
use Sabre\VObject;
@@ -289,7 +290,7 @@ SQL
*
* @param mixed $calendarId
*/
- public function updateCalendar($calendarId, \Sabre\DAV\PropPatch $propPatch)
+ public function updateCalendar($calendarId, PropPatch $propPatch)
{
if (!is_array($calendarId)) {
throw new \InvalidArgumentException('The value passed to $calendarId is expected to be an array with a calendarId and an instanceId');
@@ -779,17 +780,20 @@ SQL
$componentType = $filters['comp-filters'][0]['name'];
// Checking if we need post-filters
- if (!$filters['prop-filters'] && !$filters['comp-filters'][0]['comp-filters'] && !$filters['comp-filters'][0]['time-range'] && !$filters['comp-filters'][0]['prop-filters']) {
+ $has_time_range = array_key_exists('time-range', $filters['comp-filters'][0]) && $filters['comp-filters'][0]['time-range'];
+ if (!$filters['prop-filters'] && !$filters['comp-filters'][0]['comp-filters'] && !$has_time_range && !$filters['comp-filters'][0]['prop-filters']) {
$requirePostFilter = false;
}
// There was a time-range filter
- if ('VEVENT' == $componentType && isset($filters['comp-filters'][0]['time-range'])) {
+ if ('VEVENT' == $componentType && $has_time_range) {
$timeRange = $filters['comp-filters'][0]['time-range'];
// If start time OR the end time is not specified, we can do a
// 100% accurate mysql query.
- if (!$filters['prop-filters'] && !$filters['comp-filters'][0]['comp-filters'] && !$filters['comp-filters'][0]['prop-filters'] && (!$timeRange['start'] || !$timeRange['end'])) {
- $requirePostFilter = false;
+ if (!$filters['prop-filters'] && !$filters['comp-filters'][0]['comp-filters'] && !$filters['comp-filters'][0]['prop-filters'] && $timeRange) {
+ if ((array_key_exists('start', $timeRange) && !$timeRange['start']) || (array_key_exists('end', $timeRange) && !$timeRange['end'])) {
+ $requirePostFilter = false;
+ }
}
}
}
@@ -809,11 +813,11 @@ SQL
$values['componenttype'] = $componentType;
}
- if ($timeRange && $timeRange['start']) {
+ if ($timeRange && array_key_exists('start', $timeRange) && $timeRange['start']) {
$query .= ' AND lastoccurence > :startdate';
$values['startdate'] = $timeRange['start']->getTimeStamp();
}
- if ($timeRange && $timeRange['end']) {
+ if ($timeRange && array_key_exists('end', $timeRange) && $timeRange['end']) {
$query .= ' AND firstoccurence < :enddate';
$values['enddate'] = $timeRange['end']->getTimeStamp();
}
@@ -1153,10 +1157,9 @@ SQL;
*
* Read the PropPatch documentation for more info and examples.
*
- * @param mixed $subscriptionId
- * @param \Sabre\DAV\PropPatch $propPatch
+ * @param mixed $subscriptionId
*/
- public function updateSubscription($subscriptionId, DAV\PropPatch $propPatch)
+ public function updateSubscription($subscriptionId, PropPatch $propPatch)
{
$supportedProperties = array_keys($this->subscriptionPropertyMap);
$supportedProperties[] = '{http://calendarserver.org/ns/}source';
diff --git a/vendor/sabre/dav/lib/CalDAV/CalendarQueryValidator.php b/vendor/sabre/dav/lib/CalDAV/CalendarQueryValidator.php
index 7ce1c05b7..ee525da7a 100644
--- a/vendor/sabre/dav/lib/CalDAV/CalendarQueryValidator.php
+++ b/vendor/sabre/dav/lib/CalDAV/CalendarQueryValidator.php
@@ -67,9 +67,17 @@ class CalendarQueryValidator
return false;
}
- if ($filter['time-range']) {
+ if (array_key_exists('time-range', $filter) && $filter['time-range']) {
foreach ($parent->{$filter['name']} as $subComponent) {
- if ($this->validateTimeRange($subComponent, $filter['time-range']['start'], $filter['time-range']['end'])) {
+ $start = null;
+ $end = null;
+ if (array_key_exists('start', $filter['time-range'])) {
+ $start = $filter['time-range']['start'];
+ }
+ if (array_key_exists('end', $filter['time-range'])) {
+ $end = $filter['time-range']['end'];
+ }
+ if ($this->validateTimeRange($subComponent, $start, $end)) {
continue 2;
}
}
@@ -128,9 +136,17 @@ class CalendarQueryValidator
return false;
}
- if ($filter['time-range']) {
+ if (array_key_exists('time-range', $filter) && $filter['time-range']) {
foreach ($parent->{$filter['name']} as $subComponent) {
- if ($this->validateTimeRange($subComponent, $filter['time-range']['start'], $filter['time-range']['end'])) {
+ $start = null;
+ $end = null;
+ if (array_key_exists('start', $filter['time-range'])) {
+ $start = $filter['time-range']['start'];
+ }
+ if (array_key_exists('end', $filter['time-range'])) {
+ $end = $filter['time-range']['end'];
+ }
+ if ($this->validateTimeRange($subComponent, $start, $end)) {
continue 2;
}
}
@@ -258,11 +274,9 @@ class CalendarQueryValidator
case 'VEVENT':
case 'VTODO':
case 'VJOURNAL':
-
return $component->isInTimeRange($start, $end);
case 'VALARM':
-
// If the valarm is wrapped in a recurring event, we need to
// expand the recursions, and validate each.
//
diff --git a/vendor/sabre/dav/lib/CalDAV/Schedule/Plugin.php b/vendor/sabre/dav/lib/CalDAV/Schedule/Plugin.php
index a1f8202ec..38a7ca96f 100644
--- a/vendor/sabre/dav/lib/CalDAV/Schedule/Plugin.php
+++ b/vendor/sabre/dav/lib/CalDAV/Schedule/Plugin.php
@@ -486,6 +486,7 @@ class Plugin extends ServerPlugin
$currentObject = null;
$objectNode = null;
+ $oldICalendarData = null;
$isNewNode = false;
$result = $home->getCalendarObjectByUID($uid);
diff --git a/vendor/sabre/dav/lib/CalDAV/SharingPlugin.php b/vendor/sabre/dav/lib/CalDAV/SharingPlugin.php
index 090cc34bf..f7dca9be6 100644
--- a/vendor/sabre/dav/lib/CalDAV/SharingPlugin.php
+++ b/vendor/sabre/dav/lib/CalDAV/SharingPlugin.php
@@ -213,7 +213,6 @@ class SharingPlugin extends DAV\ServerPlugin
// Both the DAV:share-resource and CALENDARSERVER:share requests
// behave identically.
case '{'.Plugin::NS_CALENDARSERVER.'}share':
-
$sharingPlugin = $this->server->getPlugin('sharing');
$sharingPlugin->shareResource($path, $message->sharees);
@@ -228,7 +227,6 @@ class SharingPlugin extends DAV\ServerPlugin
// The invite-reply document is sent when the user replies to an
// invitation of a calendar share.
case '{'.Plugin::NS_CALENDARSERVER.'}invite-reply':
-
// This only works on the calendar-home-root node.
if (!$node instanceof CalendarHome) {
return;
@@ -272,7 +270,6 @@ class SharingPlugin extends DAV\ServerPlugin
return false;
case '{'.Plugin::NS_CALENDARSERVER.'}publish-calendar':
-
// We can only deal with IShareableCalendar objects
if (!$node instanceof ISharedCalendar) {
return;
@@ -300,7 +297,6 @@ class SharingPlugin extends DAV\ServerPlugin
return false;
case '{'.Plugin::NS_CALENDARSERVER.'}unpublish-calendar':
-
// We can only deal with IShareableCalendar objects
if (!$node instanceof ISharedCalendar) {
return;
diff --git a/vendor/sabre/dav/lib/CalDAV/Xml/Filter/CalendarData.php b/vendor/sabre/dav/lib/CalDAV/Xml/Filter/CalendarData.php
index baa4250ab..c9656d8a3 100644
--- a/vendor/sabre/dav/lib/CalDAV/Xml/Filter/CalendarData.php
+++ b/vendor/sabre/dav/lib/CalDAV/Xml/Filter/CalendarData.php
@@ -60,7 +60,6 @@ class CalendarData implements XmlDeserializable
foreach ($elems as $elem) {
switch ($elem['name']) {
case '{'.Plugin::NS_CALDAV.'}expand':
-
$result['expand'] = [
'start' => isset($elem['attributes']['start']) ? DateTimeParser::parseDateTime($elem['attributes']['start']) : null,
'end' => isset($elem['attributes']['end']) ? DateTimeParser::parseDateTime($elem['attributes']['end']) : null,