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