##// END OF EJS Templates
Don't check that params[:settings] is a Hash....
Jean-Philippe Lang -
r15347:fcd8ace743b8
parent child
Show More
@@ -32,9 +32,10 class SettingsController < ApplicationController
32 32
33 33 def edit
34 34 @notifiables = Redmine::Notifiable.all
35 if request.post? && params[:settings] && params[:settings].is_a?(Hash)
36 Setting.set_all_from_params(params[:settings])
37 flash[:notice] = l(:notice_successful_update)
35 if request.post?
36 if Setting.set_all_from_params(params[:settings])
37 flash[:notice] = l(:notice_successful_update)
38 end
38 39 redirect_to settings_path(:tab => params[:tab])
39 40 else
40 41 @options = {}
@@ -60,7 +61,7 class SettingsController < ApplicationController
60 61 end
61 62
62 63 if request.post?
63 Setting.send "plugin_#{@plugin.id}=", params[:settings]
64 Setting.send "plugin_#{@plugin.id}=", params[:settings].permit!.to_h
64 65 flash[:notice] = l(:notice_successful_update)
65 66 redirect_to plugin_settings_path(@plugin)
66 67 else
General Comments 0
You need to be logged in to leave comments. Login now