From 614706f04dcc7160748712fa55823a95410c04eb Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Tue, 2 Oct 2007 05:13:32 +0000 Subject: [PATCH] Improved static config methods on math spam protection (merged from 2.1.0 branch, r42467) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@42937 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/sitefeatures/MathSpamProtection.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/code/sitefeatures/MathSpamProtection.php b/code/sitefeatures/MathSpamProtection.php index f3c2cf47..d60b53c6 100644 --- a/code/sitefeatures/MathSpamProtection.php +++ b/code/sitefeatures/MathSpamProtection.php @@ -7,14 +7,6 @@ class MathSpamProtection { private static $mathProtection = false; - static function isEnabled() { - return (self::$mathProtection != null) ? true : false; - } - - static function setEnabled($math = true) { - MathSpamProtection::$mathProtection = $math; - } - /** * Creates the question from random variables, which are also saved to the session. */ @@ -63,5 +55,13 @@ class MathSpamProtection { } + static function isEnabled() { + return self::$mathProtection; + } + + static function setEnabled($math = true) { + self::$mathProtection = $math; + } + } ?>