diff --git a/ChangeLog b/ChangeLog index 67de658ef..95e0e15e2 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-06-24 Marc Delisle + * db_operations.php: problem renaming a db + 2005-06-22 Alexander M. Turek * lang/german-*.inc.php: Updates. diff --git a/db_operations.php b/db_operations.php index 0c7866594..3c3adcf9a 100644 --- a/db_operations.php +++ b/db_operations.php @@ -2,6 +2,7 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +error_reporting(E_ALL); require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); require_once('./libraries/mysql_charsets.lib.php'); @@ -25,7 +26,8 @@ if (isset($db) && if (!isset($newname) || empty($newname)) { $message = $strDatabaseEmpty; } else { - if ($create_database_before_copying) { + if ($move || + (isset($create_database_before_copying) && $create_database_before_copying)) { $local_query = 'CREATE DATABASE ' . PMA_backquote($newname); if (isset($db_collation)) { $local_query .= ' DEFAULT' . PMA_generateCharsetQueryPart($db_collation); @@ -63,6 +65,7 @@ if (isset($db) && $sql_query = $back . $sql_query; } + unset($table); // Duplicate the bookmarks for this db (done once for each db) if ($db != $newname) { @@ -198,6 +201,7 @@ if ($cfgRelation['commwork']) {
'; echo '' . PMA_generate_common_hidden_inputs($db); ?>