diff --git a/ChangeLog b/ChangeLog index e5301bc51..93eb9ca5b 100755 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,9 @@ $Source$ Fix import of some CSV files (bug #1373731), provide better error messages. * lang/czech: Update. + * import.php, libraries/display_import.lib.php: Fix import layout (bug + #1370416), prefer recoding of strings over changing MySQL charset as in + this case we can show resulting queries. 2005-12-04 Marc Delisle * lang/catalan update, thanks to Xavier Navarro (xavin). diff --git a/import.php b/import.php index ddf8c6728..979b81e00 100644 --- a/import.php +++ b/import.php @@ -285,8 +285,7 @@ if ($import_file != 'none' && !$error) { } // Convert the file's charset if necessary -if (PMA_MYSQL_INT_VERSION < 40100 - && $cfg['AllowAnywhereRecoding'] && $allow_recoding +if ($cfg['AllowAnywhereRecoding'] && $allow_recoding && isset($charset_of_file) && $charset_of_file != $charset) { $charset_conversion = TRUE; } else if (PMA_MYSQL_INT_VERSION >= 40100 diff --git a/libraries/display_import.lib.php b/libraries/display_import.lib.php index 3f159024b..358652146 100644 --- a/libraries/display_import.lib.php +++ b/libraries/display_import.lib.php @@ -128,19 +128,15 @@ foreach($import_list as $key => $val) {
-
-
+ +
' . "\n"; -echo PMA_displayMaximumUploadSize($max_upload_size); -echo '
' . "\n"; -echo '
' . "\n"; -echo '
' . "\n"; -// some browsers should respect this :) -echo PMA_generateHiddenMaxFileSize($max_upload_size) . "\n"; - if (!empty($cfg['UploadDir'])) { $extensions = ''; foreach($import_list as $key => $val) { @@ -169,7 +165,7 @@ if (!empty($cfg['UploadDir'])) { // charset of file echo '
' . "\n"; -if (PMA_MYSQL_INT_VERSION < 40100 && $cfg['AllowAnywhereRecoding'] && $allow_recoding) { +if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) { echo '' . "\n"; $temp_charset = reset($cfg['AvailableCharsets']); echo $strCharsetOfFile . "\n"