diff options
author | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2023-09-25 15:07:29 +0200 |
---|---|---|
committer | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2023-11-10 09:21:16 +0100 |
commit | a75a93af8e140809abe50429601cb3d07f35245c (patch) | |
tree | 8b47e44bb490782ab62e9103a19d86d98112b2e8 /lib/private/Files/Cache/SearchBuilder.php | |
parent | f3181a3931dcca792d004bba2fc7339bcdb8fbda (diff) | |
download | nextcloud-server-a75a93af8e140809abe50429601cb3d07f35245c.tar.gz nextcloud-server-a75a93af8e140809abe50429601cb3d07f35245c.zip |
feat(files): Allow advanced search for files
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Diffstat (limited to 'lib/private/Files/Cache/SearchBuilder.php')
-rw-r--r-- | lib/private/Files/Cache/SearchBuilder.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/Files/Cache/SearchBuilder.php b/lib/private/Files/Cache/SearchBuilder.php index 1f9a6af931b..860d5e41d89 100644 --- a/lib/private/Files/Cache/SearchBuilder.php +++ b/lib/private/Files/Cache/SearchBuilder.php @@ -192,6 +192,8 @@ class SearchBuilder { } elseif ($field === 'path' && $type === ISearchComparison::COMPARE_EQUAL && $operator->getQueryHint(ISearchComparison::HINT_PATH_EQ_HASH, true)) { $field = 'path_hash'; $value = md5((string)$value); + } elseif ($field === 'owner') { + $field = 'uid_owner'; } return [$field, $value, $type]; } @@ -208,6 +210,9 @@ class SearchBuilder { 'favorite' => 'boolean', 'fileid' => 'integer', 'storage' => 'integer', + 'share_with' => 'string', + 'share_type' => 'integer', + 'owner' => 'string', ]; $comparisons = [ 'mimetype' => ['eq', 'like'], @@ -220,6 +225,9 @@ class SearchBuilder { 'favorite' => ['eq'], 'fileid' => ['eq'], 'storage' => ['eq'], + 'share_with' => ['eq'], + 'share_type' => ['eq'], + 'owner' => ['eq'], ]; if (!isset($types[$operator->getField()])) { |