]> source.dussan.org Git - redmine.git/commitdiff
Fixes new setting name.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 21 Feb 2009 15:44:00 +0000 (15:44 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 21 Feb 2009 15:44:00 +0000 (15:44 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2504 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/attachments_controller.rb
app/views/settings/_general.rhtml
config/settings.yml
test/functional/attachments_controller_test.rb

index 8c6346a5d4ae167b3e21c64f635defbedd9b36ba..445ae3d1256a3a6553f7578de60b399a06a2dfc2 100644 (file)
@@ -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
index b6e570ba4c0238017510749ab420282f2773f624..f34161fc20d83337e6a3223bac54ce420a2c4de1 100644 (file)
@@ -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>
index fad3ef5fba54b4021db0328316ef626f7ff56e31..38b0a44c8fb8a76d469868e722a2100841880f6b 100644 (file)
@@ -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:
index 0639de8d9a8408dba02ffcd4509ece79d3b03042..6738afbcfc9b4ff8463fd2c06753a1c7f302b6f9 100644 (file)
@@ -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