Mercurial > hg > soundsoftware-site
diff app/models/.svn/text-base/wiki.rb.svn-base @ 117:af80e5618e9b redmine-1.1
* Update to Redmine 1.1-stable branch (Redmine SVN rev 4707)
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 12:53:21 +0000 |
parents | 513646585e45 |
children | cd2282d2aa55 |
line wrap: on
line diff
--- a/app/models/.svn/text-base/wiki.rb.svn-base Fri Nov 19 14:05:24 2010 +0000 +++ b/app/models/.svn/text-base/wiki.rb.svn-base Thu Jan 13 12:53:21 2011 +0000 @@ -45,11 +45,11 @@ # find the page with the given title def find_page(title, options = {}) title = start_page if title.blank? - title = Wiki.titleize(title) - page = pages.find_by_title(title) + title = Wiki.titleize(title).downcase + page = pages.first(:conditions => ["LOWER(title) LIKE ?", title]) if !page && !(options[:with_redirect] == false) # search for a redirect - redirect = redirects.find_by_title(title) + redirect = redirects.first(:conditions => ["LOWER(title) LIKE ?", title]) page = find_page(redirect.redirects_to, :with_redirect => false) if redirect end page