Do not pass translated strings as parameter.

This can cause problem for non ascii languages and breaks if user
meanwhile switches language.
This commit is contained in:
Michal Čihař
2011-03-18 14:32:36 +01:00
parent 65e53a8bb8
commit fc965daabd
2 changed files with 16 additions and 32 deletions

View File

@@ -499,23 +499,23 @@ $checkall_url = 'db_structure.php?' . PMA_generate_common_url($db);
<?php
echo ' <option value="' . __('With selected:') . '" selected="selected">'
. __('With selected:') . '</option>' . "\n";
echo ' <option value="' . __('Export') . '" >'
echo ' <option value="export" >'
. __('Export') . '</option>' . "\n";
echo ' <option value="' . __('Print view') . '" >'
. __('Print view') . '</option>' . "\n";
if (!$db_is_information_schema) {
echo ' <option value="' . __('Empty') . '" >'
echo ' <option value="empty_tbl" >'
. __('Empty') . '</option>' . "\n";
echo ' <option value="' . __('Drop') . '" >'
echo ' <option value="drop_tbl" >'
. __('Drop') . '</option>' . "\n";
echo ' <option value="' . __('Check table') . '" >'
echo ' <option value="check_tbl" >'
. __('Check table') . '</option>' . "\n";
echo ' <option value="' . __('Optimize table') . '" >'
echo ' <option value="optimize_tbl" >'
. __('Optimize table') . '</option>' . "\n";
echo ' <option value="' . __('Repair table') . '" >'
echo ' <option value="repair_tbl" >'
. __('Repair table') . '</option>' . "\n";
echo ' <option value="' . __('Analyze table') . '" >'
echo ' <option value="analyze_tbl" >'
. __('Analyze table') . '</option>' . "\n";
}
?>

View File

@@ -30,35 +30,19 @@ if (! empty($submit_mult)
$selected = $selected_tbl;
switch ($submit_mult) {
case 'drop_db':
$what = 'drop_db';
case 'drop_tbl':
case 'empty_tbl':
$what = $submit_mult;
break;
case __('Drop'):
$what = 'drop_tbl';
break;
case __('Empty'):
$what = 'empty_tbl';
break;
case __('Check table'):
case 'check_tbl':
case 'optimize_tbl':
case 'repair_tbl':
case 'analyze_tbl':
$query_type = $submit_mult;
unset($submit_mult);
$query_type = 'check_tbl';
$mult_btn = __('Yes');
break;
case __('Optimize table'):
unset($submit_mult);
$query_type = 'optimize_tbl';
$mult_btn = __('Yes');
break;
case __('Repair table'):
unset($submit_mult);
$query_type = 'repair_tbl';
$mult_btn = __('Yes');
break;
case __('Analyze table'):
unset($submit_mult);
$query_type = 'analyze_tbl';
$mult_btn = __('Yes');
break;
case __('Export'):
case 'export':
unset($submit_mult);
require('db_export.php');
exit;