private function _check_for_spam($fields, $environment, $akismetAPIKey = false) { if (isset($fields['honeypot']) && trim($fields['honeypot']) != '') { PerchUtil::debug('Honeypot field completed: message is spam'); return true; } if ($akismetAPIKey) { if (!class_exists('PerchBlog_Akismet')) { include_once 'PerchBlog_Akismet.class.php'; } if (PerchBlog_Akismet::check_message_is_spam($akismetAPIKey, $fields, $environment)) { PerchUtil::debug('Message is spam'); return true; } else { PerchUtil::debug('Message is not spam'); } } return false; }