update category topic count if topic is deleted/restored

This commit is contained in:
Baris Usakli
2013-10-16 13:42:07 -04:00
parent a0c7e187f5
commit dee99c1752

View File

@@ -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);
});
}