diff app/models/.svn/text-base/wiki_page.rb.svn-base @ 508:851510f1b535 cannam

Merge from branch "redmine-1.2"
author Chris Cannam
date Thu, 14 Jul 2011 10:37:36 +0100
parents 0c939c159af4
children
line wrap: on
line diff
--- a/app/models/.svn/text-base/wiki_page.rb.svn-base	Thu Jul 14 10:21:43 2011 +0100
+++ b/app/models/.svn/text-base/wiki_page.rb.svn-base	Thu Jul 14 10:37:36 2011 +0100
@@ -212,6 +212,10 @@
       break unless @lines.detect { |line| line[0].nil? }
       current = current.previous
     end
-    @lines.each { |line| line[0] ||= current.version }
+    @lines.each { |line| 
+      line[0] ||= current.version
+      # if the last known version is > 1 (eg. history was cleared), we don't know the author
+      line[1] ||= current.author if current.version == 1
+    }
   end
 end