Improved static config methods on math spam protection

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.1.0@42465 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Jeremy Shipman 2007-09-23 23:59:53 +00:00 committed by Sam Minnee
parent c83a3c75b1
commit 978ca0b7e9

View File

@ -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;
}
}
?>