diff --git a/core/model/Hierarchy.php b/core/model/Hierarchy.php index 3a858b7e9..8ddc13ea0 100755 --- a/core/model/Hierarchy.php +++ b/core/model/Hierarchy.php @@ -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, diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index bed72a77b..dbec7907b 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -123,10 +123,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid "CanEditType" => "Inherit" ); - static $has_one = array( - "Parent" => "SiteTree" - ); - static $versioning = array( "Stage", "Live" );