summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-09-28 18:12:12 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-09-28 18:12:12 +0200
commitbbccaf8dd9ef7549d7e960d327a7fe7c28c7cfaa (patch)
treec98a533d758ca9f62cb30f5546e916f9eef4e831
parentbb5de6261ddf342ae15cd56cd81458760b94a6f8 (diff)
downloadsonarqube-bbccaf8dd9ef7549d7e960d327a7fe7c28c7cfaa.tar.gz
sonarqube-bbccaf8dd9ef7549d7e960d327a7fe7c28c7cfaa.zip
SONAR-2602 fix (again) the support of Oracle
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/property.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb
index 397f70a7926..3d61493d36f 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb
@@ -188,7 +188,7 @@ class Profile < ActiveRecord::Base
@projects ||=
begin
Project.find(:all,
- :conditions => ['id in (select prop.resource_id from properties prop where prop.resource_id is not null and prop.prop_key=? and prop.text_value=?)', "sonar.profile.#{language}", name])
+ :conditions => ['id in (select prop.resource_id from properties prop where prop.resource_id is not null and prop.prop_key=? and prop.text_value like ?)', "sonar.profile.#{language}", name])
end
end
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 6371b51242d..151657d11b0 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
@@ -21,7 +21,7 @@ class Property < ActiveRecord::Base
validates_presence_of :prop_key
named_scope :with_key, lambda { |value| {:conditions => {:prop_key, value}} }
- named_scope :with_value, lambda { |value| {:conditions => {:text_value, value}} }
+ named_scope :with_value, lambda { |value| {:conditions => ['text_value like ?', value] } }
named_scope :with_resource, lambda { |value| {:conditions => {:resource_id => value}} }
named_scope :with_user, lambda { |value| {:conditions => {:user_id => value}} }
named_scope :with_resources, :conditions => 'resource_id is not null'