aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/CalDAV
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/lib/CalDAV')
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Backend/PDO.php13
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Backend/SchedulingSupport.php6
2 files changed, 13 insertions, 6 deletions
diff --git a/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php b/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php
index 003dc1392..da601fad8 100644
--- a/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php
+++ b/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php
@@ -874,6 +874,8 @@ WHERE
calendar_instances.principaluri = ?
AND
calendarobjects.uid = ?
+ AND
+ calendar_instances.access = 1
SQL;
$stmt = $this->pdo->prepare($query);
@@ -1286,13 +1288,18 @@ SQL;
/**
* Creates a new scheduling object. This should land in a users' inbox.
*
- * @param string $principalUri
- * @param string $objectUri
- * @param string $objectData
+ * @param string $principalUri
+ * @param string $objectUri
+ * @param string|resource $objectData
*/
public function createSchedulingObject($principalUri, $objectUri, $objectData)
{
$stmt = $this->pdo->prepare('INSERT INTO '.$this->schedulingObjectTableName.' (principaluri, calendardata, uri, lastmodified, etag, size) VALUES (?, ?, ?, ?, ?, ?)');
+
+ if (is_resource($objectData)) {
+ $objectData = stream_get_contents($objectData);
+ }
+
$stmt->execute([$principalUri, $objectData, $objectUri, time(), md5($objectData), strlen($objectData)]);
}
diff --git a/vendor/sabre/dav/lib/CalDAV/Backend/SchedulingSupport.php b/vendor/sabre/dav/lib/CalDAV/Backend/SchedulingSupport.php
index 7986d8c33..69467e554 100644
--- a/vendor/sabre/dav/lib/CalDAV/Backend/SchedulingSupport.php
+++ b/vendor/sabre/dav/lib/CalDAV/Backend/SchedulingSupport.php
@@ -58,9 +58,9 @@ interface SchedulingSupport extends BackendInterface
/**
* Creates a new scheduling object. This should land in a users' inbox.
*
- * @param string $principalUri
- * @param string $objectUri
- * @param string $objectData
+ * @param string $principalUri
+ * @param string $objectUri
+ * @param string|resource $objectData
*/
public function createSchedulingObject($principalUri, $objectUri, $objectData);
}