diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index bcfdc0187c..d1cf06fa2b 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -337,7 +337,7 @@ define('forum/topic', dependencies, function(pagination, infinitescroll, threadT var height = $(document).height(), scrollTop = $(document).scrollTop(), originalPostEl = $('li[data-index="0"]'); - + // Insert the new post html.insertBefore(before); @@ -361,19 +361,22 @@ define('forum/topic', dependencies, function(pagination, infinitescroll, threadT } function onNewPostsLoaded(html, posts) { - function getPostPrivileges(pid) { - socket.emit('posts.getPrivileges', pid, function(err, privileges) { - if(err) { - return app.alertError(err.message); - } - toggleModTools(html, privileges); - }); - } - for (var x = 0, numPosts = posts.length; x < numPosts; x++) { - getPostPrivileges(posts[x].pid); + var pids = []; + for(var i=0; i