2010-12-13 01:50:08 +01:00
|
|
|
<?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
|
|
|
|
*/
|
2012-12-15 23:23:21 +01:00
|
|
|
public function alterCommentForm(&$form) {
|
2010-12-13 01:50:08 +01:00
|
|
|
SpamProtectorManager::update_form($form, null, array(
|
|
|
|
'Name' => 'author_name',
|
2013-06-11 00:46:30 +02:00
|
|
|
'URL' => 'author_url',
|
2010-12-13 01:50:08 +01:00
|
|
|
'Comment' => 'post_body',
|
2013-04-10 04:52:08 +02:00
|
|
|
'Email' => 'author_mail'
|
2010-12-13 01:50:08 +01:00
|
|
|
));
|
|
|
|
}
|
2013-04-10 04:52:08 +02:00
|
|
|
}
|