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

@@ -104,7 +104,7 @@ define('forum/topic', [
function getPostIndex() {
var parts = window.location.pathname.split('/');
return parts[4] ? parseInt(parts[4], 10) : 0;
return parts[parts.length - 1] ? parseInt(parts[parts.length - 1], 10) : 0;
}
function handleSorting() {