From cd3ad518a780a41fe76c384aa527257049c5cd62 Mon Sep 17 00:00:00 2001 From: Hugues Peccatte Date: Sun, 20 Apr 2014 16:30:30 +0200 Subject: [PATCH] Group two databases, when one's name is the prefix of the second one. Signed-off-by: Hugues Peccatte --- libraries/navigation/NavigationTree.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/navigation/NavigationTree.class.php b/libraries/navigation/NavigationTree.class.php index c8ed4228fb..e6c77abc33 100644 --- a/libraries/navigation/NavigationTree.class.php +++ b/libraries/navigation/NavigationTree.class.php @@ -572,6 +572,12 @@ class PMA_NavigationTree } } } + //Check if prefix is the name of a DB, to create a group. + foreach ($node->children as $child) { + if (array_key_exists($child->name, $prefixes)) { + $prefixes[$child->name]++; + } + } } foreach ($prefixes as $key => $value) { if ($value == 1) {