summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/connector
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-02-09 11:39:22 +0100
committerVincent Petry <pvince81@owncloud.com>2016-02-09 11:39:22 +0100
commit3028684d8972c58a2146ebbdf1918fd3f730249e (patch)
tree07b7d4443be0de4c34e6380ab0c7c7b08c183b9c /apps/dav/lib/connector
parentd11179a0f5b69ae479c214033a1ffc8d64752c83 (diff)
downloadnextcloud-server-3028684d8972c58a2146ebbdf1918fd3f730249e.tar.gz
nextcloud-server-3028684d8972c58a2146ebbdf1918fd3f730249e.zip
Fix system tag filter AND condition
If one of the results is empty, no need to do array_intersect and return an empty result directly.
Diffstat (limited to 'apps/dav/lib/connector')
-rw-r--r--apps/dav/lib/connector/sabre/filesreportplugin.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/dav/lib/connector/sabre/filesreportplugin.php b/apps/dav/lib/connector/sabre/filesreportplugin.php
index 5bdd7a71ddc..d7e4f8beda1 100644
--- a/apps/dav/lib/connector/sabre/filesreportplugin.php
+++ b/apps/dav/lib/connector/sabre/filesreportplugin.php
@@ -239,6 +239,11 @@ class FilesReportPlugin extends ServerPlugin {
foreach ($systemTagIds as $systemTagId) {
$fileIds = $this->tagMapper->getObjectIdsForTags($systemTagId, 'files');
+ if (empty($fileIds)) {
+ return [];
+ }
+
+ // first run ?
if (empty($resultFileIds)) {
$resultFileIds = $fileIds;
} else {