mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 07:25:46 +01:00
closes #964
This commit is contained in:
@@ -189,14 +189,15 @@ var winston = require('winston'),
|
||||
var topic;
|
||||
async.waterfall([
|
||||
function(next) {
|
||||
topics.getTopicFields(tid, ['cid', 'lastposttime', 'deleted'], next);
|
||||
topics.getTopicFields(tid, ['cid', 'lastposttime', 'pinned', 'deleted'], next);
|
||||
},
|
||||
function(topicData, next) {
|
||||
topic = topicData;
|
||||
db.sortedSetRemove('categories:' + topicData.cid + ':tid', tid, next);
|
||||
},
|
||||
function(result, next) {
|
||||
db.sortedSetAdd('categories:' + cid + ':tid', topic.lastposttime, tid, next);
|
||||
var timestamp = parseInt(topic.pinned, 10) ? Math.pow(2, 53) : topic.lastposttime;
|
||||
db.sortedSetAdd('categories:' + cid + ':tid', timestamp, tid, next);
|
||||
}
|
||||
], function(err, result) {
|
||||
if(err) {
|
||||
|
||||
Reference in New Issue
Block a user