pagination: refactor page limits.

Refactor page limits to a) be explicitly listed in the User class (not
hidden away in the Danbooru config) and b) explicitly depend on the
CurrentUser (not implicitly by way of Danbooru.config.max_numbered_pages).
This commit is contained in:
evazion
2021-01-11 20:09:52 -06:00
parent e9464d0ea5
commit ceeed1e692
7 changed files with 45 additions and 32 deletions

View File

@@ -107,11 +107,6 @@ module Danbooru
2
end
# After this many pages, the paginator will switch to sequential mode.
def max_numbered_pages
1_000
end
# Maximum size of an upload. If you change this, you must also change
# `client_max_body_size` in your nginx.conf.
def max_file_size