equal
deleted
inserted
replaced
279 |
279 |
280 // Spam check |
280 // Spam check |
281 $spam_policy = getConfig('comment_spam_policy', 'moderate'); |
281 $spam_policy = getConfig('comment_spam_policy', 'moderate'); |
282 $sc_name = ( $session->user_logged_in ) ? $session->username : $data['name']; |
282 $sc_name = ( $session->user_logged_in ) ? $session->username : $data['name']; |
283 $sc_mail = ( $session->user_logged_in ) ? $session->email : false; |
283 $sc_mail = ( $session->user_logged_in ) ? $session->email : false; |
284 $sc_url = ( $session->user_logged_in ) ? $session->user_extra['user_homepage'] : false; |
284 $sc_url = ( $session->user_logged_in ) ? @$session->user_extra['user_homepage'] : false; |
285 $spamcheck = $spam_policy === 'accept' ? true : spamalyze($data['text'], $sc_name, $sc_mail, $sc_url); |
285 $spamcheck = $spam_policy === 'accept' ? true : spamalyze($data['text'], $sc_name, $sc_mail, $sc_url); |
286 if ( !$spamcheck && $spam_policy === 'reject' ) |
286 if ( !$spamcheck && $spam_policy === 'reject' ) |
287 { |
287 { |
288 $errors[] = $lang->get('comment_err_spamcheck_failed_rejected'); |
288 $errors[] = $lang->get('comment_err_spamcheck_failed_rejected'); |
289 } |
289 } |