summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV/Publishing
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2016-07-12 16:19:21 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-09-26 11:55:37 +0200
commit2df69ec7f4b049807901cff0f650b9debca76965 (patch)
tree312b7f451d33191bb1252dec143751e5730a3c44 /apps/dav/lib/CalDAV/Publishing
parentaca305332ad3fdd2a10cb94c1a952eb1e2720a10 (diff)
downloadnextcloud-server-2df69ec7f4b049807901cff0f650b9debca76965.tar.gz
nextcloud-server-2df69ec7f4b049807901cff0f650b9debca76965.zip
correct get published status and minor fixes
Diffstat (limited to 'apps/dav/lib/CalDAV/Publishing')
-rw-r--r--apps/dav/lib/CalDAV/Publishing/PublishPlugin.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
index 109e1158555..938510f1ccf 100644
--- a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
+++ b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
@@ -6,6 +6,7 @@ use Sabre\DAV\PropFind;
use Sabre\DAV\INode;
use Sabre\DAV\Server;
use Sabre\DAV\ServerPlugin;
+use Sabre\DAV\Exception\NotFound;
use Sabre\HTTP\RequestInterface;
use Sabre\HTTP\ResponseInterface;
use OCA\DAV\CalDAV\Publishing\Xml\Publisher;
@@ -102,14 +103,14 @@ class PublishPlugin extends ServerPlugin
$publishUrl = $this->urlGenerator->getAbsoluteURL($this->server->getBaseUri().'public-calendars/').$token;
$propFind->handle('{'.self::NS_CALENDARSERVER.'}publish-url', function () use ($node, $publishUrl) {
- if ($node->getPublishStatus()) {
- return new Publisher($publishUrl, true); // We return the publish-url only if the calendar is published.
- }
- });
+ if ($node->getPublishStatus()) {
+ return new Publisher($publishUrl, true); // We return the publish-url only if the calendar is published.
+ }
+ });
$propFind->handle('{'.self::NS_CALENDARSERVER.'}pre-publish-url', function () use ($node, $publishUrl) {
return new Publisher($publishUrl, false); // The pre-publish-url is always returned
- });
+ });
}
}
@@ -134,7 +135,7 @@ class PublishPlugin extends ServerPlugin
// Making sure the node exists
try {
$node = $this->server->tree->getNodeForPath($path);
- } catch (DAV\Exception\NotFound $e) {
+ } catch (NotFound $e) {
return;
}