diff --git a/ChangeLog b/ChangeLog index f7866bb2c..b2cfe3363 100755 --- a/ChangeLog +++ b/ChangeLog @@ -40,6 +40,7 @@ $Source$ * libraries/dbi/mysqli.dbi.lib.php: workaround for http://bugs.php.net/36007 * libraries/database_interface.lib.php PMA_DBI_get_tables_full(), left.php: added workaround for bug #1436171 Cannot display Capitalised Databases + * js/querywindow.js: fixed 'mad' db slector 2006-02-21 Michal Čihař * scripts/setup.php: diff --git a/js/querywindow.js b/js/querywindow.js index 2aa510b0e..b46d8514a 100644 --- a/js/querywindow.js +++ b/js/querywindow.js @@ -11,14 +11,16 @@ function setDb( new_db ) { // db has changed //alert( new_db + '(' + new_db.length + ') : ' + db ); - if ( window.frames[0].document.getElementById(new_db) == null ) { + var old_db = db; + db = new_db; + + if ( window.frames[0].document.getElementById(db) == null ) { // db is unknown, reload complete left frame refreshLeft(); } else { - unmarkDbTable(db); - markDbTable(new_db); + unmarkDbTable(old_db); + markDbTable(db); } - db = new_db; // TODO: add code to expand db in lightview mode