fix limit being hard coded to 20
This commit is contained in:
parent
6181701da6
commit
70a780909a
@ -85,8 +85,8 @@ app:get("thread", "/:slug", function(self)
|
||||
posts.thread_id = ?
|
||||
ORDER BY
|
||||
posts.created_at ASC
|
||||
LIMIT 20 OFFSET ?
|
||||
]], thread.id, (self.page - 1) * posts_per_page)
|
||||
LIMIT ? OFFSET ?
|
||||
]], thread.id, posts_per_page, (self.page - 1) * posts_per_page)
|
||||
self.topic = Topics:find(thread.topic_id)
|
||||
self.user = util.get_logged_in_user_or_transient(self)
|
||||
self.posts = posts
|
||||
|
Loading…
Reference in New Issue
Block a user