store teaserPid in topic

-update teaser pid as necessary in addPostToTopic, removePostFromTopic,
post purge
-removed 20x db calls from getTeasers
-fixed scroll to post in sub folder install
-upgrade script to update topics with teaserPid
This commit is contained in:
barisusakli
2014-12-12 18:52:37 -05:00
parent 0cb0dafae3
commit 2c7d9e1a7c
5 changed files with 102 additions and 85 deletions

View File

@@ -167,6 +167,9 @@ module.exports = function(Posts) {
function (next) {
topics.decreasePostCount(postData.tid, next);
},
function(next) {
topics.updateTeaser(postData.tid, next);
},
function(next) {
user.incrementUserPostCountBy(postData.uid, -1, next);
},