mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge branch '5' into 6
This commit is contained in:
commit
ae89276432
@ -319,6 +319,15 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
|
|||||||
"Stage", "Live"
|
"Stage", "Live"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fields which, if changed on their own, won't cause a new version/live record to be created
|
||||||
|
* @var string[]
|
||||||
|
*/
|
||||||
|
private static array $fields_ignored_by_versioning = [
|
||||||
|
'HasBrokenFile',
|
||||||
|
'HasBrokenLink',
|
||||||
|
];
|
||||||
|
|
||||||
private static $default_sort = "\"Sort\"";
|
private static $default_sort = "\"Sort\"";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1629,7 +1638,7 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
|
|||||||
if (!SiteTree::get_by_link($defaultHomepage)) {
|
if (!SiteTree::get_by_link($defaultHomepage)) {
|
||||||
$homepage = new Page();
|
$homepage = new Page();
|
||||||
$homepage->Title = _t(__CLASS__.'.DEFAULTHOMETITLE', 'Home');
|
$homepage->Title = _t(__CLASS__.'.DEFAULTHOMETITLE', 'Home');
|
||||||
$homepage->Content = _t(__CLASS__.'.DEFAULTHOMECONTENT', '<p>Welcome to SilverStripe! This is the default homepage. You can edit this page by opening <a href="admin/">the CMS</a>.</p><p>You can now access the <a href="http://docs.silverstripe.org">developer documentation</a>, or begin the <a href="http://www.silverstripe.org/learn/lessons">SilverStripe lessons</a>.</p>');
|
$homepage->Content = _t(__CLASS__.'.DEFAULTHOMECONTENT2', '<p>Welcome to Silverstripe! This is the default homepage. You can edit this page by opening <a href="admin/">the CMS</a>.</p><p>For comprehensive information on Silverstripe CMS, see the <a target="_blank" href="http://docs.silverstripe.org">developer documentation</a>.</p>');
|
||||||
$homepage->URLSegment = $defaultHomepage;
|
$homepage->URLSegment = $defaultHomepage;
|
||||||
$homepage->Sort = 1;
|
$homepage->Sort = 1;
|
||||||
$homepage->write();
|
$homepage->write();
|
||||||
@ -1722,7 +1731,7 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check to see if we've only altered fields that shouldn't affect versioning
|
// Check to see if we've only altered fields that shouldn't affect versioning
|
||||||
$fieldsIgnoredByVersioning = ['HasBrokenLink', 'Status', 'HasBrokenFile', 'ToDo', 'VersionID', 'SaveCount'];
|
$fieldsIgnoredByVersioning = $this->config()->get('fields_ignored_by_versioning') ?? [];
|
||||||
$changedFields = array_keys($this->getChangedFields(true, 2) ?? []);
|
$changedFields = array_keys($this->getChangedFields(true, 2) ?? []);
|
||||||
|
|
||||||
// This more rigorous check is inline with the test that write() does to decide whether or not to write to the
|
// This more rigorous check is inline with the test that write() does to decide whether or not to write to the
|
||||||
|
@ -195,6 +195,7 @@ en:
|
|||||||
DEFAULTCONTACTCONTENT: '<p>You can fill this page out with your own content, or delete it and create your own pages.</p>'
|
DEFAULTCONTACTCONTENT: '<p>You can fill this page out with your own content, or delete it and create your own pages.</p>'
|
||||||
DEFAULTCONTACTTITLE: 'Contact Us'
|
DEFAULTCONTACTTITLE: 'Contact Us'
|
||||||
DEFAULTHOMECONTENT: '<p>Welcome to SilverStripe! This is the default homepage. You can edit this page by opening <a href="admin/">the CMS</a>.</p><p>You can now access the <a href="http://docs.silverstripe.org">developer documentation</a>, or begin the <a href="http://www.silverstripe.org/learn/lessons">SilverStripe lessons</a>.</p>'
|
DEFAULTHOMECONTENT: '<p>Welcome to SilverStripe! This is the default homepage. You can edit this page by opening <a href="admin/">the CMS</a>.</p><p>You can now access the <a href="http://docs.silverstripe.org">developer documentation</a>, or begin the <a href="http://www.silverstripe.org/learn/lessons">SilverStripe lessons</a>.</p>'
|
||||||
|
DEFAULTHOMECONTENT2: '<p>Welcome to Silverstripe! This is the default homepage. You can edit this page by opening <a href="admin/">the CMS</a>.</p><p>For comprehensive information on Silverstripe CMS, see the <a target="_blank" href="http://docs.silverstripe.org">developer documentation</a>.</p>'
|
||||||
DEFAULTHOMETITLE: Home
|
DEFAULTHOMETITLE: Home
|
||||||
DEPENDENT_NOTE: 'The following pages depend on this page. This includes virtual pages, redirector pages, and pages with content links.'
|
DEPENDENT_NOTE: 'The following pages depend on this page. This includes virtual pages, redirector pages, and pages with content links.'
|
||||||
DESCRIPTION: 'Generic content page'
|
DESCRIPTION: 'Generic content page'
|
||||||
|
Loading…
Reference in New Issue
Block a user