aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-09-10 15:01:07 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-09-10 15:01:07 +0000
commit579e262b525ad17d9cfff7602d7a1b401e4910ff (patch)
tree2f6474567556d1a1a8c306f97742f98e35217823
parent8c95433db8c26f2a1b04f8be178ac5dacfef73ba (diff)
downloadsonarqube-579e262b525ad17d9cfff7602d7a1b401e4910ff.tar.gz
sonarqube-579e262b525ad17d9cfff7602d7a1b401e4910ff.zip
permalinks to plugin configurations : the default profile is used if the parameter 'profile' is not set
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb6
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb6
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>