mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: Incorrect deprecation message.
This commit is contained in:
parent
aa4dccd0a1
commit
b66fc72c18
1 changed files with 3 additions and 3 deletions
|
@ -457,17 +457,17 @@ module SiteSettingExtension
|
||||||
def setup_deprecated_methods
|
def setup_deprecated_methods
|
||||||
DEPRECATED_SETTINGS.each do |old_setting, new_setting, version|
|
DEPRECATED_SETTINGS.each do |old_setting, new_setting, version|
|
||||||
define_singleton_method old_setting do
|
define_singleton_method old_setting do
|
||||||
logger.warn("`SiteSetting##{name}` has been deprecated and will be removed in the #{version} Release. Please use `SiteSetting##{new_setting}` instead")
|
logger.warn("`SiteSetting.#{old_setting}` has been deprecated and will be removed in the #{version} Release. Please use `SiteSetting.#{new_setting}` instead")
|
||||||
self.public_send new_setting
|
self.public_send new_setting
|
||||||
end
|
end
|
||||||
|
|
||||||
define_singleton_method "#{old_setting}?" do
|
define_singleton_method "#{old_setting}?" do
|
||||||
logger.warn("`SiteSetting##{name}?` has been deprecated and will be removed in the #{version} Release. Please use `SiteSetting##{new_setting}?` instead")
|
logger.warn("`SiteSetting.#{old_setting}?` has been deprecated and will be removed in the #{version} Release. Please use `SiteSetting.#{new_setting}?` instead")
|
||||||
self.public_send "#{new_setting}?"
|
self.public_send "#{new_setting}?"
|
||||||
end
|
end
|
||||||
|
|
||||||
define_singleton_method "#{old_setting}=" do |val|
|
define_singleton_method "#{old_setting}=" do |val|
|
||||||
logger.warn("`SiteSetting##{name}=` has been deprecated and will be removed in the #{version} Release. Please use `SiteSetting##{new_setting}=` instead")
|
logger.warn("`SiteSetting.#{old_setting}=` has been deprecated and will be removed in the #{version} Release. Please use `SiteSetting.#{new_setting}=` instead")
|
||||||
self.public_send "#{new_setting}=", val
|
self.public_send "#{new_setting}=", val
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue