@@ -909,8 +909,8 class Query < ActiveRecord::Base | |||
|
909 | 909 | |
|
910 | 910 | # Returns a SQL LIKE statement with wildcards |
|
911 | 911 | def sql_contains(db_field, value, match=true) |
|
912 | value = "'%#{self.class.connection.quote_string(value.to_s)}%'" | |
|
913 |
Redmine::Database.like(db_field, |
|
|
912 | queried_class.send :sanitize_sql_for_conditions, | |
|
913 | [Redmine::Database.like(db_field, '?', :match => match), "%#{value}%"] | |
|
914 | 914 | end |
|
915 | 915 | |
|
916 | 916 | # Adds a filter for the given custom field |
General Comments 0
You need to be logged in to leave comments.
Login now