Mercurial > hg > soundsoftware-site
diff app/models/.svn/text-base/wiki.rb.svn-base @ 119:8661b858af72
* Update to Redmine trunk rev 4705
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 14:12:06 +0000 |
parents | 513646585e45 |
children | cd2282d2aa55 cbce1fd3b1b7 |
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 14:12:06 2011 +0000 @@ -46,10 +46,10 @@ def find_page(title, options = {}) title = start_page if title.blank? title = Wiki.titleize(title) - page = pages.find_by_title(title) + page = pages.first(:conditions => ["LOWER(title) LIKE LOWER(?)", title]) if !page && !(options[:with_redirect] == false) # search for a redirect - redirect = redirects.find_by_title(title) + redirect = redirects.first(:conditions => ["LOWER(title) LIKE LOWER(?)", title]) page = find_page(redirect.redirects_to, :with_redirect => false) if redirect end page