From 969c19b2e926331e2686208507c2643107caf5a1 Mon Sep 17 00:00:00 2001 From: Michael Jobst Date: Mon, 21 Nov 2016 15:03:45 +0100 Subject: Fixed size issues on main detail view and disappearing of share recipients (#26603) * fixed size issues on main detail view and disappearing of share recipients * Changes due to code comments * Moved reloadProperties() to FileInfoModel * Solved Scrutinizer issues * Bugfix: undefined value used on error * check if options are set for FileInfoModel.initialize() Signed-off-by: Arthur Schiwon --- apps/dav/lib/Connector/Sabre/FilesPlugin.php | 3 +++ apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'apps/dav') diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 54d91db5c06..5e401b88481 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -328,6 +328,9 @@ class FilesPlugin extends ServerPlugin { $propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) { return json_encode($this->previewManager->isAvailable($node->getFileInfo())); }); + $propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) { + return $node->getSize(); + }); } if ($node instanceof \OCA\DAV\Connector\Sabre\Node) { diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php index c6e833033d5..1c9ebdd09b6 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php @@ -188,8 +188,6 @@ class FilesPluginTest extends TestCase { $node->expects($this->exactly(2)) ->method('getOwner') ->will($this->returnValue($user)); - $node->expects($this->never()) - ->method('getSize'); $this->plugin->handleGetProperties( $propFind, -- cgit v1.2.3