diff options
author | Christian Foellmann <foellmann@foe-services.de> | 2014-12-23 14:48:13 +0300 |
---|---|---|
committer | Christian Foellmann <foellmann@foe-services.de> | 2014-12-23 14:48:13 +0300 |
commit | 2bfb20e57418ebf396149782be9f98e868fe8608 (patch) | |
tree | a5ec4011410970603d3f462a535a5a359057fa77 /libraries/display_import.lib.php | |
parent | 20f1bf77c8281efc675a14e0f6bf52f657dabd9a (diff) |
UPDATE 4.3.34.3.3
Diffstat (limited to 'libraries/display_import.lib.php')
-rw-r--r-- | libraries/display_import.lib.php | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/libraries/display_import.lib.php b/libraries/display_import.lib.php index 8cad22f659..f804c6e2e2 100644 --- a/libraries/display_import.lib.php +++ b/libraries/display_import.lib.php @@ -98,7 +98,7 @@ function PMA_getHtmlForImportJS($upload_id) * * @return string */ -function PMA_getHtmlForExportOptions($import_type, $db, $table) +function PMA_getHtmlForImportOptions($import_type, $db, $table) { $html = ' <div class="exportoptions" id="header">'; $html .= ' <h2>'; @@ -229,6 +229,7 @@ function PMA_getHtmlForImportOptionsFile($max_upload_size, $import_list) $html .= ' <input type="radio" name="file_location" ' . 'id="radio_import_file" required="required" />'; $html .= PMA_Util::getBrowseUploadFileBlock($max_upload_size); + $html .= '<br />' . __('You may also drag and drop a file on any page.'); $html .= ' </li>'; $html .= ' <li>'; $html .= ' <input type="radio" name="file_location" ' @@ -239,6 +240,7 @@ function PMA_getHtmlForImportOptionsFile($max_upload_size, $import_list) } elseif ($GLOBALS['is_upload']) { $html .= PMA_Util::getBrowseUploadFileBlock($max_upload_size); + $html .= '<br />' . __('You may also drag and drop a file on any page.'); } elseif (!$GLOBALS['is_upload']) { $html .= PMA_Message::notice( __('File uploads are not allowed on this server.') @@ -413,7 +415,7 @@ function PMA_getHtmlForImport( $html .= PMA_getHtmlForHiddenInputs($import_type, $db, $table); - $html .= PMA_getHtmlForExportOptions($import_type, $db, $table); + $html .= PMA_getHtmlForImportOptions($import_type, $db, $table); $html .= PMA_getHtmlForImportOptionsFile($max_upload_size, $import_list); @@ -438,9 +440,9 @@ function PMA_getHtmlForImport( */ function PMA_getHtmlForImportWithPlugin($upload_id) { - //some variable for javasript + //some variable for javascript $ajax_url = "import_status.php?id=" . $upload_id . "&" - . PMA_URL_getCommon(array('import_status'=>1), '&'); + . PMA_URL_getCommon(array('import_status'=>1), 'text'); $promot_str = PMA_jsFormat( __( 'The file being uploaded is probably larger than ' @@ -458,7 +460,7 @@ function PMA_getHtmlForImportWithPlugin($upload_id) __('The file is being processed, please be patient.'), false ); - $import_url = PMA_URL_getCommon(array('import_status'=>1), '&'); + $import_url = PMA_URL_getCommon(array('import_status'=>1), 'text'); //start output $html = 'var finished = false; '; @@ -488,12 +490,21 @@ function PMA_getHtmlForImportWithPlugin($upload_id) $html .= ' } else { '; $html .= ' var now = new Date(); '; $html .= ' now = Date.UTC( '; - $html .= ' now.getFullYear(), now.getMonth(), now.getDate(), '; - $html .= ' now.getHours(), now.getMinutes(), now.getSeconds()) '; + $html .= ' now.getFullYear(), '; + $html .= ' now.getMonth(), '; + $html .= ' now.getDate(), '; + $html .= ' now.getHours(), '; + $html .= ' now.getMinutes(), '; + $html .= ' now.getSeconds()) '; $html .= ' + now.getMilliseconds() - 1000; '; - $html .= ' var statustext = $.sprintf("' . $statustext_str . '", '; - $html .= ' formatBytes(complete, 1, PMA_messages.strDecimalSeparator), '; - $html .= ' formatBytes(total, 1, PMA_messages.strDecimalSeparator) '; + $html .= ' var statustext = PMA_sprintf('; + $html .= ' "' . $statustext_str . '", '; + $html .= ' formatBytes( '; + $html .= ' complete, 1, PMA_messages.strDecimalSeparator'; + $html .= ' ), '; + $html .= ' formatBytes('; + $html .= ' total, 1, PMA_messages.strDecimalSeparator'; + $html .= ' ) '; $html .= ' ); '; $html .= ' if ($("#importmain").is(":visible")) { '; @@ -515,7 +526,7 @@ function PMA_getHtmlForImportWithPlugin($upload_id) $html .= ' var used_time = now - import_start; '; $html .= ' var seconds = ' . 'parseInt(((total - complete) / complete) * used_time / 1000); '; - $html .= ' var speed = $.sprintf("' . $second_str . '"'; + $html .= ' var speed = PMA_sprintf("' . $second_str . '"'; $html .= ' , formatBytes(complete / used_time * 1000, 1,' . ' PMA_messages.strDecimalSeparator)); '; @@ -524,7 +535,8 @@ function PMA_getHtmlForImportWithPlugin($upload_id) $html .= ' var estimated_time; '; $html .= ' if (minutes > 0) { '; $html .= ' estimated_time = "' . $remaining_min . '"'; - $html .= ' .replace("%MIN", minutes).replace("%SEC", seconds); '; + $html .= ' .replace("%MIN", minutes)'; + $html .= ' .replace("%SEC", seconds); '; $html .= ' } '; $html .= ' else { '; $html .= ' estimated_time = "' . $remaining_second . '"'; @@ -541,10 +553,12 @@ function PMA_getHtmlForImportWithPlugin($upload_id) // show percent in window title $html .= ' if (original_title !== false) { '; - $html .= ' parent.document.title = percent_str + " - " + original_title; '; + $html .= ' parent.document.title '; + $html .= ' = percent_str + " - " + original_title; '; $html .= ' } '; $html .= ' else { '; - $html .= ' document.title = percent_str + " - " + original_title; '; + $html .= ' document.title '; + $html .= ' = percent_str + " - " + original_title; '; $html .= ' } '; $html .= ' $("#statustext").html(statustext); '; $html .= ' } '; |