|
|
@ -9,16 +9,7 @@ var async = require('async'),
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = function(Categories) {
|
|
|
|
module.exports = function(Categories) {
|
|
|
|
Categories.getRecentReplies = function(cid, uid, count, callback) {
|
|
|
|
Categories.getRecentReplies = function(cid, uid, count, callback) {
|
|
|
|
if(count === 0 || !count) {
|
|
|
|
if(!parseInt(count, 10)) {
|
|
|
|
return callback(null, []);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CategoryTools.privileges(cid, uid, function(err, privileges) {
|
|
|
|
|
|
|
|
if(err) {
|
|
|
|
|
|
|
|
return callback(err);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!privileges.read) {
|
|
|
|
|
|
|
|
return callback(null, []);
|
|
|
|
return callback(null, []);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -33,7 +24,6 @@ module.exports = function(Categories) {
|
|
|
|
|
|
|
|
|
|
|
|
posts.getPostSummaryByPids(pids, true, callback);
|
|
|
|
posts.getPostSummaryByPids(pids, true, callback);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Categories.moveRecentReplies = function(tid, oldCid, cid, callback) {
|
|
|
|
Categories.moveRecentReplies = function(tid, oldCid, cid, callback) {
|
|
|
|