]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4535 Use project.id to get the project instead of using the param id that can...
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 18 Dec 2013 08:14:39 +0000 (09:14 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 18 Dec 2013 08:14:39 +0000 (09:14 +0100)
sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfiles.java
sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/project/profile.html.erb

index cd6294d481f703fc83cff57c22bc8ebbffc2a7b5..7b4fbf8d51f05ec09e553290fc4652a615e27369 100644 (file)
@@ -64,12 +64,13 @@ public class QProfiles implements ServerComponent {
   //
   // PROFILES
   //
-  // search profile from profile id
+  // startup synchronisation
   // delete profile from profile id (Delete alerts, activeRules, activeRuleParams, activeRuleNotes, Projects)
   // copy profile
   // export profile from profile id
   // export profile from profile id and plugin key
   // restore profile
+  // profiles comparison
   //
   // INHERITANCE
   // get inheritance of profile id
index 2ee394e8c73c605b55538e983f3755f09bb88264..41d5f709cf46043a6c9740dbcd08529478651b25 100644 (file)
@@ -82,7 +82,7 @@ class ProjectController < ApplicationController
     @project = get_current_project(project_id)
     @snapshot = @project.last_snapshot
     call_backend do
-      @project_quality_profiles = Internal.quality_profiles.profiles(project_id.to_i).to_a
+      @project_quality_profiles = Internal.quality_profiles.profiles(@project.id.to_i).to_a
       @all_quality_profiles = Internal.quality_profiles.allProfiles().to_a
     end
   end
index 64cc772f11ad262b7da00ef509555a2505b228e0..22c3316efa4d9b730028ad6c30cbe31f9c39d1e0 100644 (file)
@@ -27,7 +27,7 @@
                  profiles = Api::Utils.insensitive_sort(@all_quality_profiles.select {|profile| profile.language == language.getKey()}) { |profile| profile.name }
                  profiles.each do |profile|
               %>
-                <option value="<%= profile.id -%>" <%= "selected='selected'" if selected_profile && selected_profile.id==profile.id -%>><%= h profile.name -%></option>
+                <option value="<%= profile.id -%>" <%= "selected='selected'" if selected_profile && (selected_profile.id == profile.id) -%>><%= h profile.name -%></option>
               <% end %>
             </optgroup>
           </select>