From f075f90574e4aed69f6f328f8c06dfb0b6a7011d Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 7 Aug 2005 12:59:49 +0000 Subject: [PATCH] need at least 2 items for optgroup in database selector --- ChangeLog | 2 ++ queryframe.php | 10 ++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index bcdb4bfb6..07a9dc32e 100755 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,8 @@ $Source$ thanks to Ryan Schmidt * server_privileges.php: undefined index $GLOBALS[''], thanks to Ryan Schmidt + * queryframe.php: need at least 2 items to display a group in the + database selector, thanks to Ryan Schmidt 2005-08-06 Marc Delisle * queryframe.php: fixes for tree subgroups in databases selector: diff --git a/queryframe.php b/queryframe.php index 334559f5f..13f64b720 100644 --- a/queryframe.php +++ b/queryframe.php @@ -371,12 +371,10 @@ if ($num_dbs > 1) { } 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]) { - echo ' ' - . ''."\n"; - $parent = $parts[0]; - } + if (count($next_parts) > 1 && $parts[0] == $next_parts[0] && $parent != $parts[0]) { + echo ' ' + . ''."\n"; + $parent = $parts[0]; } }