It seems to me that the forum available for download has a few bugs…
I’m attempting to fix them as I read through the code.
Here’s a patch to models/forum.rb
— forum.rb.orig 2005-10-11 13:26:41.000000000 +0200
+++ forum.rb 2005-10-11 13:27:21.000000000 +0200
@@ -33,11 +33,11 @@
end
def get_topics_for_list(range, include_deleted=false)
- self.topics.find_all(
-
('deleted = 0' unless include_deleted),
-
'last_post_created_at DESC',
-
"#{range.begin} OFFSET #{range.end - range.begin + 1}"
- )
-
conditions = "forum_id = ?"
-
conditions += " and deleted = 0" unless
(include_deleted)
-
Topic.find(:all, :conditions => [conditions, id],
-
:offset => range.begin, :limit => (range.end -
range.begin),
-
:order => "last_post_created_at DESC")
end
Create a new post & topic in this forum.