From 4f88e9cf2cd439b1a345b460684e0b51b69fbbca Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 26 Mar 2014 11:15:27 -0400 Subject: [PATCH] shortened the user postcount update code --- public/src/forum/topic.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index 77e585224a..473b874241 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -270,16 +270,9 @@ define(['forum/pagination', 'forum/topic/threadTools', 'forum/topic/postTools'], return; } - var posts = data.posts; - for (var p in posts) { - if (posts.hasOwnProperty(p)) { - var post = posts[p], - postcount = $('.user_postcount_' + post.uid), - ptotal = parseInt(postcount.html(), 10); - - ptotal += 1; - postcount.html(ptotal); - } + for (var i=0; i