mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge remote-tracking branch 'origin/3.1'
This commit is contained in:
commit
51c00e33e6
@ -70,7 +70,7 @@ class ErrorPage extends Page {
|
||||
public function requireDefaultRecords() {
|
||||
parent::requireDefaultRecords();
|
||||
|
||||
if ($this->class == 'ErrorPage' && SiteTree::get_create_default_pages()) {
|
||||
if ($this->class == 'ErrorPage' && SiteTree::config()->create_default_pages) {
|
||||
// Ensure that an assets path exists before we do any error page creation
|
||||
if(!file_exists(ASSETS_PATH)) {
|
||||
mkdir(ASSETS_PATH);
|
||||
|
@ -17,15 +17,25 @@ class VirtualPageTest extends SapphireTest {
|
||||
parent::setUp();
|
||||
|
||||
$this->origInitiallyCopiedFields = VirtualPage::config()->initially_copied_fields;
|
||||
VirtualPage::config()->initially_copied_fields = array('MyInitiallyCopiedField');
|
||||
Config::inst()->remove('VirtualPage', 'initially_copied_fields');
|
||||
VirtualPage::config()->initially_copied_fields = array_merge(
|
||||
$this->origInitiallyCopiedFields,
|
||||
array('MyInitiallyCopiedField')
|
||||
);
|
||||
|
||||
$this->origNonVirtualField = VirtualPage::config()->non_virtual_fields;
|
||||
$nonVirtual = VirtualPage::config()->non_virtual_fields;
|
||||
VirtualPage::config()->non_virtual_fields = array('MyNonVirtualField', 'MySharedNonVirtualField');
|
||||
Config::inst()->remove('VirtualPage', 'non_virtual_fields');
|
||||
VirtualPage::config()->non_virtual_fields = array_merge(
|
||||
$this->origNonVirtualField,
|
||||
array('MyNonVirtualField', 'MySharedNonVirtualField')
|
||||
);
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
parent::tearDown();
|
||||
|
||||
Config::inst()->remove('VirtualPage', 'initially_copied_fields');
|
||||
Config::inst()->remove('VirtualPage', 'non_virtual_fields');
|
||||
VirtualPage::config()->initially_copied_fields = $this->origInitiallyCopiedFields;
|
||||
VirtualPage::config()->non_virtual_fields = $this->origNonVirtualField;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user