diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-05-22 22:58:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-22 22:58:24 +0200 |
commit | 237a493b6ad8cf5e0ac44accfb53fbe0629c5a47 (patch) | |
tree | d46494e376fc4692bbdd7ba1defbad37e8901479 | |
parent | 3d306bfef32f99dbb6e8369d54bcd3d8e0d64216 (diff) | |
parent | 98a93d5226c01a657a18819eddc7ccb95762ee47 (diff) | |
download | nextcloud-server-237a493b6ad8cf5e0ac44accfb53fbe0629c5a47.tar.gz nextcloud-server-237a493b6ad8cf5e0ac44accfb53fbe0629c5a47.zip |
Merge pull request #15676 from nextcloud/revert/9609
Revert "send invitations for shared calendars"
-rw-r--r-- | apps/dav/lib/CalDAV/Schedule/Plugin.php | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/apps/dav/lib/CalDAV/Schedule/Plugin.php b/apps/dav/lib/CalDAV/Schedule/Plugin.php index 227a1c11eda..1b262efd4f5 100644 --- a/apps/dav/lib/CalDAV/Schedule/Plugin.php +++ b/apps/dav/lib/CalDAV/Schedule/Plugin.php @@ -31,10 +31,6 @@ use Sabre\DAV\PropFind; use Sabre\DAV\Server; use Sabre\DAV\Xml\Property\LocalHref; use Sabre\DAVACL\IPrincipal; -use Sabre\HTTP\RequestInterface; -use Sabre\HTTP\ResponseInterface; -use Sabre\VObject\Component\VCalendar; -use Sabre\VObject\Reader; class Plugin extends \Sabre\CalDAV\Schedule\Plugin { @@ -139,67 +135,4 @@ class Plugin extends \Sabre\CalDAV\Schedule\Plugin { }); } } - - /** - * This method is triggered whenever there was a calendar object gets - * created or updated. - * - * Basically just a copy of parent::calendarObjectChange, with the change - * from: - * $addresses = $this->getAddressesForPrincipal($calendarNode->getOwner()); - * to: - * $addresses = $this->getAddressesForPrincipal($calendarNode->getPrincipalURI()); - * - * @param RequestInterface $request HTTP request - * @param ResponseInterface $response HTTP Response - * @param VCalendar $vCal Parsed iCalendar object - * @param mixed $calendarPath Path to calendar collection - * @param mixed $modified The iCalendar object has been touched. - * @param mixed $isNew Whether this was a new item or we're updating one - * @return void - */ - function calendarObjectChange(RequestInterface $request, ResponseInterface $response, VCalendar $vCal, $calendarPath, &$modified, $isNew) { - - if (!$this->scheduleReply($this->server->httpRequest)) { - return; - } - - $calendarNode = $this->server->tree->getNodeForPath($calendarPath); - - $addresses = $this->getAddressesForPrincipal( - $calendarNode->getPrincipalURI() - ); - - if (!$isNew) { - $node = $this->server->tree->getNodeForPath($request->getPath()); - $oldObj = Reader::read($node->get()); - } else { - $oldObj = null; - } - - $this->processICalendarChange($oldObj, $vCal, $addresses, [], $modified); - - if ($oldObj) { - // Destroy circular references so PHP will GC the object. - $oldObj->destroy(); - } - - } - - /** - * This method checks the 'Schedule-Reply' header - * and returns false if it's 'F', otherwise true. - * - * Copied from Sabre/DAV's Schedule plugin, because it's - * private for whatever reason - * - * @param RequestInterface $request - * @return bool - */ - private function scheduleReply(RequestInterface $request) { - - $scheduleReply = $request->getHeader('Schedule-Reply'); - return $scheduleReply !== 'F'; - - } } |