From 179641d9727ad3370f69caceed431f3381018fdc Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 25 May 2010 03:43:28 +0000 Subject: [PATCH] MINOR correct order of OBW (from r100323) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105551 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/SiteTree.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index 2b4c3ba5299..a3bf6653d44 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -1337,6 +1337,8 @@ function requireDefaultRecords() { //------------------------------------------------------------------------------------// protected function onBeforeWrite() { + parent::onBeforeWrite(); + // If Sort hasn't been set, make this page come after it's siblings if(!$this->Sort && $this->ParentID) { $this->Sort = DB::query("SELECT MAX(\"Sort\") + 1 FROM \"SiteTree\" WHERE \"ParentID\" = $this->ParentID")->value(); @@ -1369,8 +1371,6 @@ protected function onBeforeWrite() { DataObject::set_context_obj(null); $this->syncLinkTracking(); - - parent::onBeforeWrite(); } function syncLinkTracking() {