Changes for httpbl.module: 3 added lines, 4 removed lines.
Original line number
Diff line number
Diff line
@@ -31,7 +31,6 @@ use Drupal\Core\Routing\RouteMatchInterface;
useDrupal\httpbl\HostQuery;
useDrupal\httpbl\Entity\Host;
useDrupal\httpbl\HttpblResponse;
useDrupal\Component\Render\FormattableMarkup;
useDrupal\Core\Form\FormStateInterface;
/**
@@ -143,7 +142,7 @@ function httpbl_comment_presave($comment) {
if($evaluated[1]>HTTPBL_LIST_SAFE){
// Comment user's IP found in Project Honeypot.
// Let them know.
drupal_set_message(t('Your comment was rejected because your IP address (@ip) is ranked "suspicious" by Project Honeypot.',['@ip'=>$ip]),'error',FALSE);
\Drupal::messenger()->addMessage(t('Your comment was rejected because your IP address (@ip) is ranked "suspicious" by Project Honeypot.',['@ip'=>$ip]),'error',FALSE);
// Prepare to alter the comment subject and body.
// Make link to the blocked host profile on Project Honeypot.
@@ -247,7 +246,7 @@ function httpbl_comment_presave($comment) {
}
// Advise commenter they are history!
drupal_set_message(t('Your address (@ip) has been blacklisted for @time.',['@ip'=>$ip,'@time'=>$expires]),'error',FALSE);
\Drupal::messenger()->addMessage(t('Your address (@ip) has been blacklisted for @time.',['@ip'=>$ip,'@time'=>$expires]),'error',FALSE);
}
// Check for blacklisting storage only (no auto-banning configured).
@@ -286,7 +285,7 @@ function httpbl_comment_presave($comment) {
drupal_set_message(t('You can become white-listed for your current session by passing this @challenge.',['@challenge'=>$whitelistLink]),'warning',FALSE);
\Drupal::messenger()->addMessage(t('You can become white-listed for your current session by passing this @challenge.',['@challenge'=>$whitelistLink]),'warning',FALSE);