Skip to content

Commit

Permalink
[webui] Refactor package controller - revisions action
Browse files Browse the repository at this point in the history
  • Loading branch information
bgeuken committed Jul 16, 2015
1 parent e609094 commit ef494f6
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/api/app/controllers/webui/package_controller.rb
Expand Up @@ -181,15 +181,11 @@ def revisions
end
@lastrev = @package.rev.to_i
@lastrev = params[:rev].to_i if params[:rev]
if params[:showall]
if params[:showall] || @lastrev < 21
@revisions = (1..@lastrev).to_a.reverse
else
if @lastrev < 21
@revisions = (1..@lastrev).to_a.reverse
else
@revisions = []
@lastrev.downto(@lastrev-19) { |n| @revisions << n }
end
@revisions = []
@lastrev.downto(@lastrev-19) { |n| @revisions << n }
end
end

Expand Down

0 comments on commit ef494f6

Please sign in to comment.