mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Merge pull request #2239 from riking/setting-strip-b
Strip whitespace from site settings
This commit is contained in:
commit
77133fd896
1 changed files with 1 additions and 0 deletions
|
@ -10,6 +10,7 @@ class Admin::SiteSettingsController < Admin::AdminController
|
|||
params.require(:id)
|
||||
id = params[:id]
|
||||
value = params[id]
|
||||
value.strip! if value.is_a?(String)
|
||||
StaffActionLogger.new(current_user).log_site_setting_change(id, SiteSetting.send(id), value) if SiteSetting.has_setting?(id)
|
||||
SiteSetting.set(id, value)
|
||||
render nothing: true
|
||||
|
|
Loading…
Reference in a new issue