BUGFIX: Fixed bug with SiteTree::onBeforeWrite() that broke subsites.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@102094 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-04-06 03:55:00 +00:00
parent 04fe15cc7c
commit 6cf35458bd

View File

@ -1328,6 +1328,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
//------------------------------------------------------------------------------------//
protected function onBeforeWrite() {
parent::onBeforeWrite();
// If Sort hasn't been set, make this page come after it's siblings
if(!$this->Sort) {
$parentID = ($this->ParentID) ? $this->ParentID : 0;
@ -1376,9 +1378,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
// This will have the affect of preserving the versioning
$this->migrateVersion($this->Version);
}
parent::onBeforeWrite();
}
function syncLinkTracking() {