mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 10:34:40 +08: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.
|
# 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.
|
# 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.
|
# 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: email - Must be a valid email address.
|
||||||
# type: username - Must match the username of an existing user.
|
# 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.
|
# 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
|
hidden_settings << name
|
||||||
end
|
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)
|
if opts[:shadowed_by_global] && GlobalSetting.respond_to?(name)
|
||||||
val = GlobalSetting.send(name)
|
val = GlobalSetting.send(name)
|
||||||
unless val.nil? || (val == ''.freeze)
|
unless val.nil? || (val == ''.freeze)
|
||||||
|
Reference in New Issue
Block a user