diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-01-10 18:32:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-01-10 18:32:04 +0000 |
commit | f1a5dca2ba84c814da024ebd5b5564a6fbecdccb (patch) | |
tree | 569deeafd56d0f80d1a81e14ac82b737d9850560 /app/models/wiki.rb | |
parent | 88727bf070ed11b73c75a2510143c15c685254a0 (diff) | |
download | redmine-f1a5dca2ba84c814da024ebd5b5564a6fbecdccb.tar.gz redmine-f1a5dca2ba84c814da024ebd5b5564a6fbecdccb.zip |
Fixed: wiki pages with cyrillic characters not found with postgresql (#7245).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4680 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/wiki.rb')
-rw-r--r-- | app/models/wiki.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/wiki.rb b/app/models/wiki.rb index b28694ec4..c83bd1922 100644 --- a/app/models/wiki.rb +++ b/app/models/wiki.rb @@ -45,11 +45,11 @@ class Wiki < ActiveRecord::Base # find the page with the given title def find_page(title, options = {}) title = start_page if title.blank? - title = Wiki.titleize(title).downcase - page = pages.first(:conditions => ["LOWER(title) LIKE ?", title]) + title = Wiki.titleize(title) + page = pages.first(:conditions => ["LOWER(title) LIKE LOWER(?)", title]) if !page && !(options[:with_redirect] == false) # search for a redirect - redirect = redirects.first(:conditions => ["LOWER(title) LIKE ?", title]) + redirect = redirects.first(:conditions => ["LOWER(title) LIKE LOWER(?)", title]) page = find_page(redirect.redirects_to, :with_redirect => false) if redirect end page |