|
|
@ -749,6 +749,10 @@ var RDB = require('./redis.js')
|
|
|
|
Topics.delete = function(tid) {
|
|
|
|
Topics.delete = function(tid) {
|
|
|
|
Topics.setTopicField(tid, 'deleted', 1);
|
|
|
|
Topics.setTopicField(tid, 'deleted', 1);
|
|
|
|
RDB.zrem('topics:recent', tid);
|
|
|
|
RDB.zrem('topics:recent', tid);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Topics.getTopicField(tid, 'cid', function(err, cid) {
|
|
|
|
|
|
|
|
feed.updateCategory(cid);
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Topics.restore = function(tid) {
|
|
|
|
Topics.restore = function(tid) {
|
|
|
@ -756,6 +760,10 @@ var RDB = require('./redis.js')
|
|
|
|
Topics.getTopicField(tid, 'lastposttime', function(err, lastposttime) {
|
|
|
|
Topics.getTopicField(tid, 'lastposttime', function(err, lastposttime) {
|
|
|
|
RDB.zadd('topics:recent', lastposttime, tid);
|
|
|
|
RDB.zadd('topics:recent', lastposttime, tid);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Topics.getTopicField(tid, 'cid', function(err, cid) {
|
|
|
|
|
|
|
|
feed.updateCategory(cid);
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Topics.reIndexTopic = function(tid, callback) {
|
|
|
|
Topics.reIndexTopic = function(tid, callback) {
|
|
|
|