diff --git a/js/display_import_no_plugin.js b/js/display_import_no_plugin.js index 721e419ec7..8eea290179 100644 --- a/js/display_import_no_plugin.js +++ b/js/display_import_no_plugin.js @@ -22,7 +22,7 @@ var perform_upload = function () { complete = response.complete; if (total==0 && complete==0 && percent==0) { - $('#upload_form_status_info').html('ajax clock ' + promot_str); + $('#upload_form_status_info').html('ajax clock ' + promot_str); $('#upload_form_status').css("display", "none"); } else { var now = new Date(); @@ -91,9 +91,7 @@ var perform_upload = function () { .html('ajax clock ' + processed_str) .show(); $('#import_form_status').load('import_status.php?message=true&' + import_url); // loads the message, either success or mysql error - - // reload the left sidebar when the import is finished - + } // if finished else { setTimeout(perform_upload, 1000); diff --git a/libraries/display_import.lib.php b/libraries/display_import.lib.php index 0d75454a64..ea7f9d22a9 100644 --- a/libraries/display_import.lib.php +++ b/libraries/display_import.lib.php @@ -60,7 +60,7 @@ if ($_SESSION[$SESSION_KEY]["handler"] != "UploadNoplugin") { $html .= " var processed_str ='" . PMA_jsFormat(__('The file is being processed, please be patient.'), false) + "';"; $html .= " var import_url ='" . PMA_generate_common_url(array('import_status'=>1), '&') + "';"; - $html .= " $.include('display_import_no_plugin.js'); "; + $html .= " $.include('../js/display_import_no_plugin.js'); "; } else { // no plugin available $image_tag = 'ajax clock ' . PMA_jsFormat(__('Please be patient, the file is being uploaded. Details about the upload are not available.'), false) . PMA_Util::showDocu('faq', 'faq2-9'); @@ -100,9 +100,11 @@ $html .= PMA_Util::getImage('b_import.png', __('Import')); if ($import_type == 'server') { $html .= __('Importing into the current server'); } elseif ($import_type == 'database') { - printf(__('Importing into the database "%s"'), htmlspecialchars($db)); + $import_str = sprintf(__('Importing into the database "%s"'), htmlspecialchars($db)); + $html .= $import_str; } else { - printf(__('Importing into the table "%s"'), htmlspecialchars($table)); + $import_str = printf(__('Importing into the table "%s"'), htmlspecialchars($table)); + $html .= $import_str; } $html .= ' '; $html .= ' '; @@ -125,7 +127,8 @@ if ($cfg['ZipDump'] && @function_exists('zip_open')) { // We don't have show anything about compression, when no supported if ($compressions != array()) { $html .= '
'; - printf(__('File may be compressed (%s) or uncompressed.'), implode(", ", $compressions)); + $compress_str = sprintf(__('File may be compressed (%s) or uncompressed.'), implode(", ", $compressions)); + $html .= $compress_str; $html .= '
'; $html .= __('A compressed file\'s name must end in .[format].[compression]. Example: .sql.zip'); $html .= '
'; @@ -153,7 +156,7 @@ if ($GLOBALS['is_upload'] && !empty($cfg['UploadDir'])) { $uid = uniqid(''); $html .= PMA_Util::getBrowseUploadFileBlock($max_upload_size); } elseif (!$GLOBALS['is_upload']) { - PMA_Message::notice(__('File uploads are not allowed on this server.'))->display(); + $html .= PMA_Message::notice(__('File uploads are not allowed on this server.'))->getDisplay(); } elseif (!empty($cfg['UploadDir'])) { $html .= PMA_Util::getSelectUploadFileBlock($import_list, $cfg['UploadDir']); } // end if (web-server upload directory) @@ -181,10 +184,10 @@ if ($GLOBALS['PMA_recoding_engine'] != PMA_CHARSET_NONE) { $html .= PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', 'charset_of_file', 'utf8', false); } // end if (recoding) - $html .= ' '; - $html .= ' '; - $html .= '
'; - $html .= '

' . __('Partial Import:') . '

'; +$html .= '
'; +$html .= ' '; +$html .= '
'; +$html .= '

' . __('Partial Import:') . '

'; if (isset($timeout_passed) && $timeout_passed) { $html .= '
' . "\n"; @@ -193,15 +196,14 @@ if (isset($timeout_passed) && $timeout_passed) { $html .= '
' . "\n"; } - $html .= '
'; - $html .= ' '; - $html .= '
'; - $html .= '
'; +$html .= '
'; +$html .= ' '; +$html .= '
'; +$html .= '
'; if (! (isset($timeout_passed) && $timeout_passed)) { - $html .= '
'; $html .= ' '; $html .= ' '; @@ -212,7 +214,6 @@ if (! (isset($timeout_passed) && $timeout_passed)) { // do not show the Skip dialog to avoid the risk of someone // entering a value here that would interfere with "skip" $html .= ' '; - } $html .= '
';