mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-31 11:37:14 +00:00
Fix config/settings.yml not closed in Setting.load_available_settings (#38250).
Patch by Thomas Löber. git-svn-id: https://svn.redmine.org/redmine/trunk@22099 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
12a5731aab
commit
e03bc47e14
@ -320,8 +320,10 @@ class Setting < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def self.load_available_settings
|
||||
YAML::load(File.open("#{Rails.root}/config/settings.yml")).each do |name, options|
|
||||
define_setting name, options
|
||||
File.open("#{Rails.root}/config/settings.yml") do |f|
|
||||
YAML.load(f).each do |name, options|
|
||||
define_setting name, options
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user