mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 00:17:17 +08:00
FIX: allow global settings to include keys that have numbers in them
This commit is contained in:
@ -88,7 +88,7 @@ class GlobalSetting
|
||||
|
||||
def read
|
||||
ERB.new(File.read(@file)).result().split("\n").each do |line|
|
||||
if line =~ /^\s*([a-z_]+)\s*=\s*(\"([^\"]*)\"|\'([^\']*)\'|[^#]*)/
|
||||
if line =~ /^\s*([a-z_]+[a-z0-9_]*)\s*=\s*(\"([^\"]*)\"|\'([^\']*)\'|[^#]*)/
|
||||
@data[$1.strip.to_sym] = ($4 || $3 || $2).strip
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user