mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Remove deprecated security token methods on Form
Use SecurityToken class directly instead
This commit is contained in:
parent
63820130c2
commit
b43b023c1e
@ -1295,34 +1295,6 @@ class Form extends RequestHandler {
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable security tokens for every form.
|
||||
* Note that this doesn't apply to {@link SecurityToken}
|
||||
* instances outside of the Form class, nor applies
|
||||
* to existing form instances.
|
||||
*
|
||||
* See {@link enable_all_security_tokens()}.
|
||||
*
|
||||
* @deprecated 2.5 Use SecurityToken::disable()
|
||||
*/
|
||||
public static function disable_all_security_tokens() {
|
||||
Deprecation::notice('2.5', 'Use SecurityToken::disable() instead.');
|
||||
SecurityToken::disable();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if security is enabled - that is if the security token
|
||||
* should be included and checked on this form.
|
||||
*
|
||||
* @deprecated 2.5 Use Form->getSecurityToken()->isEnabled()
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function securityTokenEnabled() {
|
||||
Deprecation::notice('2.5', 'Use Form->getSecurityToken()->isEnabled() instead.');
|
||||
return $this->securityToken->isEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the security token for this form (if any exists).
|
||||
* Doesn't check for {@link securityTokenEnabled()}.
|
||||
|
Loading…
Reference in New Issue
Block a user