diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-01-16 14:44:38 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-01-16 14:44:38 +0000 |
commit | 794d7c095955d3db90fb172f2b6cdefb804be7f3 (patch) | |
tree | f87c7bd5e851489633fdb49ef5afda3966896b55 /app | |
parent | b8f365f2a1786a803c373e6b912c4c3b69cdc309 (diff) | |
download | redmine-794d7c095955d3db90fb172f2b6cdefb804be7f3.tar.gz redmine-794d7c095955d3db90fb172f2b6cdefb804be7f3.zip |
Merged r4680 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@4728 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-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 |