diff --git a/ChangeLog b/ChangeLog index b48374a17..566ab07aa 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2006-01-17 Sebastian Mendel + * libraries/database_interface.lib.php: + fixed bug: undefined index with empty database in db structure view + 2006-01-16 Marc Delisle * server_privileges.php: typo * libraries/check_user_privileges.lib.php: bug #1406499, @@ -63,7 +67,7 @@ $Source$ #1402270). 2006-01-10 Marc Delisle - * libraries/sqlparser.lib.php: bug #1394479, problem detecting ending + * libraries/sqlparser.lib.php: bug #1394479, problem detecting ending semi-colon, generates a SHOW KEYS FROM no table name 2006-01-09 Michal Čihař @@ -81,7 +85,7 @@ $Source$ PmaAbsoluteUri in vhost situations, thanks to Ryan Schmidt 2006-01-06 Marc Delisle - * db_datadict.php, pdf_schema.php: bug #1389165, data dict shows all + * db_datadict.php, pdf_schema.php: bug #1389165, data dict shows all columns as Null Yes * pdf_schema.php: display PDF schema did not work (missing dot) @@ -94,7 +98,7 @@ $Source$ adapted from proposed solution by Matt LaPlante, thanks 2006-01-02 Marc Delisle - * libraries/display_create_table.lib.php: bug #1389868, + * libraries/display_create_table.lib.php: bug #1389868, Safari's rendering of "Create table" fieldset, thanks to Ryan Schmidt 2006-01-01 Michal Čihař @@ -105,19 +109,19 @@ $Source$ * libraries/transformations.lib.php: remove some PHP3 compatibility code 2005-12-31 Marc Delisle - * libraries/common.lib.php: bug #1388167, deleting a row in a table + * libraries/common.lib.php: bug #1388167, deleting a row in a table without a primary key, handle correctly is_js_confirmed 2005-12-30 Marc Delisle * server_databases.php: bug #1388135, IE and dropping databases * librairies/mult_submits.inc.php: strong warning for DROP DATABASE - * tbl_printview.php: bug #1389165, Print view shows all columns as Null Yes + * tbl_printview.php: bug #1389165, Print view shows all columns as Null Yes (MySQL 5.x) * libraries/Config.class.php: patch #1392181, typo, thanks to Luis Mirabal - normannormal 2005-12-27 Marc Delisle - * main.php, libraries/check_user_privileges.lib.php: + * main.php, libraries/check_user_privileges.lib.php: - reenable a non-privileged user to change his password - display the Reload MySQL link only if user has proper rights * Documentation.html: bug #1389582, unclosed code tag, @@ -130,7 +134,7 @@ $Source$ 2005-12-22 Marc Delisle * tbl_change.php, libraries/common.lib.php: bug #1381856, Cannot edit a table having 40 columns - * libraries/common.lib.php: bug #1388116, cannot pass TRUE by reference + * libraries/common.lib.php: bug #1388116, cannot pass TRUE by reference to PMA_setCookie, thanks to Isaac Bennetch * libraries/tbl_replace_fields.inc.php: recent fix introduced a bug: cannot change a value for a nullable field diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php index 89985094d..5fb226c6f 100644 --- a/libraries/database_interface.lib.php +++ b/libraries/database_interface.lib.php @@ -242,7 +242,9 @@ function PMA_DBI_get_tables_full($database, $table = false, } else { $databases = array_map('addslashes', $database); } - + + $tables = array(); + if ( PMA_MYSQL_INT_VERSION >= 50002 ) { // get table information from information_schema if ( $table ) { @@ -308,7 +310,7 @@ function PMA_DBI_get_tables_full($database, $table = false, unset( $each_tables[$table_name] ); continue; } - + if ( ! isset( $each_tables[$table_name]['Type'] ) && isset( $each_tables[$table_name]['Engine'] ) ) { // pma BC, same parts of PMA still uses 'Type' @@ -320,7 +322,7 @@ function PMA_DBI_get_tables_full($database, $table = false, $each_tables[$table_name]['Engine'] =& $each_tables[$table_name]['Type']; } - + // MySQL forward compatibility // so pma could use this array as if every server is of version >5.0 $each_tables[$table_name]['TABLE_SCHEMA'] = $each_database; @@ -342,7 +344,7 @@ function PMA_DBI_get_tables_full($database, $table = false, $each_tables[$table_name]['CHECKSUM'] =& $each_tables[$table_name]['Checksum']; $each_tables[$table_name]['CREATE_OPTIONS'] =& $each_tables[$table_name]['Create_options']; $each_tables[$table_name]['TABLE_COMMENT'] =& $each_tables[$table_name]['Comment']; - + if ( strtoupper( $each_tables[$table_name]['Comment'] ) === 'VIEW' ) { $each_tables[$table_name]['TABLE_TYPE'] = 'VIEW'; } else { @@ -351,7 +353,7 @@ function PMA_DBI_get_tables_full($database, $table = false, $each_tables[$table_name]['TABLE_TYPE'] = 'BASE TABLE'; } } - + $tables[$each_database] = $each_tables; } } @@ -362,7 +364,7 @@ function PMA_DBI_get_tables_full($database, $table = false, } } - if ( ! is_array($database) ) { + if ( ! is_array($database) && isset($tables[$database]) ) { return $tables[$database]; } else { return $tables;