Patch #16069 » 0001-domingo-galdos.patch
app/controllers/application_controller.rb | ||
---|---|---|
657 | 657 |
limit = options[:limit].to_i |
658 | 658 |
if limit < 1 |
659 | 659 |
limit = 25 |
660 |
elsif limit > 100
|
|
661 |
limit = 100
|
|
660 |
elsif limit > Setting.api_limit.to_i
|
|
661 |
limit = Setting.api_limit.to_i
|
|
662 | 662 |
end |
663 | 663 |
if offset.nil? && options[:page].present? |
664 | 664 |
offset = (options[:page].to_i - 1) * limit |
app/views/settings/_general.html.erb | ||
---|---|---|
25 | 25 | |
26 | 26 |
<p><%= setting_select :wiki_compression, [['Gzip', 'gzip']], :blank => :label_none %></p> |
27 | 27 | |
28 |
<p><%= setting_text_field :api_limit, :size => 6 %></p> |
|
29 | ||
28 | 30 |
<p><%= setting_text_field :feeds_limit, :size => 6 %></p> |
29 | 31 | |
30 | 32 |
<%= call_hook(:view_settings_general_form) %> |
config/locales/en.yml | ||
---|---|---|
419 | 419 |
setting_host_name: Host name and path |
420 | 420 |
setting_text_formatting: Text formatting |
421 | 421 |
setting_wiki_compression: Wiki history compression |
422 |
setting_api_limit: Maximum number of items returned in a JSON/XML API response |
|
422 | 423 |
setting_feeds_limit: Maximum number of items in Atom feeds |
423 | 424 |
setting_default_projects_public: New projects are public by default |
424 | 425 |
setting_autofetch_changesets: Fetch commits automatically |
config/settings.yml | ||
---|---|---|
113 | 113 |
protocol: |
114 | 114 |
default: http |
115 | 115 |
security_notifications: 1 |
116 |
api_limit: |
|
117 |
format: int |
|
118 |
default: 100 |
|
116 | 119 |
feeds_limit: |
117 | 120 |
format: int |
118 | 121 |
default: 15 |