diff options
author | Julius Härtl <jus@bitgrid.net> | 2023-07-11 14:54:02 +0200 |
---|---|---|
committer | Andy Scherzinger <info@andy-scherzinger.de> | 2024-02-27 14:26:17 +0100 |
commit | dfd21deb7e800dcdf0ee70b167b4e7edc1cdd949 (patch) | |
tree | 1a579efa584e703c013bf6cbafc4835a9ce8aa8d /lib | |
parent | b230e54fa4f80341b07d2cfe0df6b0c9045f826f (diff) | |
download | nextcloud-server-enh/favorite-search.tar.gz nextcloud-server-enh/favorite-search.zip |
feat: Pass limit/offset for searchByTagenh/favorite-search
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Node/Folder.php | 4 | ||||
-rw-r--r-- | lib/private/Files/Node/LazyFolder.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Node/NonExistingFolder.php | 2 | ||||
-rw-r--r-- | lib/public/Files/Folder.php | 4 |
4 files changed, 7 insertions, 5 deletions
diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php index c7462572fed..dd7fe466a34 100644 --- a/lib/private/Files/Node/Folder.php +++ b/lib/private/Files/Node/Folder.php @@ -295,8 +295,8 @@ class Folder extends Node implements \OCP\Files\Folder { * @param string $userId owner of the tags * @return Node[] */ - public function searchByTag($tag, $userId) { - $query = $this->queryFromOperator(new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'tagname', $tag), $userId); + public function searchByTag($tag, $userId, int $limit = 0, int $offset = 0) { + $query = $this->queryFromOperator(new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'tagname', $tag), $userId, $limit, $offset); return $this->search($query); } diff --git a/lib/private/Files/Node/LazyFolder.php b/lib/private/Files/Node/LazyFolder.php index e30cfea693e..e5a9a3b2ea6 100644 --- a/lib/private/Files/Node/LazyFolder.php +++ b/lib/private/Files/Node/LazyFolder.php @@ -480,7 +480,7 @@ class LazyFolder implements Folder { /** * @inheritDoc */ - public function searchByTag($tag, $userId) { + public function searchByTag($tag, $userId, int $limit = 0, int $offset = 0) { return $this->__call(__FUNCTION__, func_get_args()); } diff --git a/lib/private/Files/Node/NonExistingFolder.php b/lib/private/Files/Node/NonExistingFolder.php index 34621b18f19..e4b2df5a724 100644 --- a/lib/private/Files/Node/NonExistingFolder.php +++ b/lib/private/Files/Node/NonExistingFolder.php @@ -150,7 +150,7 @@ class NonExistingFolder extends Folder { throw new NotFoundException(); } - public function searchByTag($tag, $userId) { + public function searchByTag($tag, $userId, int $limit = 0, int $offset = 0) { throw new NotFoundException(); } diff --git a/lib/public/Files/Folder.php b/lib/public/Files/Folder.php index eb81a2098ec..7e073013748 100644 --- a/lib/public/Files/Folder.php +++ b/lib/public/Files/Folder.php @@ -136,10 +136,12 @@ interface Folder extends Node { * * @param string|int $tag tag name or tag id * @param string $userId owner of the tags + * @param int $limit since 28.0.0 + * @param int $offset since 28.0.0 * @return \OCP\Files\Node[] * @since 8.0.0 */ - public function searchByTag($tag, $userId); + public function searchByTag($tag, $userId, int $limit = 0, int $offset = 0); /** * search for files by system tag |