Skip to content

Commit

Permalink
MINOR correct order of OBW (from r100323)
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105551 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
chillu committed May 25, 2010
1 parent ba4ad49 commit 179641d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/model/SiteTree.php
Expand Up @@ -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();
Expand Down Expand Up @@ -1369,8 +1371,6 @@ protected function onBeforeWrite() {
DataObject::set_context_obj(null);

$this->syncLinkTracking();

parent::onBeforeWrite();
}

function syncLinkTracking() {
Expand Down

0 comments on commit 179641d

Please sign in to comment.