mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Fixed calls to undefined function in Hierarchy. Should have been calling a property of the same name instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71838 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
0ca4177e3b
commit
0f1cf8899a
@ -323,7 +323,7 @@ class Hierarchy extends DataObjectDecorator {
|
||||
* @var array $idList Array to put results in.
|
||||
*/
|
||||
public function loadDescendantIDListInto(&$idList) {
|
||||
if($children = $this->_cache_allChildren()) {
|
||||
if($children = $this->_cache_allChildren) {
|
||||
foreach($children as $child) {
|
||||
if(in_array($child->ID, $idList)) {
|
||||
continue;
|
||||
@ -564,7 +564,7 @@ class Hierarchy extends DataObjectDecorator {
|
||||
// child as the root of the search. This will stop the recursive call from searching backwards.
|
||||
// If afterNode is given, then only search for the nodes after
|
||||
if(!$afterNode || $afterNode->ParentID != $this->owner->ID) {
|
||||
$children = $this->_cache_allChildren();
|
||||
$children = $this->_cache_allChildren;
|
||||
} else {
|
||||
$children = DataObject::get(ClassInfo::baseDataClass($this->owner->class), "\"$baseClass\".\"ParentID\"={$this->owner->ID}" . ( ( $afterNode ) ? " AND \"Sort\" > " . sprintf( '%d', $afterNode->Sort ) : "" ), '"Sort" ASC');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user