From 1afc95134e866a9cd1bd6b1430f786f5f3d787c8 Mon Sep 17 00:00:00 2001 From: Hugues Peccatte Date: Mon, 21 Apr 2014 16:03:35 +0200 Subject: [PATCH] Bug fix: #4375 Group two DB, one's name is the prefix of the other one. Signed-off-by: Hugues Peccatte --- ChangeLog | 13 +++++++------ libraries/navigation/NavigationTree.class.php | 6 ++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index ebf2f34c40..0b3349fcbf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ phpMyAdmin - ChangeLog 4.1.14.0 (not yet released) - bug #4365 Creating bookmark with multiple queries not working +- bug #4375 Group two DB, one's name is the prefix of the other one 4.1.13.0 (2014-04-13) - bug #4279 CTRL + up or down moves 2 fields @@ -13,9 +14,9 @@ phpMyAdmin - ChangeLog - bug #4353 makeProfilingChart is not defined - bug #4355 Precision specifier for DOUBLE type is truncated - bug #4346 Incorrect "Export incomplete" message -- bug #4359 Notices on create table page +- bug #4359 Notices on create table page - bug #4356 GROUPed selects show number of rows as if not grouped -- bug #4357 JS Form submitted on "enter" even if focus is inside a select field +- bug #4357 JS Form submitted on "enter" even if focus is inside a select field 4.1.12.0 (2014-03-27) - bug #4334 Add event : datepicker won't open @@ -24,7 +25,7 @@ phpMyAdmin - ChangeLog - bug #4326 Cannot find the import plugins which start with uppercase 'I' 4.1.11.0 (2014-03-23) -- bug #4335 reCaptcha problem (4.1.10 regression) +- bug #4335 reCaptcha problem (4.1.10 regression) 4.1.10.0 (2014-03-22) - bug #4301 Grid edit: "SELECT" query is replaced by "UPDATE" query after edit @@ -32,11 +33,11 @@ phpMyAdmin - ChangeLog - bug #4324 Datepicker not showing up on insert page - bug #3991 Problem selecting item in select boxes with the ENTER keystroke in some browsers - bug #4323 QueryWindow ignores CodeMirror -- bug None of the live charts shown on "Status -> Monitor" (Chrome) +- bug None of the live charts shown on "Status -> Monitor" (Chrome) 4.1.9.0 (2014-03-06) - bug #4279 CTRL + up or down moves two fields (part one) -- bug #4294 output as text radio clickable for "OpenDocument Text" export +- bug #4294 output as text radio clickable for "OpenDocument Text" export - bug #4297 DROP DATABASE tick box in export no longer works - bug #4291 Unable to export comments in OpenDocument text format - bug #4299 Deletion even when the user says "No" to the confirmation message @@ -62,7 +63,7 @@ phpMyAdmin - ChangeLog - Fixed altering table to DOUBLE/FLOAT field - bug #4292 Success message and failure message being shown together - bug #4293 opening new tab (using selflink) for import.php based actions - results in error and logout + results in error and logout 4.1.7.0 (2014-02-09) - bug #4245 initial Browse query does not match sorting order diff --git a/libraries/navigation/NavigationTree.class.php b/libraries/navigation/NavigationTree.class.php index 2d8e0ae996..7937c8c99a 100644 --- a/libraries/navigation/NavigationTree.class.php +++ b/libraries/navigation/NavigationTree.class.php @@ -557,6 +557,12 @@ class PMA_NavigationTree } } } + //Bug #4375: 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) {