aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV/Calendar.php
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2016-07-06 12:19:46 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-09-26 11:55:33 +0200
commit69d3601dcbb17ea9e2d868144159867a79d8e25c (patch)
treeffe81147304b66465c9bb5669397864f6e56542e /apps/dav/lib/CalDAV/Calendar.php
parent244de6451b22a1288d3ef698f48fb9c4e78bf15f (diff)
downloadnextcloud-server-69d3601dcbb17ea9e2d868144159867a79d8e25c.tar.gz
nextcloud-server-69d3601dcbb17ea9e2d868144159867a79d8e25c.zip
Proper work on Publishing
Diffstat (limited to 'apps/dav/lib/CalDAV/Calendar.php')
-rw-r--r--apps/dav/lib/CalDAV/Calendar.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php
index 821a71babb1..f5607c65272 100644
--- a/apps/dav/lib/CalDAV/Calendar.php
+++ b/apps/dav/lib/CalDAV/Calendar.php
@@ -24,13 +24,14 @@
namespace OCA\DAV\CalDAV;
use OCA\DAV\DAV\Sharing\IShareable;
+use Sabre\CalDAV\IShareableCalendar;
use OCP\IL10N;
use Sabre\CalDAV\Backend\BackendInterface;
use Sabre\DAV\Exception\Forbidden;
use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\PropPatch;
-class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
+class Calendar extends \Sabre\CalDAV\Calendar implements IShareable, IShareableCalendar {
public function __construct(BackendInterface $caldavBackend, $calendarInfo, IL10N $l10n) {
parent::__construct($caldavBackend, $calendarInfo);
@@ -89,6 +90,13 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
return $this->calendarInfo['id'];
}
+ /**
+ * @return str
+ */
+ public function getPrincipalURI() {
+ return $this->calendarInfo['principaluri'];
+ }
+
function getACL() {
$acl = [
[
@@ -236,6 +244,20 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
return $uris;
}
+ /**
+ * @param boolean $value
+ */
+ function setPublishStatus($value) {
+ $this->caldavBackend->setPublishStatus($value, $this);
+ }
+
+ /**
+ * @return boolean $value
+ */
+ function getPublishStatus() {
+ return $this->caldavBackend->getPublishStatus($this);
+ }
+
private function canWrite() {
if (isset($this->calendarInfo['{http://owncloud.org/ns}read-only'])) {
return !$this->calendarInfo['{http://owncloud.org/ns}read-only'];