mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Move comment to the right place.
This commit is contained in:
@@ -9,6 +9,10 @@
|
||||
# validator - The name of the class that will be use to validate the value of the setting.
|
||||
# enum - The setting has a fixed set of allowed values, and only one can be chosen.
|
||||
# Set to the class name that defines the set.
|
||||
# shadowed_by_global - "Shadow" a site setting with a GlobalSetting. If the GlobalSetting
|
||||
# exists it will be used instead of the setting and the setting will be hidden.
|
||||
# Useful for things like API keys on multisite.
|
||||
#
|
||||
# type: email - Must be a valid email address.
|
||||
# type: username - Must match the username of an existing user.
|
||||
# type: list - A list of values, chosen from a set of valid values defined in the choices option.
|
||||
|
||||
@@ -117,9 +117,6 @@ module SiteSettingExtension
|
||||
hidden_settings << name
|
||||
end
|
||||
|
||||
# You can "shadow" a site setting with a GlobalSetting. If the GlobalSetting
|
||||
# exists it will be used instead of the setting and the setting will be hidden.
|
||||
# Useful for things like API keys on multisite.
|
||||
if opts[:shadowed_by_global] && GlobalSetting.respond_to?(name)
|
||||
val = GlobalSetting.send(name)
|
||||
unless val.nil? || (val == ''.freeze)
|
||||
|
||||
Reference in New Issue
Block a user