bug #1859460, prevent an empty target_db field to produce a failure, thanks to windkiel
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
@@ -211,7 +211,7 @@ unset($columns);
|
||||
<legend><?php echo $strMoveTable; ?></legend>
|
||||
<?php if ($GLOBALS['PMA_List_Database']->count() > $GLOBALS['cfg']['MaxDbList']) {
|
||||
?>
|
||||
<input type="text" maxlength="100" size="30" name="target_db" />
|
||||
<input type="text" maxlength="100" size="30" name="target_db" value="<?php echo htmlspecialchars($GLOBALS['db']); ?>"/>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
@@ -370,7 +370,7 @@ if (isset($auto_increment) && strlen($auto_increment) > 0
|
||||
<legend><?php echo $strCopyTable; ?></legend>
|
||||
<?php if ($GLOBALS['PMA_List_Database']->count() > $GLOBALS['cfg']['MaxDbList']) {
|
||||
?>
|
||||
<input type="text" maxlength="100" size="30" name="target_db" />
|
||||
<input type="text" maxlength="100" size="30" name="target_db" value="<?php echo htmlspecialchars($GLOBALS['db']); ?>"/>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
|
Reference in New Issue
Block a user