mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge branch '4.3' into 4
This commit is contained in:
commit
d8cd085190
@ -323,6 +323,12 @@ class Session
|
||||
}
|
||||
|
||||
session_start();
|
||||
|
||||
// Session start emits a cookie, but only if there's no existing session. If there is a session timeout
|
||||
// tied to this request, make sure the session is held for the entire timeout by refreshing the cookie age.
|
||||
if ($timeout && $this->requestContainsSessionId($request)) {
|
||||
Cookie::set(session_name(), session_id(), $timeout / 86400, $path, $domain ?: null, $secure, true);
|
||||
}
|
||||
} else {
|
||||
// If headers are sent then we can't have a session_cache_limiter otherwise we'll get a warning
|
||||
session_cache_limiter(null);
|
||||
|
@ -7,11 +7,17 @@ use SilverStripe\Dev\SapphireTest;
|
||||
use SilverStripe\Forms\Form;
|
||||
use SilverStripe\Forms\FormTemplateHelper;
|
||||
use SilverStripe\Forms\TreeMultiselectField;
|
||||
use SilverStripe\ORM\Tests\HierarchyTest\TestObject;
|
||||
use SilverStripe\View\SSViewer;
|
||||
|
||||
class TreeMultiselectFieldTest extends SapphireTest
|
||||
{
|
||||
protected static $fixture_file = 'TreeDropdownFieldTest.yml';
|
||||
|
||||
protected static $extra_dataobjects = [
|
||||
TestObject::class,
|
||||
];
|
||||
|
||||
protected $formId = 'TheFormID';
|
||||
protected $fieldName = 'TestTree';
|
||||
|
||||
@ -54,6 +60,9 @@ class TreeMultiselectFieldTest extends SapphireTest
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
// Don't let other themes interfere with these tests
|
||||
SSViewer::set_themes([]);
|
||||
|
||||
$this->form = $this->buildFormMock();
|
||||
$this->field = $this->buildField($this->form);
|
||||
$this->folders = $this->loadFolders();
|
||||
|
Loading…
x
Reference in New Issue
Block a user