From 6cf35458bd4a8ec1e098efcc0dad7968fe84b390 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 6 Apr 2010 03:55:00 +0000 Subject: [PATCH] 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 --- core/model/SiteTree.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index 6001f09ae..472df5bab 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -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() {