From f4917921ec31e4a9852f8fe99d22c9f4c98da942 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Sun, 16 Dec 2012 11:23:21 +1300 Subject: [PATCH 1/3] Make spamprotection for comments opt in by default --- _config.php | 15 ++++++++------- code/extensions/CommentSpamProtection.php | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/_config.php b/_config.php index c772bab..4d9ef57 100644 --- a/_config.php +++ b/_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'); -} \ No newline at end of file +/** + * 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'); \ No newline at end of file diff --git a/code/extensions/CommentSpamProtection.php b/code/extensions/CommentSpamProtection.php index a2225ce..a0c89bd 100644 --- a/code/extensions/CommentSpamProtection.php +++ b/code/extensions/CommentSpamProtection.php @@ -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', From 4ad952fe99d8ab4a7ea1109f8974315e94615556 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Fri, 5 Apr 2013 21:13:05 +1300 Subject: [PATCH 2/3] Merged --- _config.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/_config.php b/_config.php index 4d9ef57..348ca82 100644 --- a/_config.php +++ b/_config.php @@ -9,6 +9,7 @@ * @package spamprotection */ +<<<<<<< HEAD /** * If the comments module is installed then add the spam protection module * to the comments form via this extension. @@ -16,4 +17,13 @@ * Place this line in your mysite/_config.php */ -// Object::add_extension('CommentingController', 'CommentSpamProtection'); \ No newline at end of file +// Object::add_extension('CommentingController', 'CommentSpamProtection'); +======= +if(class_exists('Comment')) { + /** + * If the comments module is installed then add the spam protection module + * to the comments form via this extension + */ + CommentingController::add_extension('CommentSpamProtection'); +} +>>>>>>> FIX: 3.1 extension API updates From bd5e778d4f5f7d01bea6c8d2c5449c0fbfa65b18 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Fri, 5 Apr 2013 21:13:26 +1300 Subject: [PATCH 3/3] Merged --- _config.php | 12 +----------- composer.json | 5 ++--- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/_config.php b/_config.php index 348ca82..4f364ab 100644 --- a/_config.php +++ b/_config.php @@ -9,7 +9,6 @@ * @package spamprotection */ -<<<<<<< HEAD /** * If the comments module is installed then add the spam protection module * to the comments form via this extension. @@ -17,13 +16,4 @@ * Place this line in your mysite/_config.php */ -// Object::add_extension('CommentingController', 'CommentSpamProtection'); -======= -if(class_exists('Comment')) { - /** - * If the comments module is installed then add the spam protection module - * to the comments form via this extension - */ - CommentingController::add_extension('CommentSpamProtection'); -} ->>>>>>> FIX: 3.1 extension API updates +// CommentingController::add_extension('CommentSpamProtection'); \ No newline at end of file diff --git a/composer.json b/composer.json index bea8d3d..62b1cd8 100644 --- a/composer.json +++ b/composer.json @@ -9,9 +9,8 @@ }, { "name": "Will Rossiter", "email": "will@fullscreen.io" - } - ], + }], "require": { - "silverstripe/framework": "3.*" + "silverstripe/framework": "3.1.*" } } \ No newline at end of file