diff options
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb | 22 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb | 6 |
2 files changed, 9 insertions, 19 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb index db30cd8f9c3..e633cbc1ffe 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb @@ -36,19 +36,15 @@ class RulesConfigurationController < ApplicationController before_filter :admin_required, :except => ['index', 'export'] def index - unless params[:id].blank? - if params[:id].to_i<=0 - redirect_to :controller => 'profiles' - return - end - begin - @profile = Profile.find(params[:id].to_i) - rescue - redirect_to :controller => 'profiles' - return - end - else - @profile = Profile.default_profile + if params[:id].to_i<=0 + redirect_to :controller => 'profiles' + return + end + begin + @profile = Profile.find(params[:id].to_i) + rescue + redirect_to :controller => 'profiles' + return end init_params() diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb index c3fbea89bed..3d3e6850625 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb @@ -30,12 +30,6 @@ class RulesController < ApplicationController @rule=Rule.find(key) end @page_title=@rule.name - - if params[:resource_id] - resource = Project.find(params[:resource_id]) - @profile = resource.root_project.profile || Profile.default_profile - @active_rule = @profile.active_by_rule_id(@rule.id) - end end end |