From: David Gageot Date: Mon, 8 Oct 2012 16:16:21 +0000 (+0200) Subject: SONAR-3529 Fix for property sets X-Git-Tag: 3.3~81 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e4527d2d9dc22be58fa135be5a30fdf0eae57fc6;p=sonarqube.git SONAR-3529 Fix for property sets --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/settings_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/settings_helper.rb index 1b7c36b12e8..1ddd6320627 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/settings_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/settings_helper.rb @@ -57,7 +57,7 @@ module SettingsHelper end def property_value(property) - if property.multi_values + if property.multi_values? Property.values(property.key, @resource ? @resource.id : nil) else Property.value(property.key, @resource ? @resource.id : nil, '') @@ -87,7 +87,7 @@ module SettingsHelper def input_name(property) name = "settings[#{h property.key}]" - if property.multi_values + if property.multi_values? name += '[]' end name diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb index ddcb556c65f..cff720bfc3f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb @@ -126,7 +126,7 @@ class Property < ActiveRecord::Base end def multi_values? - (java_definition && (java_definition.multi_values || !java_definition.fields.blank?)) || (java_field_definition && java_field_definition.multi_values) + java_definition && (java_definition.isMultiValues() || !java_definition.fields.blank?) end def to_xml(xml=Builder::XmlMarkup.new(:indent => 0))