]> source.dussan.org Git - redmine.git/commitdiff
Fixed: can't preview/save the very first wiki page.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 14 Sep 2007 11:35:47 +0000 (11:35 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 14 Sep 2007 11:35:47 +0000 (11:35 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@726 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/wiki.rb

index b6cd661ff19cf8dadeced0b72434fb5e00e90377..7213efde8e51e19240647585c9b60731e5950a02 100644 (file)
@@ -26,6 +26,7 @@ class Wiki < ActiveRecord::Base
   # find the page with the given title
   # if page doesn't exist, return a new page
   def find_or_new_page(title)
+    title = start_page if title.blank?
     find_page(title) || WikiPage.new(:wiki => self, :title => Wiki.titleize(title))
   end