add SIZE_ALL const

remotes/origin/fix-10825
Jörn Friedrich Dreyer 10 years ago
parent ff1c581dcb
commit 79e790c55d
  1. 11
      lib/public/search/pagedprovider.php

@ -24,6 +24,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);

Loading…
Cancel
Save