aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/CalDAV/Backend
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/lib/CalDAV/Backend')
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Backend/AbstractBackend.php6
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Backend/NotificationSupport.php4
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Backend/PDO.php68
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Backend/SharingSupport.php6
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Backend/SimplePDO.php14
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Backend/SubscriptionSupport.php2
6 files changed, 51 insertions, 49 deletions
diff --git a/vendor/sabre/dav/lib/CalDAV/Backend/AbstractBackend.php b/vendor/sabre/dav/lib/CalDAV/Backend/AbstractBackend.php
index d58b4a46e..311b1c415 100644
--- a/vendor/sabre/dav/lib/CalDAV/Backend/AbstractBackend.php
+++ b/vendor/sabre/dav/lib/CalDAV/Backend/AbstractBackend.php
@@ -2,8 +2,8 @@
namespace Sabre\CalDAV\Backend;
-use Sabre\VObject;
use Sabre\CalDAV;
+use Sabre\VObject;
/**
* Abstract Calendaring backend. Extend this class to create your own backends.
@@ -26,9 +26,9 @@ abstract class AbstractBackend implements BackendInterface {
* Calling the handle method is like telling the PropPatch object "I
* promise I can handle updating this property".
*
- * Read the PropPatch documenation for more info and examples.
+ * Read the PropPatch documentation for more info and examples.
*
- * @param string $path
+ * @param mixed $calendarId
* @param \Sabre\DAV\PropPatch $propPatch
* @return void
*/
diff --git a/vendor/sabre/dav/lib/CalDAV/Backend/NotificationSupport.php b/vendor/sabre/dav/lib/CalDAV/Backend/NotificationSupport.php
index 9c00a89ef..bf2ef27a0 100644
--- a/vendor/sabre/dav/lib/CalDAV/Backend/NotificationSupport.php
+++ b/vendor/sabre/dav/lib/CalDAV/Backend/NotificationSupport.php
@@ -49,8 +49,8 @@ interface NotificationSupport extends BackendInterface {
* If the user chose to accept the share, this method should return the
* newly created calendar url.
*
- * @param string href The sharee who is replying (often a mailto: address)
- * @param int status One of the SharingPlugin::STATUS_* constants
+ * @param string $href The sharee who is replying (often a mailto: address)
+ * @param int $status One of the SharingPlugin::STATUS_* constants
* @param string $calendarUri The url to the calendar thats being shared
* @param string $inReplyTo The unique id this message is a response to
* @param string $summary A description of the reply
diff --git a/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php b/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php
index 95f1d49a6..458440588 100644
--- a/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php
+++ b/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php
@@ -5,8 +5,8 @@ namespace Sabre\CalDAV\Backend;
use Sabre\CalDAV;
use Sabre\DAV;
use Sabre\DAV\Exception\Forbidden;
-use Sabre\VObject;
use Sabre\DAV\Xml\Element\Sharee;
+use Sabre\VObject;
/**
* PDO CalDAV backend
@@ -296,7 +296,7 @@ SQL
* Calling the handle method is like telling the PropPatch object "I
* promise I can handle updating this property".
*
- * Read the PropPatch documenation for more info and examples.
+ * Read the PropPatch documentation for more info and examples.
*
* @param mixed $calendarId
* @param \Sabre\DAV\PropPatch $propPatch
@@ -481,13 +481,13 @@ SQL
if (!$row) return null;
return [
- 'id' => $row['id'],
- 'uri' => $row['uri'],
- 'lastmodified' => (int)$row['lastmodified'],
- 'etag' => '"' . $row['etag'] . '"',
- 'size' => (int)$row['size'],
- 'calendardata' => $row['calendardata'],
- 'component' => strtolower($row['componenttype']),
+ 'id' => $row['id'],
+ 'uri' => $row['uri'],
+ 'lastmodified' => (int)$row['lastmodified'],
+ 'etag' => '"' . $row['etag'] . '"',
+ 'size' => (int)$row['size'],
+ 'calendardata' => $row['calendardata'],
+ 'component' => strtolower($row['componenttype']),
];
}
@@ -511,27 +511,29 @@ SQL
}
list($calendarId, $instanceId) = $calendarId;
- $query = 'SELECT id, uri, lastmodified, etag, calendarid, size, calendardata, componenttype FROM ' . $this->calendarObjectTableName . ' WHERE calendarid = ? AND uri IN (';
- // Inserting a whole bunch of question marks
- $query .= implode(',', array_fill(0, count($uris), '?'));
- $query .= ')';
+ $result = [];
+ foreach (array_chunk($uris, 900) as $chunk) {
+ $query = 'SELECT id, uri, lastmodified, etag, calendarid, size, calendardata, componenttype FROM ' . $this->calendarObjectTableName . ' WHERE calendarid = ? AND uri IN (';
+ // Inserting a whole bunch of question marks
+ $query .= implode(',', array_fill(0, count($chunk), '?'));
+ $query .= ')';
- $stmt = $this->pdo->prepare($query);
- $stmt->execute(array_merge([$calendarId], $uris));
+ $stmt = $this->pdo->prepare($query);
+ $stmt->execute(array_merge([$calendarId], $chunk));
- $result = [];
- while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
+ while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
- $result[] = [
- 'id' => $row['id'],
- 'uri' => $row['uri'],
- 'lastmodified' => (int)$row['lastmodified'],
- 'etag' => '"' . $row['etag'] . '"',
- 'size' => (int)$row['size'],
- 'calendardata' => $row['calendardata'],
- 'component' => strtolower($row['componenttype']),
- ];
+ $result[] = [
+ 'id' => $row['id'],
+ 'uri' => $row['uri'],
+ 'lastmodified' => (int)$row['lastmodified'],
+ 'etag' => '"' . $row['etag'] . '"',
+ 'size' => (int)$row['size'],
+ 'calendardata' => $row['calendardata'],
+ 'component' => strtolower($row['componenttype']),
+ ];
+ }
}
return $result;
@@ -686,7 +688,7 @@ SQL
}
}
-
+
// Ensure Occurence values are positive
if ($firstOccurence < 0) $firstOccurence = 0;
if ($lastOccurence < 0) $lastOccurence = 0;
@@ -769,7 +771,7 @@ SQL
* Note that especially time-range-filters may be difficult to parse. A
* time-range filter specified on a VEVENT must for instance also handle
* recurrence rules correctly.
- * A good example of how to interprete all these filters can also simply
+ * A good example of how to interpret all these filters can also simply
* be found in \Sabre\CalDAV\CalendarQueryFilter. This class is as correct
* as possible, so it gives you a good idea on what type of stuff you need
* to think of.
@@ -969,7 +971,7 @@ SQL;
// Current synctoken
$stmt = $this->pdo->prepare('SELECT synctoken FROM ' . $this->calendarTableName . ' WHERE id = ?');
- $stmt->execute([ $calendarId ]);
+ $stmt->execute([$calendarId]);
$currentToken = $stmt->fetchColumn(0);
if (is_null($currentToken)) return null;
@@ -1181,7 +1183,7 @@ SQL;
* Calling the handle method is like telling the PropPatch object "I
* promise I can handle updating this property".
*
- * Read the PropPatch documenation for more info and examples.
+ * Read the PropPatch documentation for more info and examples.
*
* @param mixed $subscriptionId
* @param \Sabre\DAV\PropPatch $propPatch
@@ -1327,7 +1329,7 @@ SQL;
function createSchedulingObject($principalUri, $objectUri, $objectData) {
$stmt = $this->pdo->prepare('INSERT INTO ' . $this->schedulingObjectTableName . ' (principaluri, calendardata, uri, lastmodified, etag, size) VALUES (?, ?, ?, ?, ?, ?)');
- $stmt->execute([$principalUri, $objectData, $objectUri, time(), md5($objectData), strlen($objectData) ]);
+ $stmt->execute([$principalUri, $objectData, $objectUri, time(), md5($objectData), strlen($objectData)]);
}
@@ -1483,7 +1485,7 @@ SQL;
'inviteStatus' => (int)$row['share_invitestatus'],
'properties' =>
!empty($row['share_displayname'])
- ? [ '{DAV:}displayname' => $row['share_displayname'] ]
+ ? ['{DAV:}displayname' => $row['share_displayname']]
: [],
'principal' => $row['principaluri'],
]);
@@ -1502,7 +1504,7 @@ SQL;
*/
function setPublishStatus($calendarId, $value) {
- throw new \Sabre\DAV\Exception\NotImplemented('Not implemented');
+ throw new DAV\Exception\NotImplemented('Not implemented');
}
diff --git a/vendor/sabre/dav/lib/CalDAV/Backend/SharingSupport.php b/vendor/sabre/dav/lib/CalDAV/Backend/SharingSupport.php
index 8b6e074e0..278ec2564 100644
--- a/vendor/sabre/dav/lib/CalDAV/Backend/SharingSupport.php
+++ b/vendor/sabre/dav/lib/CalDAV/Backend/SharingSupport.php
@@ -11,9 +11,9 @@ namespace Sabre\CalDAV\Backend;
* 1. Return shared calendars for users.
* 2. For every calendar, return calendar-resource-uri. This strings is a URI or
* relative URI reference that must be unique for every calendar, but
- * identical for every instance of the same shared calenar.
- * 3. For every calenar, you must return a share-access element. This element
- * should contain one of the Sabre\DAV\Sharing\Plugin:ACCESS_* contants and
+ * identical for every instance of the same shared calendar.
+ * 3. For every calendar, you must return a share-access element. This element
+ * should contain one of the Sabre\DAV\Sharing\Plugin:ACCESS_* constants and
* indicates the access level the user has.
*
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
diff --git a/vendor/sabre/dav/lib/CalDAV/Backend/SimplePDO.php b/vendor/sabre/dav/lib/CalDAV/Backend/SimplePDO.php
index f8238ea9a..d21f7f916 100644
--- a/vendor/sabre/dav/lib/CalDAV/Backend/SimplePDO.php
+++ b/vendor/sabre/dav/lib/CalDAV/Backend/SimplePDO.php
@@ -8,7 +8,7 @@ use Sabre\DAV;
/**
* Simple PDO CalDAV backend.
*
- * This class is basically the most minmum example to get a caldav backend up
+ * This class is basically the most minimum example to get a caldav backend up
* and running. This class uses the following schema (MySQL example):
*
* CREATE TABLE simple_calendars (
@@ -209,12 +209,12 @@ class SimplePDO extends AbstractBackend {
if (!$row) return null;
return [
- 'id' => $row['id'],
- 'uri' => $row['uri'],
- 'etag' => '"' . md5($row['calendardata']) . '"',
- 'calendarid' => $calendarId,
- 'size' => strlen($row['calendardata']),
- 'calendardata' => $row['calendardata'],
+ 'id' => $row['id'],
+ 'uri' => $row['uri'],
+ 'etag' => '"' . md5($row['calendardata']) . '"',
+ 'calendarid' => $calendarId,
+ 'size' => strlen($row['calendardata']),
+ 'calendardata' => $row['calendardata'],
];
}
diff --git a/vendor/sabre/dav/lib/CalDAV/Backend/SubscriptionSupport.php b/vendor/sabre/dav/lib/CalDAV/Backend/SubscriptionSupport.php
index a39289f5e..d77a2fe0f 100644
--- a/vendor/sabre/dav/lib/CalDAV/Backend/SubscriptionSupport.php
+++ b/vendor/sabre/dav/lib/CalDAV/Backend/SubscriptionSupport.php
@@ -70,7 +70,7 @@ interface SubscriptionSupport extends BackendInterface {
* Calling the handle method is like telling the PropPatch object "I
* promise I can handle updating this property".
*
- * Read the PropPatch documenation for more info and examples.
+ * Read the PropPatch documentation for more info and examples.
*
* @param mixed $subscriptionId
* @param \Sabre\DAV\PropPatch $propPatch