diff options
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb | 6 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb index 1cf760c2b3a..e5487a11ad7 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb @@ -178,10 +178,10 @@ class ProfilesController < ApplicationController def export name = CGI::unescape(params[:name]) language = params[:language] - if (name != 'active') - profile = Profile.find_by_name_and_language(name, language) - else + if (name.blank?) profile = Profile.find_active_profile_by_language(language) + else + profile = Profile.find_by_name_and_language(name, language) end exporter_key = params[:format] result = java_facade.exportProfile(profile.id, exporter_key) 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 62c9c43fbea..55695f47760 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 @@ -155,6 +155,12 @@ class RulesConfigurationController < ApplicationController end
end
+
+ # deprecated since 2.3
+ def export
+ redirect_to request.query_parameters.merge({:controller => 'profiles', :action => 'export'})
+ end
+
#
#
# GET /rules_configuration/new/<profile id>?rule_id=<rule id>
|