Commit 44a6e81e authored by Franco Fichtner's avatar Franco Fichtner

src: style sweep (mea culpa)

parent a8b49250
...@@ -122,17 +122,17 @@ class MenuSystem ...@@ -122,17 +122,17 @@ class MenuSystem
*/ */
public function getBreadcrumbs() public function getBreadcrumbs()
{ {
$nodes = $this->root->getChildren(); $nodes = $this->root->getChildren();
$breadcrumbs = array(); $breadcrumbs = array();
while ($nodes != null) { while ($nodes != null) {
$next = null; $next = null;
foreach ($nodes as $node) { foreach ($nodes as $node) {
if ($node->Selected) { if ($node->Selected) {
$breadcrumbs[] = array('name' => $node->VisibleName); $breadcrumbs[] = array('name' => $node->VisibleName);
/* only go as far as the first reachable URL */ /* only go as far as the first reachable URL */
$next = empty($node->Url) ? $node->Children : null; $next = empty($node->Url) ? $node->Children : null;
break; break;
} }
} }
$nodes = $next; $nodes = $next;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment