diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-12-31 00:11:58 +0100 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2015-01-02 10:28:42 +0100 |
commit | 79e790c55dd5780f63a84b481f6a2c75838c28af (patch) | |
tree | 139a6bfbd5bf7ee40bdf43203253f6fbdc932f02 /lib | |
parent | ff1c581dcbdeafd9dc7f0c0cbf1b698e817adc9f (diff) | |
download | nextcloud-server-79e790c55dd5780f63a84b481f6a2c75838c28af.tar.gz nextcloud-server-79e790c55dd5780f63a84b481f6a2c75838c28af.zip |
add SIZE_ALL const
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/search/pagedprovider.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/public/search/pagedprovider.php b/lib/public/search/pagedprovider.php index 10125d4a887..55771762e68 100644 --- a/lib/public/search/pagedprovider.php +++ b/lib/public/search/pagedprovider.php @@ -25,6 +25,11 @@ namespace OCP\Search; abstract class PagedProvider extends Provider { /** + * show all results + */ + const SIZE_ALL = 0; + + /** * Constructor * @param array $options */ @@ -38,15 +43,15 @@ abstract class PagedProvider extends Provider { * @return array An array of OCP\Search\Result's */ public function search($query) { - // old apps might assume they get all results, so we set size 0 - $this->searchPaged($query, 1, 0); + // old apps might assume they get all results, so we use SIZE_ALL + $this->searchPaged($query, 1, self::SIZE_ALL); } /** * Search for $query * @param string $query * @param int $page pages start at page 1 - * @param int $size, 0 = all + * @param int $size, 0 = SIZE_ALL * @return array An array of OCP\Search\Result's */ abstract public function searchPaged($query, $page, $size); |