diff --git a/ChangeLog b/ChangeLog index fa07c31b9..102d880c1 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2001-07-13 Loïc Chapeaux + * left.php3: no DHTML if there is only one table to display + (feature #440420) + 2001-07-12 Marc Delisle * Documentation.html: added a FAQ entry about upload errors diff --git a/left.php3 b/left.php3 index 8b5408c7f..595e403f9 100755 --- a/left.php3 +++ b/left.php3 @@ -13,6 +13,24 @@ if (!empty($db)) { require('./lib.inc.php3'); +/** + * Get the list and number of available databases. + * Skipped if no server selected: in this case no database should be displayed + * before the user choose among available ones at the welcome screen. + */ +if ($server > 0) { + // Get databases list + if (empty($dblist)) { + $dbs = mysql_list_dbs(); + $num_dbs = mysql_numrows($dbs); + } else { + $num_dbs = count($dblist); + } +} else { + $num_dbs = 0; +} + + /** * Send http headers */ @@ -37,6 +55,12 @@ header('Content-Type: text/html; charset=' . $charset); phpMyAdmin + 1) { + echo "\n"; + ?> 0) +} // end if ($server > 1) + +// Case where only one database has to be displayed +else if ($num_dbs == 1) { + // Get tables list of the database + if (empty($dblist)) { + $db = mysql_dbname($dbs, 0); + } else { + $db = $dblist[0]; + } + $tables = @mysql_list_tables($db); + $num_tables = @mysql_numrows($tables); + $common_url_query = "server=$server&lang=$lang&db=$db"; + + // Displays the database name + echo "\n"; + ?> +
+ + +
+ + +