--- index.php.orig 2006-04-22 18:03:22.000000000 -0700 +++ index.php 2006-04-22 18:05:07.000000000 -0700 @@ -42,6 +42,7 @@ require("includes/functions.php"); require("includes/exifer1_5/exif.php"); require("includes/no-refer-spam.php"); +require("includes/akismet.php"); // Set cookie for visitor counter, re-count a person after 60 mins setcookie("lastvisit","expires in 24 hours",time() +60*60*24); @@ -755,7 +756,24 @@ if(($parent_id != "") and ($message != "")) $query = "INSERT INTO ".$pixelpost_db_prefix."comments(id,parent_id,datetime,ip,message,name,url,email) VALUES('NULL','$parent_id','$datetime','$ip','$message','$name','$url','$email')"; - $result = mysql_query($query); + + $comment = array( 'comment_post_ID' => $parent_id, + 'comment_author' => $name, + 'comment_author_url' => $url, + 'comment_author_email' => $email, + 'comment_content' => $message, + 'blog' => $cfgrow['siteurl']); + + $comment['user_ip'] = $_SERVER['REMOTE_ADDR']; + $comment['user_agent'] = $_SERVER['HTTP_USER_AGENT']; + $comment['referrer'] = $_SERVER['HTTP_REFERER']; + + ksd_auto_check_comment( $comment ); + + if($auto_comment_approved != 'spam') { + $result = mysql_query($query); + } + // added by GeoS for sure that comment is saved $email_flag = 1; @@ -787,6 +805,11 @@ $sent_date = gmdate("Y-m-d",time()+(3600 * $cfgrow['timezone'])) ; $sent_time = gmdate("H:i",time()+(3600 * $cfgrow['timezone'])) ; + if($auto_comment_approved == 'spam') { + $subject = $subject . " [SPAM]"; + } + + if ($cfgrow['htmlemailnote']!='yes') { // Plain text note email