From b4a620a7141eff9018a04ea6643e28e37dd78821 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 30 Dec 2007 20:59:57 +0000 Subject: [PATCH] bug #1859460, prevent an empty target_db field to produce a failure, thanks to windkiel --- tbl_move_copy.php | 8 ++++++++ tbl_operations.php | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tbl_move_copy.php b/tbl_move_copy.php index 02f44c482..b8404646c 100644 --- a/tbl_move_copy.php +++ b/tbl_move_copy.php @@ -26,6 +26,14 @@ $err_url = 'tbl_sql.php?' . PMA_generate_common_url($db, $table); */ PMA_DBI_select_db($db); +/** + * $target_db could be empty in case we came from an input field + * (when there are many databases, no drop-down) + */ +if (empty($target_db)) { + $target_db = $db; +} + /** * A target table name has been sent to this script -> do the work */ diff --git a/tbl_operations.php b/tbl_operations.php index e73a30b54..4dab6a1a4 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -190,7 +190,7 @@ unset($columns); count() > $GLOBALS['cfg']['MaxDbList']) { ?> - + @@ -353,7 +353,7 @@ if (isset($auto_increment) && strlen($auto_increment) > 0 count() > $GLOBALS['cfg']['MaxDbList']) { ?> - +