aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb
index 1bc005d14de..5ba6fa38151 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb
@@ -65,7 +65,7 @@ class MeasuresController < ApplicationController
else
@filter = MeasureFilter.new
end
- @filter.criteria=(criteria_params)
+ @filter.criteria=criteria_params_without_page_id
@filter.convert_criteria_to_data
render :partial => 'measures/save_as_form'
end
@@ -102,7 +102,7 @@ class MeasuresController < ApplicationController
access_denied unless logged_in?
@filter = find_filter(params[:id])
- @filter.criteria=criteria_params
+ @filter.criteria=criteria_params_without_page_id
@filter.convert_criteria_to_data
unless @filter.save
flash[:error]='Error'
@@ -220,7 +220,13 @@ class MeasuresController < ApplicationController
filter
end
+ def criteria_params_without_page_id
+ params.merge({:controller => nil, :action => nil, :search => nil, :widget_id => nil, :edit => nil})
+ params.delete(:page)
+ params
+ end
+
def criteria_params
- params.merge({:controller => nil, :action => nil, :search => nil, :widget_id => nil, :edit => nil, :page => nil})
+ params.merge({:controller => nil, :action => nil, :search => nil, :widget_id => nil, :edit => nil})
end
end