summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-04-24 10:57:15 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-04-24 10:57:15 +0000
commitc34a1d0f90a6351a4594f36058c9693ddb89ec17 (patch)
tree54ea335e25b4e25ede4b0d9865bafed9f4ea98ad
parenta2a59448b43ca8e047b18ac1af45c92b46f0c0ab (diff)
downloadredmine-c34a1d0f90a6351a4594f36058c9693ddb89ec17.tar.gz
redmine-c34a1d0f90a6351a4594f36058c9693ddb89ec17.zip
SQL server: non ASCII filter on issue subject does not work (#22405).
git-svn-id: http://svn.redmine.org/redmine/trunk@15351 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/query.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/query.rb b/app/models/query.rb
index d0a54d6c6..104b14e89 100644
--- a/app/models/query.rb
+++ b/app/models/query.rb
@@ -909,8 +909,8 @@ class Query < ActiveRecord::Base
# Returns a SQL LIKE statement with wildcards
def sql_contains(db_field, value, match=true)
- value = "'%#{self.class.connection.quote_string(value.to_s)}%'"
- Redmine::Database.like(db_field, value, :match => match)
+ queried_class.send :sanitize_sql_for_conditions,
+ [Redmine::Database.like(db_field, '?', :match => match), "%#{value}%"]
end
# Adds a filter for the given custom field