Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
fdf4f0fc
Commit
fdf4f0fc
authored
Aug 17, 2017
by
Jordan Patterson
Committed by
Toon Claes
Aug 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't add next page link if current page is out of range
parent
f0ac0daf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
lib/api/helpers/pagination.rb
lib/api/helpers/pagination.rb
+1
-1
No files found.
lib/api/helpers/pagination.rb
View file @
fdf4f0fc
...
@@ -30,7 +30,7 @@ module API
...
@@ -30,7 +30,7 @@ module API
links
<<
%(<#{request_url}?#{request_params.to_query}>; rel="prev")
unless
paginated_data
.
first_page?
links
<<
%(<#{request_url}?#{request_params.to_query}>; rel="prev")
unless
paginated_data
.
first_page?
request_params
[
:page
]
=
paginated_data
.
current_page
+
1
request_params
[
:page
]
=
paginated_data
.
current_page
+
1
links
<<
%(<#{request_url}?#{request_params.to_query}>; rel="next")
unless
paginated_data
.
last_page?
links
<<
%(<#{request_url}?#{request_params.to_query}>; rel="next")
unless
paginated_data
.
last_page?
||
paginated_data
.
out_of_range?
request_params
[
:page
]
=
1
request_params
[
:page
]
=
1
links
<<
%(<#{request_url}?#{request_params.to_query}>; rel="first")
links
<<
%(<#{request_url}?#{request_params.to_query}>; rel="first")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment