mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Apply syntax_tree formatting to lib/*
This commit is contained in:
@@ -34,11 +34,18 @@ class Wizard
|
||||
value = value.strip if value.is_a?(String)
|
||||
|
||||
if !value.is_a?(Upload) && SiteSetting.type_supervisor.get_type(id) == :upload
|
||||
value = Upload.get_from_url(value) || ''
|
||||
value = Upload.get_from_url(value) || ""
|
||||
end
|
||||
|
||||
if id == :navigation_menu
|
||||
value = value.to_s == "true" ? NavigationMenuSiteSetting::SIDEBAR : NavigationMenuSiteSetting::HEADER_DROPDOWN
|
||||
value =
|
||||
(
|
||||
if value.to_s == "true"
|
||||
NavigationMenuSiteSetting::SIDEBAR
|
||||
else
|
||||
NavigationMenuSiteSetting::HEADER_DROPDOWN
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
SiteSetting.set_and_log(id, value, @current_user) if SiteSetting.get(id) != value
|
||||
@@ -51,12 +58,11 @@ class Wizard
|
||||
end
|
||||
|
||||
def ensure_changed(id)
|
||||
errors.add(id, '') if @fields[id] == SiteSetting.defaults[id]
|
||||
errors.add(id, "") if @fields[id] == SiteSetting.defaults[id]
|
||||
end
|
||||
|
||||
def apply_settings(*ids)
|
||||
ids.each { |id| apply_setting(id) }
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user