BUGFIX Moved SiteTree->ParentID property to Hierarchy extension (fixes #5638)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105668 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-05-25 20:58:14 +00:00 committed by Sam Minnee
parent 93f05f8acb
commit 003d43f3ac
2 changed files with 9 additions and 4 deletions

View File

@ -24,6 +24,15 @@ class Hierarchy extends DataObjectDecorator {
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,

View File

@ -122,10 +122,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
"CanEditType" => "Inherit"
);
static $has_one = array(
"Parent" => "SiteTree"
);
static $versioning = array(
"Stage", "Live"
);