mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 18:50:47 -04:00
only triger metadata preload logic when at least one metadata is requested
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
9b3d8f334b
commit
e14858007d
1 changed files with 10 additions and 6 deletions
|
|
@ -465,13 +465,17 @@ class FilesPlugin extends ServerPlugin {
|
|||
|
||||
$requestProperties = $propFind->getRequestedProperties();
|
||||
|
||||
if ($this->config->getSystemValueBool('enable_file_metadata', true) && $propFind->getDepth() === 1) {
|
||||
$requestedMetaData = [];
|
||||
foreach ($requestProperties as $requestProperty) {
|
||||
if (isset(self::ALL_METADATA_PROPS[$requestProperty])) {
|
||||
$requestedMetaData[] = self::ALL_METADATA_PROPS[$requestProperty];
|
||||
}
|
||||
$requestedMetaData = [];
|
||||
foreach ($requestProperties as $requestProperty) {
|
||||
if (isset(self::ALL_METADATA_PROPS[$requestProperty])) {
|
||||
$requestedMetaData[] = self::ALL_METADATA_PROPS[$requestProperty];
|
||||
}
|
||||
}
|
||||
if (
|
||||
$this->config->getSystemValueBool('enable_file_metadata', true) &&
|
||||
$propFind->getDepth() === 1 &&
|
||||
$requestedMetaData
|
||||
) {
|
||||
$children = $node->getChildren();
|
||||
// Preloading of the metadata
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue