Customize whether move object lists are lmited to (grand)parents

This commit is contained in:
Alexander Nicolaysen Sørnes
2009-04-29 21:23:01 +02:00
committed by Alexander Nicolaysen Sørnes
parent 968569b3fa
commit fc9bcb4927
3 changed files with 24 additions and 3 deletions

View File

@@ -923,9 +923,18 @@ class ObjectManager
"color4");
$oParent = $oObject->objectGetParent();
$oGrandFather = $oParent->objectGetParent();
if($oGrandFather)
if(method_exists($oParent, 'objectGetParent'))
{
$oGrandFather = $oParent->objectGetParent();
$oParentOM = new objectManager(get_class($oParent), '', $oParent->objectGetId());
} else
{
$oGrandFather = null;
$oParentOM = null;
}
if($oGrandFather && $oParentOM->GetOptionalSetting('objectRestrictMoveObjectListsToParents', false))
{
$aParentSiblings = $oGrandFather->objectGetChildrenClassSpecific(get_class($oParent));
@@ -997,7 +1006,7 @@ class ObjectManager
"Move here"),
"color4");
if(method_exists($oObject, 'objectGetParent'))
if($this->GetOptionalSetting('objectRestrictMoveObjectListsToParents', false))
{
$oParent = $oObject->objectGetParent();