Skip to content

Commit 98a93d5

Browse files
committed
Revert "send invitations for shared calendars"
This reverts commit a9c313c.
1 parent f2885c1 commit 98a93d5

1 file changed

Lines changed: 0 additions & 67 deletions

File tree

apps/dav/lib/CalDAV/Schedule/Plugin.php

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@
3131
use Sabre\DAV\Server;
3232
use Sabre\DAV\Xml\Property\LocalHref;
3333
use Sabre\DAVACL\IPrincipal;
34-
use Sabre\HTTP\RequestInterface;
35-
use Sabre\HTTP\ResponseInterface;
36-
use Sabre\VObject\Component\VCalendar;
37-
use Sabre\VObject\Reader;
3834

3935
class Plugin extends \Sabre\CalDAV\Schedule\Plugin {
4036

@@ -139,67 +135,4 @@ function propFindDefaultCalendarUrl(PropFind $propFind, INode $node) {
139135
});
140136
}
141137
}
142-
143-
/**
144-
* This method is triggered whenever there was a calendar object gets
145-
* created or updated.
146-
*
147-
* Basically just a copy of parent::calendarObjectChange, with the change
148-
* from:
149-
* $addresses = $this->getAddressesForPrincipal($calendarNode->getOwner());
150-
* to:
151-
* $addresses = $this->getAddressesForPrincipal($calendarNode->getPrincipalURI());
152-
*
153-
* @param RequestInterface $request HTTP request
154-
* @param ResponseInterface $response HTTP Response
155-
* @param VCalendar $vCal Parsed iCalendar object
156-
* @param mixed $calendarPath Path to calendar collection
157-
* @param mixed $modified The iCalendar object has been touched.
158-
* @param mixed $isNew Whether this was a new item or we're updating one
159-
* @return void
160-
*/
161-
function calendarObjectChange(RequestInterface $request, ResponseInterface $response, VCalendar $vCal, $calendarPath, &$modified, $isNew) {
162-
163-
if (!$this->scheduleReply($this->server->httpRequest)) {
164-
return;
165-
}
166-
167-
$calendarNode = $this->server->tree->getNodeForPath($calendarPath);
168-
169-
$addresses = $this->getAddressesForPrincipal(
170-
$calendarNode->getPrincipalURI()
171-
);
172-
173-
if (!$isNew) {
174-
$node = $this->server->tree->getNodeForPath($request->getPath());
175-
$oldObj = Reader::read($node->get());
176-
} else {
177-
$oldObj = null;
178-
}
179-
180-
$this->processICalendarChange($oldObj, $vCal, $addresses, [], $modified);
181-
182-
if ($oldObj) {
183-
// Destroy circular references so PHP will GC the object.
184-
$oldObj->destroy();
185-
}
186-
187-
}
188-
189-
/**
190-
* This method checks the 'Schedule-Reply' header
191-
* and returns false if it's 'F', otherwise true.
192-
*
193-
* Copied from Sabre/DAV's Schedule plugin, because it's
194-
* private for whatever reason
195-
*
196-
* @param RequestInterface $request
197-
* @return bool
198-
*/
199-
private function scheduleReply(RequestInterface $request) {
200-
201-
$scheduleReply = $request->getHeader('Schedule-Reply');
202-
return $scheduleReply !== 'F';
203-
204-
}
205138
}

0 commit comments

Comments
 (0)