From 9579ee8223bd4f1100d37cb60c105d74e25a1f60 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 6 Aug 2005 13:41:07 +0000 Subject: [PATCH] fixes to the subtree grouping in databases select menu --- ChangeLog | 5 +++++ queryframe.php | 31 +++++++++++++++++++------------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2b28219410..00b998b7fd 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-08-06 Marc Delisle + * queryframe.php: fixes for tree subgroups in databases selector: + escaping of special characters, display a db name inside its own + group, and proper closing of optgroup, thanks to Ryan Schmidt + 2005-08-05 Marc Delisle * Documentation.html, readme.php, license.php: bug #965548, displaying README and LICENSE, thanks to Ryan Schmidt diff --git a/queryframe.php b/queryframe.php index a46fc03bfe..334559f5f1 100644 --- a/queryframe.php +++ b/queryframe.php @@ -361,25 +361,25 @@ if ($num_dbs > 1) { } // end if... else... if ($cfg['LeftFrameDBTree']) { - $parts = explode($cfg['LeftFrameDBSeparator'],$db,2); - if (count($parts) == 1) { - if (!empty($parent)) { - echo ' ' - . ''."\n"; - $parent = ''; - } + if ($i == 0) { + $parts = explode($cfg['LeftFrameDBSeparator'],$db,2); } else { + $parts = $next_parts; + } + if ($i == $num_dbs - 1) { + $next_parts = array(); + } else { + $next_parts = explode($cfg['LeftFrameDBSeparator'],$dblist[$i+1],2); + } + if (count($parts) > 1 || (count($next_parts) > 1 && $parts[0] == $next_parts[0])) { if ($parent != $parts[0]) { - if (!empty($parent)) { - echo ' ' - . ''."\n"; - } echo ' ' - . ''."\n"; + . ''."\n"; $parent = $parts[0]; } } } + if (!empty($num_tables)) { echo ' ' . '' . "\n"; } // end if... else... + if ($cfg['LeftFrameDBTree']) { + if (!empty($parent) && (count($next_parts) == 0 || $parent != $next_parts[0])) { + echo ' ' + . ''."\n"; + $parent = ''; + } + } } // end for $i (db list) ?> -- 2.11.4.GIT