diff options
author | Robin Appelman <robin@icewind.nl> | 2020-02-03 13:23:40 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-03-18 13:41:04 +0100 |
commit | 451c8761a710c62bc19b75ceba9de670b95aca9e (patch) | |
tree | 5262bf946bdd34ed592b39ee4b4a78f1751208ee /apps/dav/lib/DAV | |
parent | 7819a904d7fe2db2bf48a1e041db6aa84976e4bd (diff) | |
download | nextcloud-server-451c8761a710c62bc19b75ceba9de670b95aca9e.tar.gz nextcloud-server-451c8761a710c62bc19b75ceba9de670b95aca9e.zip |
use INode instead of Node for custom properties
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/dav/lib/DAV')
-rw-r--r-- | apps/dav/lib/DAV/CustomPropertiesBackend.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/dav/lib/DAV/CustomPropertiesBackend.php b/apps/dav/lib/DAV/CustomPropertiesBackend.php index 5a0128e52ca..5e0842200b4 100644 --- a/apps/dav/lib/DAV/CustomPropertiesBackend.php +++ b/apps/dav/lib/DAV/CustomPropertiesBackend.php @@ -32,6 +32,7 @@ use OCP\IDBConnection; use OCP\IUser; use Sabre\DAV\Exception\NotFound; use Sabre\DAV\Exception\ServiceUnavailable; +use Sabre\DAV\INode; use Sabre\DAV\PropertyStorage\Backend\BackendInterface; use Sabre\DAV\PropFind; use Sabre\DAV\PropPatch; @@ -103,7 +104,7 @@ class CustomPropertiesBackend implements BackendInterface { public function propFind($path, PropFind $propFind) { try { $node = $this->tree->getNodeForPath($path); - if (!($node instanceof Node)) { + if (!($node instanceof INode)) { return; } } catch (ServiceUnavailable $e) { @@ -168,7 +169,7 @@ class CustomPropertiesBackend implements BackendInterface { */ public function propPatch($path, PropPatch $propPatch) { $node = $this->tree->getNodeForPath($path); - if (!($node instanceof Node)) { + if (!($node instanceof INode)) { return; } @@ -220,7 +221,7 @@ class CustomPropertiesBackend implements BackendInterface { * http://www.example.org/namespace#author If the array is empty, all * properties should be returned */ - private function getProperties(Node $node, array $requestedProperties) { + private function getProperties(INode $node, array $requestedProperties) { $path = $node->getPath(); if (isset($this->cache[$path])) { return $this->cache[$path]; @@ -259,12 +260,12 @@ class CustomPropertiesBackend implements BackendInterface { /** * Update properties * - * @param Node $node node for which to update properties + * @param INode $node node for which to update properties * @param array $properties array of properties to update * * @return bool */ - private function updateProperties($node, $properties) { + private function updateProperties(INode $node, array $properties) { $path = $node->getPath(); $deleteStatement = 'DELETE FROM `*PREFIX*properties`' . |