includes/comment.php
changeset 972 437f2505d340
parent 832 7152ca0a0ce9
child 1011 96119a79cf81
equal deleted inserted replaced
971:bc8f3ab74e5e 972:437f2505d340
   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         }