From d35c67ffb2ac455d08b2f2e2f79ccaaf3290ee1e Mon Sep 17 00:00:00 2001
From: Christophe K <ckforall@gmail.com>
Date: Mon, 28 Feb 2022 09:35:16 +0100
Subject: [PATCH] Replace valck.php

---
 upload/inc/plugins/valck.php | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/upload/inc/plugins/valck.php b/upload/inc/plugins/valck.php
index 59bbc0b..74f973a 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
-- 
GitLab