diff --git a/libraries/display_export.lib.php b/libraries/display_export.lib.php index 9e162a05e7..eb346c9015 100644 --- a/libraries/display_export.lib.php +++ b/libraries/display_export.lib.php @@ -29,7 +29,7 @@ require_once './libraries/plugin_interface.lib.php'; function PMA_exportCheckboxCheck($str) { if (isset($GLOBALS['cfg']['Export'][$str]) && $GLOBALS['cfg']['Export'][$str]) { - echo ' checked="checked"'; + return ' checked="checked"'; } } @@ -51,24 +51,28 @@ if (empty($export_list)) { exit; } -echo '
'; +$html = ""; +$html .= ''; if ($export_type == 'server') { - echo PMA_generate_common_hidden_inputs('', '', 1); + $html .= PMA_generate_common_hidden_inputs('', '', 1); } elseif ($export_type == 'database') { - echo PMA_generate_common_hidden_inputs($db, '', 1); + $html .= PMA_generate_common_hidden_inputs($db, '', 1); } else { - echo PMA_generate_common_hidden_inputs($db, $table, 1); + $html .= PMA_generate_common_hidden_inputs($db, $table, 1); } // just to keep this value for possible next display of this form after saving // on server if (isset($single_table)) { - echo '' . "\n"; + $html .= '' + . "\n"; } -echo ''; -echo "\n"; +$html .= ''; +$html .= "\n"; // If the export method was not set, the default is quick if (isset($_GET['export_method'])) { @@ -77,30 +81,30 @@ if (isset($_GET['export_method'])) { $cfg['Export']['method'] = 'quick'; } // The export method (quick, custom or custom-no-form) -echo ''; if (isset($_GET['sql_query'])) { - echo '' . "\n"; } elseif (! empty($sql_query)) { - echo '' . "\n"; } -echo ''; if (isset($_GET['quick_or_custom'])) { $export_method = $_GET['quick_or_custom']; @@ -108,162 +112,163 @@ if (isset($_GET['quick_or_custom'])) { $export_method = $cfg['Export']['method']; } -echo '
'; -echo '

' . __('Export Method:') . '

'; -echo '
'; +$html .= ''; +$html .= ''; -echo '
'; +$html .= '
'; if ($export_type == 'server') { - echo '

' . __('Database(s):') . '

'; + $html .= '

' . __('Database(s):') . '

'; } else if ($export_type == 'database') { - echo '

' . __('Table(s):') . '

'; + $html .= '

' . __('Table(s):') . '

'; } if (! empty($multi_values)) { - echo $multi_values; + $html .= $multi_values; } -echo '
'; +$html .= '
'; if (strlen($table) && ! isset($num_tables) && ! PMA_Table::isMerge($db, $table)) { - echo '
'; - echo '

' . __('Rows:') . '

'; - echo '
'; + $html .= '/>'; + $html .= ' '; + $html .= ''; + $html .= ''; + $html .= ''; } if (isset($cfg['SaveDir']) && !empty($cfg['SaveDir'])) { - echo '
'; - echo '

' . __('Output:') . '

'; - echo '
'; +$html .= ''; +$html .= ''; -echo '
'; -echo '

' . __('Format:') . '

'; -echo PMA_pluginGetChoice('Export', 'what', $export_list, 'format'); -echo '
'; +$html .= '
'; +$html .= '

' . __('Format:') . '

'; +$html .= PMA_pluginGetChoice('Export', 'what', $export_list, 'format'); +$html .= '
'; -echo '
'; -echo '

' . __('Format-specific options:') . '

'; -echo '

'; -echo __('Scroll down to fill in the options for the selected format and ignore the options for other formats.'); -echo '

'; -echo PMA_pluginGetOptions('Export', $export_list); -echo '
'; +$html .= '
'; +$html .= '

' . __('Format-specific options:') . '

'; +$html .= '

'; +$html .= __('Scroll down to fill in the options for the selected format and ignore the options for other formats.'); +$html .= '

'; +$html .= PMA_pluginGetOptions('Export', $export_list); +$html .= '
'; if (function_exists('PMA_set_enc_form')) { // Encoding setting form appended by Y.Kawada // Japanese encoding setting - echo '
'; - echo '

' . __('Encoding Conversion:') . '

'; - echo PMA_set_enc_form(' '); - echo '
'; + $html .= '
'; + $html .= '

' . __('Encoding Conversion:') . '

'; + $html .= PMA_set_enc_form(' '); + $html .= '
'; } -echo '
'; +$html .= '
'; -echo PMA_Util::getExternalBug( +$html .= PMA_Util::getExternalBug( __('SQL compatibility mode'), 'mysql', '50027', '14515' ); -echo ''; -echo '
'; -echo ''; +$html .= ''; +$html .= '
'; +$html .= ''; + +$response = PMA_Response::getInstance(); +$response->addHTML($html);