Skip to content

Commit

Permalink
Recounting will count visible posts and threads only
Browse files Browse the repository at this point in the history
  • Loading branch information
Diogo Parrinha committed May 20, 2016
1 parent 5610ac9 commit efd32eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Upload/admin/modules/newpoints/maintenance.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
$firstposts = array(0);

// threads and polls
$totalthreads_query = $db->simple_select("threads", "firstpost,fid,poll", "uid='".$user['uid']."'");
$totalthreads_query = $db->simple_select("threads", "firstpost,fid,poll", "uid='".$user['uid']."' AND visible=1");
while ($thread = $db->fetch_array($totalthreads_query))
{
if ($mybb->settings['newpoints_income_newthread'] == 0)
Expand Down Expand Up @@ -258,7 +258,7 @@
}

// posts
$totalposts_query = $db->simple_select("posts", "fid,message", "uid='".$user['uid']."' AND pid NOT IN(".implode(',', $firstposts).")");
$totalposts_query = $db->simple_select("posts", "fid,message", "uid='".$user['uid']."' AND pid NOT IN(".implode(',', $firstposts).") AND visible=1");
while ($post = $db->fetch_array($totalposts_query))
{
if ($mybb->settings['newpoints_income_newpost'] == 0)
Expand Down

0 comments on commit efd32eb

Please sign in to comment.