mirror of
https://github.com/silverstripe/silverstripe-spamprotection.git
synced 2024-10-22 14:05:59 +02:00
77871a54b7
Email spam field (for Mollom, which I presume this extension is targetting) should be author_mail not author_email https://github.com/silverstripe/silverstripe-mollom/blob/master/code/MollomField.php#L28
24 lines
520 B
PHP
24 lines
520 B
PHP
<?php
|
|
|
|
/**
|
|
* Apply the spam protection to the comments module if it is installed
|
|
*
|
|
* @package spamprotection
|
|
*/
|
|
|
|
class CommentSpamProtection extends Extension {
|
|
|
|
/**
|
|
* Disable the AJAX commenting and update the form
|
|
* with the {@link SpamProtectorField} which is enabled
|
|
*/
|
|
public function alterCommentForm(&$form) {
|
|
SpamProtectorManager::update_form($form, null, array(
|
|
'Name' => 'author_name',
|
|
'CommenterURL' => 'author_url',
|
|
'Comment' => 'post_body',
|
|
'Email' => 'author_mail'
|
|
));
|
|
}
|
|
}
|