Skip to content

Commit 809b014

Browse files
fixup! Add a trashbin for calendars and calendar objects
Signed-off-by: Christoph Wurst <[email protected]>
1 parent 7dbc2b7 commit 809b014

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

apps/dav/lib/CalDAV/CalendarHome.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
use Sabre\CalDAV\Subscriptions\Subscription;
4040
use Sabre\DAV\Exception\MethodNotAllowed;
4141
use Sabre\DAV\Exception\NotFound;
42+
use Sabre\DAV\INode;
4243
use Sabre\DAV\MkCol;
4344

4445
class CalendarHome extends \Sabre\CalDAV\CalendarHome {
@@ -75,7 +76,7 @@ public function getCalDAVBackend() {
7576
/**
7677
* @inheritdoc
7778
*/
78-
public function createExtendedCollection($name, MkCol $mkCol) {
79+
public function createExtendedCollection($name, MkCol $mkCol): void {
7980
$reservedNames = [
8081
BirthdayService::BIRTHDAY_CALENDAR_URI,
8182
TrashbinHome::NAME,
@@ -135,7 +136,9 @@ public function getChildren() {
135136
}
136137

137138
/**
138-
* @inheritdoc
139+
* @param string $name
140+
*
141+
* @return INode
139142
*/
140143
public function getChild($name) {
141144
// Special nodes

apps/dav/lib/CalDAV/RetentionService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(IConfig $config,
5151

5252
public function cleanUp(): void {
5353
$retentionTime = max(
54-
(int) $this->config->getAppValue(Application::APP_ID, 'calendarRetentionObligation', 30 * 24 * 60 * 60),
54+
(int) $this->config->getAppValue(Application::APP_ID, 'calendarRetentionObligation', (string) (30 * 24 * 60 * 60)),
5555
0 // Just making sure we don't delete things in the future when a negative number is passed
5656
);
5757
$now = $this->time->getTime();
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
[]
1+
{
2+
"packages": [],
3+
"dev": false,
4+
"dev-package-names": []
5+
}

0 commit comments

Comments
 (0)