summaryrefslogtreecommitdiffstats
path: root/app/models/wiki.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-05-26 15:42:37 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-05-26 15:42:37 +0000
commitf8ef65e8f64111b5bfa45abd42e0e684afd61f07 (patch)
treef38d893e289b9eb42f7732eeb33c225b8379ad41 /app/models/wiki.rb
parent6446c312beab7e23162827a79bd9ab6f9e4d7958 (diff)
downloadredmine-f8ef65e8f64111b5bfa45abd42e0e684afd61f07.tar.gz
redmine-f8ef65e8f64111b5bfa45abd42e0e684afd61f07.zip
Attachments can now be added to wiki pages (original patch by Pavol Murin). Only authorized users can add/delete attachments.
Attached images can be displayed inline, using textile image tag (for wiki pages, issue descriptions and forum messages). git-svn-id: http://redmine.rubyforge.org/svn/trunk@541 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/wiki.rb')
-rw-r--r--app/models/wiki.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/wiki.rb b/app/models/wiki.rb
index 8233c3d48..8d461a85b 100644
--- a/app/models/wiki.rb
+++ b/app/models/wiki.rb
@@ -31,7 +31,8 @@ class Wiki < ActiveRecord::Base
# find the page with the given title
def find_page(title)
- pages.find_by_title(Wiki.titleize(title || start_page))
+ title = start_page if title.blank?
+ pages.find_by_title(Wiki.titleize(title))
end
# turn a string into a valid page title