BUGFIX Using SiteTree::get_by_url() (see r65060)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@65061 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-11-02 00:24:46 +00:00
parent 45c433b8f1
commit e2ca30f78a

View File

@ -181,7 +181,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
$allowedChildren = $obj->allowedChildren();
if($allowedChildren != "none") $def[$class]['allowedChildren'] = $allowedChildren;
$def[$class]['defaultChild'] = $obj->defaultChild();
$def[$class]['defaultParent'] = isset(DataObject::get_by_url($obj->defaultParent())->ID) ? DataObject::get_by_url($obj->defaultParent())->ID : null;
$def[$class]['defaultParent'] = isset(SiteTree::get_by_url($obj->defaultParent())->ID) ? SiteTree::get_by_url($obj->defaultParent())->ID : null;
if(is_array($allowedChildren)) foreach($allowedChildren as $allowedChild) {
$def[$allowedChild]['allowedParents'][] = $class;