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',
|
|
|
|
'CommenterURL' => 'author_url',
|
|
|
|
'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
|
|
|
}
|