You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nextcloud-server/apps/dav/lib/rootcollection.php

29 lines
659 B

<?php
namespace OCA\DAV;
use OCA\DAV\Connector\Sabre\Principal;
use Sabre\CalDAV\Principal\Collection;
use Sabre\DAV\SimpleCollection;
class RootCollection extends SimpleCollection {
public function __construct() {
$principalBackend = new Principal(
\OC::$server->getConfig(),
\OC::$server->getUserManager()
);
$principalCollection = new Collection($principalBackend);
$principalCollection->disableListing = true;
$filesCollection = new Files\RootCollection($principalBackend);
$filesCollection->disableListing = true;
$children = [
$principalCollection,
$filesCollection,
];
parent::__construct('root', $children);
}
}