diff --git a/controllers/archive.lua b/controllers/archive.lua index acfdda4..a4584eb 100644 --- a/controllers/archive.lua +++ b/controllers/archive.lua @@ -49,8 +49,8 @@ return function(self) -- Get stats for _, thread in ipairs(self.threads) do - thread.op = Posts:get_thread_op(self.board.id, thread.id) - thread.replies = Posts:count_posts(self.board.id, thread.id) - 1 + thread.op = Posts:get_thread_op(thread.id) + thread.replies = Posts:count_posts(thread.id) - 1 thread.url = self.thread_url .. thread.op.post_id -- Process name diff --git a/controllers/thread.lua b/controllers/thread.lua index ed0a3e9..d974d98 100644 --- a/controllers/thread.lua +++ b/controllers/thread.lua @@ -77,7 +77,7 @@ return { self.csrf_token = csrf.generate_token(self) -- Determine if we allow a user to upload a file - self.num_files = Posts:count_files(self.board.id, self.thread.id) + self.num_files = Posts:count_files(self.thread.id) -- Get posts self.posts = Posts:get_posts_by_thread(self.thread.id) diff --git a/utils/request_processor.lua b/utils/request_processor.lua index 3cee538..7194555 100644 --- a/utils/request_processor.lua +++ b/utils/request_processor.lua @@ -76,8 +76,8 @@ function process.create_thread(params, session, board) end function process.create_post(params, session, board, thread) - local posts = Posts:count_posts(board.id, thread.id) - local files = Posts:count_files(board.id, thread.id) + local posts = Posts:count_posts(thread.id) + local files = Posts:count_files(thread.id) -- Prepare data for entry local _, err = Posts:prepare_post( diff --git a/utils/text_formatter.lua b/utils/text_formatter.lua index 14bc3ae..605dbf8 100644 --- a/utils/text_formatter.lua +++ b/utils/text_formatter.lua @@ -35,7 +35,7 @@ function formatter.quote(text, request, board, post) local thread = Threads:get_thread(p.thread_id) if not thread then return false end - local op = Posts:get_thread_op(board.id, thread.id) + local op = Posts:get_thread_op(thread.id) return request.boards_url .. board.short_name .. "/thread/" .. op.post_id, op