mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
again
This commit is contained in:
@@ -244,10 +244,7 @@ var async = require('async'),
|
||||
};
|
||||
|
||||
Topics.getTopicWithPosts = function(tid, set, uid, start, end, reverse, callback) {
|
||||
if (end - start > 50) {
|
||||
var e = new Error('TOO LARGE');
|
||||
winston.warn('GET_TOPIC_WITH_POSTS set, start, end, uid, tid', set, start, end, uid, tid, e.stack);
|
||||
}
|
||||
|
||||
Topics.getTopicData(tid, function(err, topicData) {
|
||||
if (err || !topicData) {
|
||||
return callback(err || new Error('[[error:no-topic]]'));
|
||||
@@ -268,7 +265,10 @@ var async = require('async'),
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
if (posts.length > 100) {
|
||||
var e = new Error('TOO LARGE');
|
||||
winston.warn('GET_TOPIC_WITH_POSTS set, start, end, uid, tid', set, start, end, uid, tid, e.stack);
|
||||
}
|
||||
Topics.addPostData(posts, uid, next);
|
||||
});
|
||||
});
|
||||
@@ -337,7 +337,7 @@ var async = require('async'),
|
||||
Topics.addPostData(postData, uid, callback);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Topics.getTeasers = function(tids, uid, callback) {
|
||||
if(!Array.isArray(tids)) {
|
||||
|
||||
Reference in New Issue
Block a user