mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
closes #97
This commit is contained in:
@@ -95,6 +95,10 @@ marked.setOptions({
|
||||
threadTools.delete(tid, -1, function(err) {
|
||||
if (err) console.log('Error: Could not delete topic (tid: ' + tid + ')');
|
||||
});
|
||||
} else {
|
||||
posts.getPostField(pid, 'timestamp', function(timestamp) {
|
||||
topics.updateTimestamp(tid, timestamp);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -297,7 +297,7 @@ marked.setOptions({
|
||||
|
||||
topics.increasePostCount(tid);
|
||||
topics.setTopicField(tid, 'lastposttime', timestamp);
|
||||
topics.addToRecent(tid, timestamp);
|
||||
topics.updateTimestamp(tid, timestamp);
|
||||
|
||||
RDB.incr('totalpostcount');
|
||||
|
||||
@@ -318,8 +318,6 @@ marked.setOptions({
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
user.onNewPostMade(uid, tid, pid, timestamp);
|
||||
|
||||
if (callback)
|
||||
|
||||
@@ -450,7 +450,7 @@ marked.setOptions({
|
||||
});
|
||||
}
|
||||
|
||||
Topics.addToRecent = function(tid, timestamp) {
|
||||
Topics.updateTimestamp = function(tid, timestamp) {
|
||||
RDB.zadd(schema.topics().recent, timestamp, tid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user