From 76051243e3d69f73bfb18643711fc9343ab1ed31 Mon Sep 17 00:00:00 2001 From: Robert Curry Date: Fri, 6 Jul 2012 14:43:38 +1200 Subject: [PATCH] Upgrade to be 3.0 compatible. --- README.md | 2 +- code/SpamProtectorManager.php | 4 +++- docs/Install.md | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 320656a..5575c2b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ ## Requirements -SilverStripe 2.3.2 or greater +SilverStripe 3.0.0 or greater ## Documentation diff --git a/code/SpamProtectorManager.php b/code/SpamProtectorManager.php index 303a5ae..9c77425 100644 --- a/code/SpamProtectorManager.php +++ b/code/SpamProtectorManager.php @@ -56,7 +56,9 @@ class SpamProtectorManager { try { $protector = new $protectorClass(); - $field = $protector->getFormField("Captcha", $title, null, $form, $rightTitle); + $field = $protector->getFormField("Captcha", $title, null); + $field->setForm($form); + if ($rightTitle) $field->setRightTitle($rightTitle); if($field) { // update the mapping diff --git a/docs/Install.md b/docs/Install.md index 95445cb..973c8a2 100644 --- a/docs/Install.md +++ b/docs/Install.md @@ -3,7 +3,7 @@ ## Install 1. Unzip this file (spamprotection-0.3.tar.gz) inside your SilverStripe installation directory. -It should be at the same level as the 'cms' and 'sapphire' modules. +It should be at the same level as the 'cms' and 'framework' modules. 2. Ensure the directory name for the module is 'spamprotection'.