mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
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:
parent
60440e888f
commit
614706f04d
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user