Skip to content

Node.js based forum software built for the modern web

removed commented out code

barisusakli2878bf6cfe12
diff --git a/src/topics.js b/src/topics.js
index 6dd1a6361a..8f8915ab69 100644
--- a/src/topics.js
+++ b/src/topics.js
@@ -216,15 +216,7 @@ var async = require('async'),
}
async.parallel({
- // mainPost: function(next) {
- // getMainPosts([topicData.mainPid], uid, next);
- // },
- // posts: function(next) {
- // Topics.getTopicPosts(tid, set, start, end, uid, reverse, next);
- // },
- posts: function(next) {
- getMainPostAndReplies(topicData, set, uid, start, end, reverse, next);
- },
+ posts: async.apply(getMainPostAndReplies, topicData, set, uid, start, end, reverse),
category: async.apply(Topics.getCategoryData, tid),
threadTools: async.apply(plugins.fireHook, 'filter:topic.thread_tools', {topic: topicData, uid: uid, tools: []}),
tags: async.apply(Topics.getTopicTagsObjects, tid),
@@ -234,7 +226,6 @@ var async = require('async'),
return callback(err);
}
- //topicData.posts = Array.isArray(results.mainPost) && results.mainPost.length ? [results.mainPost[0]].concat(results.posts) : results.posts;
topicData.posts = results.posts;
topicData.category = results.category;
topicData.thread_tools = results.threadTools.tools;