Make spamprotection for comments opt in by default

This commit is contained in:
Will Rossiter 2012-12-16 11:23:21 +13:00
parent 823efc3483
commit f4917921ec
2 changed files with 9 additions and 8 deletions

View File

@ -9,10 +9,11 @@
* @package spamprotection * @package spamprotection
*/ */
if(class_exists('Comment')) {
/** /**
* If the comments module is installed then add the spam protection module * If the comments module is installed then add the spam protection module
* to the comments form via this extension * to the comments form via this extension.
*
* Place this line in your mysite/_config.php
*/ */
Object::add_extension('CommentingController', 'CommentSpamProtection');
} // Object::add_extension('CommentingController', 'CommentSpamProtection');

View File

@ -12,7 +12,7 @@ class CommentSpamProtection extends Extension {
* Disable the AJAX commenting and update the form * Disable the AJAX commenting and update the form
* with the {@link SpamProtectorField} which is enabled * with the {@link SpamProtectorField} which is enabled
*/ */
function alterCommentForm(&$form) { public function alterCommentForm(&$form) {
SpamProtectorManager::update_form($form, null, array( SpamProtectorManager::update_form($form, null, array(
'Name' => 'author_name', 'Name' => 'author_name',
'CommenterURL' => 'author_url', 'CommenterURL' => 'author_url',