1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-02-01 03:57:15 +00:00

Replace hardcoded issues count check with limit variable in IssuesController#retrieve_previous_and_next_issue_ids (#39380).

Patch by Go MAEDA.


git-svn-id: https://svn.redmine.org/redmine/trunk@22415 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2023-10-31 13:02:09 +00:00
parent c6fdc7db86
commit 63188014b0

View File

@ -522,7 +522,7 @@ class IssuesController < ApplicationController
limit = 500
issue_ids = @query.issue_ids(:limit => (limit + 1))
if (idx = issue_ids.index(@issue.id)) && idx < limit
if issue_ids.size < 500
if issue_ids.size < limit
@issue_position = idx + 1
@issue_count = issue_ids.size
end