Skip to content

Commit

Permalink
BUGFIX Moved SiteTree?->ParentID property to Hierarchy extension (fixes
Browse files Browse the repository at this point in the history
#5638) (from r105668)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105786 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
chillu committed May 27, 2010
1 parent 06f1848 commit 53b02f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 9 additions & 0 deletions core/model/Hierarchy.php
Expand Up @@ -24,6 +24,15 @@ function augmentDatabase() {

function augmentWrite(&$manipulation) {
}

function extraStatics($class = null) {
return array(
'has_one' => array(
// TODO this method is called *both* statically and on an instance
"Parent" => ($class) ? $class : $this->owner->class
)
);
}

/**
* Returns the children of this DataObject as an XHTML UL. This will be called recursively on each child,
Expand Down
4 changes: 0 additions & 4 deletions core/model/SiteTree.php
Expand Up @@ -123,10 +123,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
"CanEditType" => "Inherit"
);

static $has_one = array(
"Parent" => "SiteTree"
);

static $versioning = array(
"Stage", "Live"
);
Expand Down

0 comments on commit 53b02f6

Please sign in to comment.