-
Bug
-
Resolution: Fixed
-
Minor
-
3.0.11
-
None
-
PHP 5.4.3, MySQL 5.1.3, Firefox 20
When you fork a topic, the post's count of each users is not incremented depending number of post of each users.
User user01
-Create a new topic with user01. (user01 got +1 post on his counter)
-Fork this topic using moderation tool (user01 will not got +1 post on his counter)
-Delete the copied topic (user01 got -1 post on his counter)
User has now 0 post on his counter even with the first topic manually writed.
Solution:
Open includes/mcp/mcp_main.php
Search(line 1181):
'post_postcount' => 0,
Replace with:
'post_postcount' => (int) $row['post_postcount'],
Search(line 1184):
$db->sql_query('INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
Add After:
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_posts = user_posts + 1
WHERE user_id = ' . (int) $row['poster_id'];
$db->sql_query($sql);