update category topic count if topic is deleted/restored

v1.18.x
Baris Usakli 11 years ago
parent a0c7e187f5
commit dee99c1752

@ -788,6 +788,7 @@ var RDB = require('./redis.js'),
Topics.getTopicField(tid, 'cid', function(err, cid) {
feed.updateCategory(cid);
RDB.hincrby('category:' + cid, 'topic_count', -1);
});
}
@ -799,6 +800,7 @@ var RDB = require('./redis.js'),
Topics.getTopicField(tid, 'cid', function(err, cid) {
feed.updateCategory(cid);
RDB.hincrby('category:' + cid, 'topic_count', 1);
});
}

Loading…
Cancel
Save