mirror of
https://github.com/redmine/redmine.git
synced 2026-05-06 06:36:24 +02:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user