fix recent replies

v1.18.x
barisusakli 10 years ago
parent 385760bdda
commit 39a75ea2d7

@ -103,7 +103,10 @@ module.exports = function(Categories) {
pids = pids.concat(topicPids).filter(function(pid, index, array) {
return !!pid && array.indexOf(pid) === index;
});
}).sort(function(a, b) {
return b - a;
}).slice(0, count);
callback(null, pids);
});
});

@ -177,7 +177,7 @@ module.exports = function(Topics) {
return next(err);
}
latestPid = pids[0];
isDeleted = deleted;
isDeleted = parseInt(deleted, 10) === 1;
++index;
next();
});

Loading…
Cancel
Save