Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
79e790c5
Commit
79e790c5
authored
10 years ago
by
Jörn Friedrich Dreyer
Browse files
Options
Downloads
Patches
Plain Diff
add SIZE_ALL const
parent
ff1c581d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/public/search/pagedprovider.php
+8
-3
8 additions, 3 deletions
lib/public/search/pagedprovider.php
with
8 additions
and
3 deletions
lib/public/search/pagedprovider.php
+
8
−
3
View file @
79e790c5
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment