From 823687a4375371c1d00ab03331ecc75748ed6555 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 359051079..7885b7593 100644 --- a/tbl_move_copy.php +++ b/tbl_move_copy.php @@ -28,6 +28,14 @@ PMA_DBI_select_db($db); $goto = $cfg['DefaultTabTable']; +/** + * $_REQUEST['target_db'] could be empty in case we came from an input field + * (when there are many databases, no drop-down) + */ +if (empty($_REQUEST['target_db'])) { + $_REQUEST['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 d3b30d9be..4db1075fc 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -211,7 +211,7 @@ unset($columns); count() > $GLOBALS['cfg']['MaxDbList']) { ?> - + @@ -370,7 +370,7 @@ if (isset($auto_increment) && strlen($auto_increment) > 0 count() > $GLOBALS['cfg']['MaxDbList']) { ?> - +