@@ -24,0 +25,2 @@
+// spam clear
+require_once dirname(__FILE__).'/../../ecrire/tools/spamclear/functions.php';
@@ -1814 +1816 @@
-	function getComments($post_id='',$order='ASC',$limit=NULL)
+	function getComments($post_id='',$order='ASC',$limit=NULL, $where ='')
@@ -1834,0 +1837,2 @@
+				// spam clear
+				'spam, trained,'.
@@ -1840,2 +1844,2 @@
-				'WHERE P.post_id = C.post_id '.
-				$reqPlus.
+				'WHERE ( P.post_id = C.post_id '.
+				$reqPlus. ' ) ' . $where . ' ' .
@@ -1922,0 +1927,7 @@
+		$filter = new SpamClear($this->con);
+		$spam = '0';
+		if($filter->isSpam($auteur . " " . $content)) {
+			$spam = '1';
+			$pub = false;
+		}
+		
@@ -1950 +1961 @@
-				'comment_trackback) VALUES '.
+				'comment_trackback, spam) VALUES '.
@@ -1959 +1970,2 @@
-				(integer) $trackback.') ';
+				(integer) $trackback.',' . 
+				(integer) $spam . ') ';
@@ -2662 +2674 @@
-?>
\ No newline at end of file
+?>

