Makes .find_ids return integers.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8490 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-01-03 21:35:00 +00:00
parent ce45b03732
commit 86a52eaedf
3 changed files with 5 additions and 5 deletions

View File

@@ -287,9 +287,9 @@ private
sort_update(@query.sortable_columns, 'issues_index_sort')
limit = 500
issue_ids = @query.issue_ids(:order => sort_clause, :limit => (limit + 1))
if (idx = issue_ids.index(@issue.id.to_s)) && idx < limit
@prev_issue_id = issue_ids[idx - 1].to_i if idx > 0
@next_issue_id = issue_ids[idx + 1].to_i if idx < (issue_ids.size - 1)
if (idx = issue_ids.index(@issue.id)) && idx < limit
@prev_issue_id = issue_ids[idx - 1] if idx > 0
@next_issue_id = issue_ids[idx + 1] if idx < (issue_ids.size - 1)
end
end
end