diff --git a/ChangeLog b/ChangeLog
index cf606ae8ed..7506a003a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -106,6 +106,8 @@ underscore
- bug #3865 Using like operator on each backslash needs 4 backslash protection
- bug #3860 Displayed git revision info is not set
- bug #3871 Check referential integrity broken across databases
+- bug #3874 [export] No preselected option when exporting table
+- bug #3873 Can't copy table to target database if table exists there
3.5.9.0 (not yet released)
diff --git a/libraries/Table.class.php b/libraries/Table.class.php
index 963f2958fc..a9f2c40ba7 100644
--- a/libraries/Table.class.php
+++ b/libraries/Table.class.php
@@ -840,8 +840,8 @@ class PMA_Table
$sql_structure = PMA_SQP_formatHtml($parsed_sql, 'query_only');
// If table exists, and 'add drop table' is selected: Drop it!
$drop_query = '';
- if (isset($GLOBALS['drop_if_exists'])
- && $GLOBALS['drop_if_exists'] == 'true'
+ if (isset($_REQUEST['drop_if_exists'])
+ && $_REQUEST['drop_if_exists'] == 'true'
) {
if (PMA_Table::isView($target_db, $target_table)) {
$drop_query = 'DROP VIEW';
diff --git a/libraries/display_export.lib.php b/libraries/display_export.lib.php
index ae236dbe15..9e162a05e7 100644
--- a/libraries/display_export.lib.php
+++ b/libraries/display_export.lib.php
@@ -187,7 +187,7 @@ if (strlen($table) && ! isset($num_tables) && ! PMA_Table::isMerge($db, $table))
echo '';
echo '
';
echo '';
diff --git a/libraries/operations.lib.php b/libraries/operations.lib.php
index 7a15495402..382cca1272 100644
--- a/libraries/operations.lib.php
+++ b/libraries/operations.lib.php
@@ -541,11 +541,11 @@ function PMA_handleTheViews($views, $move, $db)
$_error = false;
// temporarily force to add DROP IF EXIST to CREATE VIEW query,
// to remove stand-in VIEW that was created earlier
- // ( $GLOBALS['drop_if_exists'] is used in moveCopy() )
- if (isset($GLOBALS['drop_if_exists'])) {
- $temp_drop_if_exists = $GLOBALS['drop_if_exists'];
+ // ( $_REQUEST['drop_if_exists'] is used in moveCopy() )
+ if (isset($_REQUEST['drop_if_exists'])) {
+ $temp_drop_if_exists = $_REQUEST['drop_if_exists'];
}
- $GLOBALS['drop_if_exists'] = 'true';
+ $_REQUEST['drop_if_exists'] = 'true';
foreach ($views as $view) {
$copying_succeeded = PMA_Table::moveCopy(
@@ -556,10 +556,10 @@ function PMA_handleTheViews($views, $move, $db)
break;
}
}
- unset($GLOBALS['drop_if_exists']);
+ unset($_REQUEST['drop_if_exists']);
if (isset($temp_drop_if_exists)) {
// restore previous value
- $GLOBALS['drop_if_exists'] = $temp_drop_if_exists;
+ $_REQUEST['drop_if_exists'] = $temp_drop_if_exists;
}
return $_error;
}
@@ -625,7 +625,7 @@ function PMA_getHtmlForOrderTheTable($columns)
. 'value="' . htmlspecialchars($fieldname['Field']) . '">'
. htmlspecialchars($fieldname['Field']) . '' . "\n";
}
- $html_output .= ' ' . __('(singly)')
+ $html_output .= ' ' . __('(singly)') . ' '
. '