mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 06:55:46 +01:00
store pinned topics in new zset
keep pinned topics on top on different sort types
This commit is contained in:
@@ -53,23 +53,8 @@ var social = require('./social');
|
||||
};
|
||||
|
||||
Topics.getTidPage = function (tid, uid, callback) {
|
||||
if(!tid) {
|
||||
return callback(new Error('[[error:invalid-tid]]'));
|
||||
}
|
||||
|
||||
async.parallel({
|
||||
index: function (next) {
|
||||
categories.getTopicIndex(tid, next);
|
||||
},
|
||||
settings: function (next) {
|
||||
user.getSettings(uid, next);
|
||||
}
|
||||
}, function (err, results) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
callback(null, Math.ceil((results.index + 1) / results.settings.topicsPerPage));
|
||||
});
|
||||
console.warn('[Topics.getTidPage] deprecated!');
|
||||
callback(null, 1);
|
||||
};
|
||||
|
||||
Topics.getTopicsFromSet = function (set, uid, start, stop, callback) {
|
||||
|
||||
Reference in New Issue
Block a user