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
This commit is contained in:
Andrew O'Neil 2007-10-02 05:13:32 +00:00
parent 60440e888f
commit 614706f04d

View File

@ -7,14 +7,6 @@ class MathSpamProtection {
private static $mathProtection = false; 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. * 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;
}
} }
?> ?>