mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX: fixed typo in pagecomment which meant commenter url was not saved. BUGFIX: updated protector to use new format
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@86573 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c0352c8566
commit
b70a187aeb
@ -158,15 +158,8 @@ class PageCommentInterface extends RequestHandler {
|
||||
|
||||
// Optional Spam Protection.
|
||||
if(class_exists('SpamProtectorManager')) {
|
||||
// Update the form to add the protecter field to it
|
||||
$protecter = SpamProtectorManager::update_form($form);
|
||||
if($protecter) {
|
||||
$protecter->setFieldMapping('Name', 'Comment');
|
||||
|
||||
// Because most of the Spam Protection will need to query another service
|
||||
// disable ajax commenting
|
||||
self::set_use_ajax_commenting(false);
|
||||
}
|
||||
SpamProtectorManager::update_form($form, null, array('Name', 'CommenterURL', 'Comment'));
|
||||
self::set_use_ajax_commenting(false);
|
||||
}
|
||||
|
||||
// Shall We use AJAX?
|
||||
@ -181,7 +174,7 @@ class PageCommentInterface extends RequestHandler {
|
||||
$form->loadDataFrom(array(
|
||||
"Name" => Cookie::get("PageCommentInterface_Name"),
|
||||
"Comment" => Cookie::get("PageCommentInterface_Comment"),
|
||||
"URL" => Cookie::get("PageCommentInterface_CommenterURL")
|
||||
"CommenterURL" => Cookie::get("PageCommentInterface_CommenterURL")
|
||||
));
|
||||
|
||||
return $form;
|
||||
|
Loading…
Reference in New Issue
Block a user