diff --git a/upload/inc/plugins/valck.php b/upload/inc/plugins/valck.php index 59bbc0b4fb2d59b9dcdd9bbed09c0fa8490f9db8..74f973ac139e4ef244edd4a6c8a4470d79d32fcc 100755 --- a/upload/inc/plugins/valck.php +++ b/upload/inc/plugins/valck.php @@ -35,7 +35,7 @@ EOT; 'website' => "https://www.ckforum.com", 'author' => "ck", 'authorsite' => "http://github.nailis.fr/ckbox/ckval/-/blob/master/upload/inc/plugins/valck.php", - 'version' => "1.3.5 - ".$versionAPP, + 'version' => "1.3.6 - ".$versionAPP, 'compatibility' => "18*" ); } @@ -59,8 +59,18 @@ global $mybb, $lang, $db, $valck_run; } $datecut = TIME_NOW-(86400*$days); - $sql = "SELECT count(*) FROM `".TABLE_PREFIX."threads` where lastpost >= ".$datecut." ORDER BY `tid` DESC"; - $query = $db->query("SELECT count(*) as count FROM `" . TABLE_PREFIX . "threads` where lastpost >= ".$datecut." ORDER BY `tid` DESC"); + $sql = " + SELECT count(*) FROM `".TABLE_PREFIX."threads` + where lastpost >= ".$datecut." + and visible >= 0 + ORDER BY `tid` DESC"; + + $query = $db->query(" + SELECT count(*) as count FROM `" . TABLE_PREFIX . "threads` + where lastpost >= ".$datecut." + and visible >= 0 + ORDER BY `tid` DESC"); + $newposts = $db->fetch_field($query, "count"); $db->free_result($query); // fin requete message aujourdui