mirror of
https://github.com/silverstripe/silverstripe-spamprotection.git
synced 2024-10-22 14:05:59 +02:00
Make spamprotection for comments opt in by default
This commit is contained in:
parent
823efc3483
commit
f4917921ec
15
_config.php
15
_config.php
@ -9,10 +9,11 @@
|
||||
* @package spamprotection
|
||||
*/
|
||||
|
||||
if(class_exists('Comment')) {
|
||||
/**
|
||||
* If the comments module is installed then add the spam protection module
|
||||
* to the comments form via this extension
|
||||
*/
|
||||
Object::add_extension('CommentingController', 'CommentSpamProtection');
|
||||
}
|
||||
/**
|
||||
* If the comments module is installed then add the spam protection module
|
||||
* to the comments form via this extension.
|
||||
*
|
||||
* Place this line in your mysite/_config.php
|
||||
*/
|
||||
|
||||
// Object::add_extension('CommentingController', 'CommentSpamProtection');
|
@ -12,7 +12,7 @@ class CommentSpamProtection extends Extension {
|
||||
* Disable the AJAX commenting and update the form
|
||||
* with the {@link SpamProtectorField} which is enabled
|
||||
*/
|
||||
function alterCommentForm(&$form) {
|
||||
public function alterCommentForm(&$form) {
|
||||
SpamProtectorManager::update_form($form, null, array(
|
||||
'Name' => 'author_name',
|
||||
'CommenterURL' => 'author_url',
|
||||
|
Loading…
Reference in New Issue
Block a user