[pLog-svn] r689 - plog/trunk/class/security

oscar at devel.plogworld.net oscar at devel.plogworld.net
Sat Jan 8 16:41:35 GMT 2005


Author: oscar
Date: 2005-01-08 16:41:35 +0000 (Sat, 08 Jan 2005)
New Revision: 689

Modified:
   plog/trunk/class/security/bayesianfilter.class.php
Log:
there was a bug in the bayesian filter, in the case that the comment had been given the status of "spam"

Modified: plog/trunk/class/security/bayesianfilter.class.php
===================================================================
--- plog/trunk/class/security/bayesianfilter.class.php	2005-01-08 13:30:39 UTC (rev 688)
+++ plog/trunk/class/security/bayesianfilter.class.php	2005-01-08 16:41:35 UTC (rev 689)
@@ -91,9 +91,10 @@
                 // rules makes things easier :)
                 if( $config->getValue( "bayesian_filter_spam_comments_action" ) == BAYESIAN_FILTER_KEEP_COMMENT_ACTION ) {
                 	$comments = new ArticleComments();
-                    $comments->addComment( $commentTopic, $commentText, $articleId, $parentId,
-                                           $userName, $userEmail, $userUrl,
-                                           $clientIp, true );
+					$comment = new UserComment( $articleId, $parentId, $topic, $commentText,
+					                               null, $userName, $userEmail, $userUrl, $clientIp,
+												   0, COMMENT_STATUS_SPAM );
+                    $comments->addComment( $comment );
                     //$this->log->debug("comment has been kept in the database marked as spam!<br/>");
                 }
                 else {




More information about the pLog-svn mailing list