mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Bug with forms being cached
This commit is contained in:
parent
7c875918c7
commit
befd81d0c2
@ -7,6 +7,7 @@ use SilverStripe\Control\Controller;
|
|||||||
use SilverStripe\Control\HasRequestHandler;
|
use SilverStripe\Control\HasRequestHandler;
|
||||||
use SilverStripe\Control\HTTP;
|
use SilverStripe\Control\HTTP;
|
||||||
use SilverStripe\Control\HTTPRequest;
|
use SilverStripe\Control\HTTPRequest;
|
||||||
|
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
|
||||||
use SilverStripe\Control\NullHTTPRequest;
|
use SilverStripe\Control\NullHTTPRequest;
|
||||||
use SilverStripe\Control\RequestHandler;
|
use SilverStripe\Control\RequestHandler;
|
||||||
use SilverStripe\Control\Session;
|
use SilverStripe\Control\Session;
|
||||||
@ -884,7 +885,7 @@ class Form extends ViewableData implements HasRequestHandler
|
|||||||
|
|
||||||
// If we need to disable cache, do it
|
// If we need to disable cache, do it
|
||||||
if ($needsCacheDisabled) {
|
if ($needsCacheDisabled) {
|
||||||
HTTP::set_cache_age(0);
|
HTTPCacheControlMiddleware::singleton()->disableCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
$attrs = $this->getAttributes();
|
$attrs = $this->getAttributes();
|
||||||
|
Loading…
Reference in New Issue
Block a user