diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-05-02 22:18:14 +0200 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-05-02 22:27:24 +0200 |
commit | 3c2fee87750e3137f2a33a60cb4cc53bf4933e45 (patch) | |
tree | 0084112ea28296eb509a06da85104973b6f25da5 /apps/dav/lib | |
parent | 05cf552f6686adf52ccabe0ccaf6898eb72936e0 (diff) | |
download | nextcloud-server-3c2fee87750e3137f2a33a60cb4cc53bf4933e45.tar.gz nextcloud-server-3c2fee87750e3137f2a33a60cb4cc53bf4933e45.zip |
Cache shareManager
There is no need to call \OC::$server->getShareManager for each Node.
We have it available so better pass it around.
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/connector/sabre/directory.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/dav/lib/connector/sabre/directory.php b/apps/dav/lib/connector/sabre/directory.php index f31eff30b65..daa5f29ce79 100644 --- a/apps/dav/lib/connector/sabre/directory.php +++ b/apps/dav/lib/connector/sabre/directory.php @@ -64,9 +64,10 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node * @param \OC\Files\View $view * @param \OCP\Files\FileInfo $info * @param ObjectTree|null $tree + * @param \OCP\Share\IManager $shareManager */ - public function __construct($view, $info, $tree = null) { - parent::__construct($view, $info); + public function __construct($view, $info, $tree = null, $shareManager = null) { + parent::__construct($view, $info, $shareManager); $this->tree = $tree; } @@ -202,9 +203,9 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node } if ($info['mimetype'] == 'httpd/unix-directory') { - $node = new \OCA\DAV\Connector\Sabre\Directory($this->fileView, $info, $this->tree); + $node = new \OCA\DAV\Connector\Sabre\Directory($this->fileView, $info, $this->tree, $this->shareManager); } else { - $node = new \OCA\DAV\Connector\Sabre\File($this->fileView, $info); + $node = new \OCA\DAV\Connector\Sabre\File($this->fileView, $info, $this->shareManager); } if ($this->tree) { $this->tree->cacheNode($node); |