1. Unofficial Redmine Clones
  2. Untitled project
  3. redmine-all

Commits

jplang  committed 6ea9572

Merged r11332 from trunk (#13097).

  • Participants
  • Parent commits 31a9442
  • Branches 2.2-stable

Comments (0)

Files changed (1)

File app/models/project.rb

View file
   def copy_wiki(project)
     # Check that the source project has a wiki first
     unless project.wiki.nil?
-      self.wiki ||= Wiki.new
+      wiki = self.wiki || Wiki.new
       wiki.attributes = project.wiki.attributes.dup.except("id", "project_id")
       wiki_pages_map = {}
       project.wiki.pages.each do |page|
         wiki.pages << new_wiki_page
         wiki_pages_map[page.id] = new_wiki_page
       end
+
+      self.wiki = wiki
       wiki.save
       # Reproduce page hierarchy
       project.wiki.pages.each do |page|