Limited nodes that have more children than allowed limit are no longer accessible to the user.

This commit is contained in:
Mojmir Fendek 2017-07-05 10:13:48 +12:00
parent 102eaed36c
commit 3f2d217a45

View File

@ -407,13 +407,14 @@ class MarkedSet
// Build root rode
$expanded = $this->isExpanded($node);
$opened = $this->isTreeOpened($node);
$count = ($limited && $numChildren > $this->getMaxChildNodes()) ? 0 : $numChildren;
$output = [
'node' => $node,
'marked' => $this->isMarked($node),
'expanded' => $expanded,
'opened' => $opened,
'depth' => $depth,
'count' => $numChildren, // Count of DB children
'count' => $count, // Count of DB children
'limited' => $limited, // Flag whether 'items' has been limited
'children' => [], // Children to return in this request
];