diff options
Diffstat (limited to 'lib/private/Files/Cache/SearchBuilder.php')
-rw-r--r-- | lib/private/Files/Cache/SearchBuilder.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/SearchBuilder.php b/lib/private/Files/Cache/SearchBuilder.php index c8c442bcb8c..b5f548dd563 100644 --- a/lib/private/Files/Cache/SearchBuilder.php +++ b/lib/private/Files/Cache/SearchBuilder.php @@ -80,7 +80,7 @@ class SearchBuilder { return $shouldJoin || $this->shouldJoinTags($operator); }, false); } elseif ($operator instanceof ISearchComparison) { - return $operator->getField() === 'tagname' || $operator->getField() === 'favorite'; + return $operator->getField() === 'tagname' || $operator->getField() === 'favorite' || $operator->getField() === 'systemtag'; } return false; } @@ -163,8 +163,12 @@ class SearchBuilder { } elseif ($field === 'favorite') { $field = 'tag.category'; $value = self::TAG_FAVORITE; + } elseif ($field === 'name') { + $field = 'file.name'; } elseif ($field === 'tagname') { $field = 'tag.category'; + } elseif ($field === 'systemtag') { + $field = 'systemtag.name'; } elseif ($field === 'fileid') { $field = 'file.fileid'; } elseif ($field === 'path' && $type === ISearchComparison::COMPARE_EQUAL && $operator->getQueryHint(ISearchComparison::HINT_PATH_EQ_HASH, true)) { @@ -182,6 +186,7 @@ class SearchBuilder { 'path' => 'string', 'size' => 'integer', 'tagname' => 'string', + 'systemtag' => 'string', 'favorite' => 'boolean', 'fileid' => 'integer', 'storage' => 'integer', @@ -193,6 +198,7 @@ class SearchBuilder { 'path' => ['eq', 'like', 'clike'], 'size' => ['eq', 'gt', 'lt', 'gte', 'lte'], 'tagname' => ['eq', 'like'], + 'systemtag' => ['eq', 'like'], 'favorite' => ['eq'], 'fileid' => ['eq'], 'storage' => ['eq'], |