diff --git a/libraries/navigation/NavigationTree.class.php b/libraries/navigation/NavigationTree.class.php index 4cf60b0988..2f33548a57 100644 --- a/libraries/navigation/NavigationTree.class.php +++ b/libraries/navigation/NavigationTree.class.php @@ -242,6 +242,7 @@ class PMA_NavigationTree */ private function _buildPathPart($path, $type2, $pos2, $type3, $pos3) { + $retval = true; if (count($path) > 1) { array_shift($path); // remove 'root' $db = $this->_tree->getChild($path[0]); @@ -478,7 +479,6 @@ class PMA_NavigationTree } $this->groupNode($node); foreach ($node->children as $child) { - $this->groupNode($child); $this->groupTree($child); } } @@ -704,7 +704,10 @@ class PMA_NavigationTree { $retval = ''; $paths = $node->getPaths(); - if ($node->hasSiblings() || isset($_REQUEST['results'])) { + if ($node->hasSiblings() + || isset($_REQUEST['results']) + || $node->realParent() === false + ) { if ( $node->type == Node::CONTAINER && count($node->children) == 0 && $GLOBALS['is_ajax_request'] != true @@ -841,7 +844,7 @@ class PMA_NavigationTree $link = vsprintf($node->links['icon'], $args); $retval .= "{$node->icon}"; } else { - $retval .= "{$node->icon}"; + $retval .= "{$node->icon}"; } $retval .= ""; } diff --git a/libraries/navigation/Nodes/Node.class.php b/libraries/navigation/Nodes/Node.class.php index 40e02f0f02..1c21764268 100644 --- a/libraries/navigation/Nodes/Node.class.php +++ b/libraries/navigation/Nodes/Node.class.php @@ -239,7 +239,11 @@ class Node public function realParent() { $retval = $this->parents(); - return $retval[0]; + if (count($retval) > 0) { + return $retval[0]; + } else { + return false; + } } /**