diff options
Diffstat (limited to 'apps/dav/lib/connector/sabre/filesplugin.php')
-rw-r--r-- | apps/dav/lib/connector/sabre/filesplugin.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/apps/dav/lib/connector/sabre/filesplugin.php b/apps/dav/lib/connector/sabre/filesplugin.php index 82d00014905..2e913ee1077 100644 --- a/apps/dav/lib/connector/sabre/filesplugin.php +++ b/apps/dav/lib/connector/sabre/filesplugin.php @@ -47,7 +47,7 @@ class FilesPlugin extends \Sabre\DAV\ServerPlugin { const LASTMODIFIED_PROPERTYNAME = '{DAV:}lastmodified'; const OWNER_ID_PROPERTYNAME = '{http://owncloud.org/ns}owner-id'; const OWNER_DISPLAY_NAME_PROPERTYNAME = '{http://owncloud.org/ns}owner-display-name'; - const CHECKSUM_PROPERTYNAME = '{http://owncloud.org/ns}checksum'; + const CHECKSUMS_PROPERTYNAME = '{http://owncloud.org/ns}checksums'; /** * Reference to main server object @@ -108,7 +108,7 @@ class FilesPlugin extends \Sabre\DAV\ServerPlugin { $server->protectedProperties[] = self::DOWNLOADURL_PROPERTYNAME; $server->protectedProperties[] = self::OWNER_ID_PROPERTYNAME; $server->protectedProperties[] = self::OWNER_DISPLAY_NAME_PROPERTYNAME; - $server->protectedProperties[] = self::CHECKSUM_PROPERTYNAME; + $server->protectedProperties[] = self::CHECKSUMS_PROPERTYNAME; // normally these cannot be changed (RFC4918), but we want them modifiable through PROPPATCH $allowedProperties = ['{DAV:}getetag']; @@ -248,13 +248,9 @@ class FilesPlugin extends \Sabre\DAV\ServerPlugin { return false; }); - $propFind->handle(self::CHECKSUM_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::CHECKSUMS_PROPERTYNAME, function() use ($node) { $checksum = $node->getChecksum(); - - if ($checksum === null) { - return ''; - } - return $checksum; + return new ChecksumList($checksum); }); } |