bug #1859460, prevent an empty target_db field to produce a failure, thanks to windkiel
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
@@ -190,7 +190,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 {
|
||||
?>
|
||||
@@ -353,7 +353,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