Commit 3fda3c49 authored by jplang's avatar jplang

Fixes new setting name.

git-svn-id: https://svn.redmine.org/redmine/trunk@2504 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent bb4c9c99
......@@ -26,7 +26,7 @@ class AttachmentsController < ApplicationController
if @attachment.is_diff?
@diff = File.new(@attachment.diskfile, "rb").read
render :action => 'diff'
elsif @attachment.is_text? && @attachment.filesize <= Setting.setting_file_max_size_displayed.to_i.kilobyte
elsif @attachment.is_text? && @attachment.filesize <= Setting.file_max_size_displayed.to_i.kilobyte
@content = File.new(@attachment.diskfile, "rb").read
render :action => 'file'
else
......
......@@ -34,7 +34,7 @@
<%= text_field_tag 'settings[feeds_limit]', Setting.feeds_limit, :size => 6 %></p>
<p><label><%= l(:setting_file_max_size_displayed) %></label>
<%= text_field_tag 'settings[setting_file_max_size_displayed]', Setting.setting_file_max_size_displayed, :size => 6 %> KB</p>
<%= text_field_tag 'settings[file_max_size_displayed]', Setting.file_max_size_displayed, :size => 6 %> KB</p>
<p><label><%= l(:setting_diff_max_lines_displayed) %></label>
<%= text_field_tag 'settings[diff_max_lines_displayed]', Setting.diff_max_lines_displayed, :size => 6 %></p>
......
......@@ -63,7 +63,7 @@ feeds_limit:
default: 15
# Maximum size of files that can be displayed
# inline through the file viewer (in KB)
setting_file_max_size_displayed:
file_max_size_displayed:
format: int
default: 512
diff_max_lines_displayed:
......
......@@ -64,7 +64,7 @@ class AttachmentsControllerTest < Test::Unit::TestCase
end
def test_show_text_file_should_send_if_too_big
Setting.setting_file_max_size_displayed = 512
Setting.file_max_size_displayed = 512
Attachment.find(4).update_attribute :filesize, 754.kilobyte
get :show, :id => 4
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment