summaryrefslogtreecommitdiffstats
path: root/app/models/wiki.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/wiki.rb')
-rw-r--r--app/models/wiki.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/wiki.rb b/app/models/wiki.rb
index c83bd1922..eb521c99a 100644
--- a/app/models/wiki.rb
+++ b/app/models/wiki.rb
@@ -46,10 +46,10 @@ class Wiki < ActiveRecord::Base
def find_page(title, options = {})
title = start_page if title.blank?
title = Wiki.titleize(title)
- page = pages.first(:conditions => ["LOWER(title) LIKE LOWER(?)", title])
+ page = pages.first(:conditions => ["LOWER(title) = LOWER(?)", title])
if !page && !(options[:with_redirect] == false)
# search for a redirect
- redirect = redirects.first(:conditions => ["LOWER(title) LIKE LOWER(?)", title])
+ redirect = redirects.first(:conditions => ["LOWER(title) = LOWER(?)", title])
page = find_page(redirect.redirects_to, :with_redirect => false) if redirect
end
page