mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 10:58:31 -05:00
FIX: nil and blank string should not override a site setting
This commit is contained in:
parent
0e02d24428
commit
da419326be
1 changed files with 2 additions and 1 deletions
|
@ -121,7 +121,8 @@ module SiteSettingExtension
|
||||||
# exists it will be used instead of the setting and the setting will be hidden.
|
# exists it will be used instead of the setting and the setting will be hidden.
|
||||||
# Useful for things like API keys on multisite.
|
# Useful for things like API keys on multisite.
|
||||||
if opts[:shadowed_by_global] && GlobalSetting.respond_to?(name)
|
if opts[:shadowed_by_global] && GlobalSetting.respond_to?(name)
|
||||||
unless (val = GlobalSetting.send(name)) == ''.freeze
|
val = GlobalSetting.send(name)
|
||||||
|
unless val.nil? || (val == ''.freeze)
|
||||||
hidden_settings << name
|
hidden_settings << name
|
||||||
shadowed_settings << name
|
shadowed_settings << name
|
||||||
current_value = val
|
current_value = val
|
||||||
|
|
Loading…
Reference in a new issue