Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps/dav
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-04-13 11:52:26 +0300
committerCarl Schwan <carl@carlschwan.eu>2022-04-14 13:11:02 +0300
commit1c7ecfc54499d866b9913c135c0c7439634d8bb1 (patch)
tree162eff580adaa1fe92a3806625f452caf525c738 /apps/dav
parent781784553889601d02553931aed8ff1fde95640b (diff)
Fix an issue with the search backend update
And update autoloader Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesPlugin.php6
-rw-r--r--apps/dav/lib/Files/FileSearchBackend.php20
2 files changed, 13 insertions, 13 deletions
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
index 5cc562e0ff8..9c4f912610b 100644
--- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
@@ -444,7 +444,7 @@ class FilesPlugin extends ServerPlugin {
if ($this->config->getSystemValueBool('enable_file_metadata', true)) {
$propFind->handle(self::FILE_METADATA_SIZE, function () use ($node) {
if (!str_starts_with($node->getFileInfo()->getMimetype(), 'image')) {
- return json_encode([]);
+ return json_encode((object)[]);
}
if ($node->hasMetadata('size')) {
@@ -457,10 +457,10 @@ class FilesPlugin extends ServerPlugin {
$sizeMetadata = $metadataManager->fetchMetadataFor('size', [$node->getId()])[$node->getId()];
// TODO would be nice to display this in the profiler...
- \OC::$server->get(LoggerInterface::class)->warning('Inefficient fetching of metadata');
+ \OC::$server->get(LoggerInterface::class)->debug('Inefficient fetching of metadata');
}
- return json_encode($sizeMetadata->getMetadata());
+ return json_encode((object)$sizeMetadata->getMetadata());
});
}
}
diff --git a/apps/dav/lib/Files/FileSearchBackend.php b/apps/dav/lib/Files/FileSearchBackend.php
index 21eb14a29bd..7ee82779849 100644
--- a/apps/dav/lib/Files/FileSearchBackend.php
+++ b/apps/dav/lib/Files/FileSearchBackend.php
@@ -124,16 +124,16 @@ class FileSearchBackend implements ISearchBackend {
new SearchPropertyDefinition(FilesPlugin::OWNER_ID_PROPERTYNAME, true, true, false),
// select only properties
- new SearchPropertyDefinition('{DAV:}resourcetype', false, true, false),
- new SearchPropertyDefinition('{DAV:}getcontentlength', false, true, false),
- new SearchPropertyDefinition(FilesPlugin::CHECKSUMS_PROPERTYNAME, false, true, false),
- new SearchPropertyDefinition(FilesPlugin::PERMISSIONS_PROPERTYNAME, false, true, false),
- new SearchPropertyDefinition(FilesPlugin::GETETAG_PROPERTYNAME, false, true, false),
- new SearchPropertyDefinition(FilesPlugin::OWNER_DISPLAY_NAME_PROPERTYNAME, false, true, false),
- new SearchPropertyDefinition(FilesPlugin::DATA_FINGERPRINT_PROPERTYNAME, false, true, false),
- new SearchPropertyDefinition(FilesPlugin::HAS_PREVIEW_PROPERTYNAME, false, true, false, SearchPropertyDefinition::DATATYPE_BOOLEAN),
- new SearchPropertyDefinition(FilesPlugin::FILE_METADATA_SIZE, false, true, false, SearchPropertyDefinition::DATATYPE_STRING),
- new SearchPropertyDefinition(FilesPlugin::FILEID_PROPERTYNAME, false, true, false, SearchPropertyDefinition::DATATYPE_NONNEGATIVE_INTEGER),
+ new SearchPropertyDefinition('{DAV:}resourcetype', true, false, false),
+ new SearchPropertyDefinition('{DAV:}getcontentlength', true, false, false),
+ new SearchPropertyDefinition(FilesPlugin::CHECKSUMS_PROPERTYNAME, true, false, false),
+ new SearchPropertyDefinition(FilesPlugin::PERMISSIONS_PROPERTYNAME, true, false, false),
+ new SearchPropertyDefinition(FilesPlugin::GETETAG_PROPERTYNAME, true, false, false),
+ new SearchPropertyDefinition(FilesPlugin::OWNER_DISPLAY_NAME_PROPERTYNAME, true, false, false),
+ new SearchPropertyDefinition(FilesPlugin::DATA_FINGERPRINT_PROPERTYNAME, true, false, false),
+ new SearchPropertyDefinition(FilesPlugin::HAS_PREVIEW_PROPERTYNAME, true, false, false, SearchPropertyDefinition::DATATYPE_BOOLEAN),
+ new SearchPropertyDefinition(FilesPlugin::FILE_METADATA_SIZE, true, false, false, SearchPropertyDefinition::DATATYPE_STRING),
+ new SearchPropertyDefinition(FilesPlugin::FILEID_PROPERTYNAME, true, false, false, SearchPropertyDefinition::DATATYPE_NONNEGATIVE_INTEGER),
];
}