bug #2080963 [charset] Clarify doc and improved code

This commit is contained in:
Marc Delisle
2008-09-07 15:29:00 +00:00
parent 5b7be0f01c
commit 2fff6e358f
3 changed files with 15 additions and 18 deletions

View File

@@ -99,6 +99,8 @@ danbarry
- patch #2075263 [auth] Single sign-on and cookie clearing, - patch #2075263 [auth] Single sign-on and cookie clearing,
thanks to Charles Suh - cws125 thanks to Charles Suh - cws125
- [doc] better documentation of $cfg['TempDir'] - [doc] better documentation of $cfg['TempDir']
- bug #2080963 [charset] Clarify doc and improved code, thanks to
Victor Volkov - hanut
2.11.9.0 (2008-08-28) 2.11.9.0 (2008-08-28)
- bug #2031221 [auth] Links to version number on login screen - bug #2031221 [auth] Links to version number on login screen

View File

@@ -207,17 +207,17 @@ echo PMA_pluginGetJavascript($export_list);
echo ' <label for="select_charset_of_file">' echo ' <label for="select_charset_of_file">'
. $strCharsetOfFile . '</label>' . "\n"; . $strCharsetOfFile . '</label>' . "\n";
$temp_charset = reset($cfg['AvailableCharsets']); reset($cfg['AvailableCharsets']);
echo ' <select id="select_charset_of_file" name="charset_of_file" size="1">' . "\n"; echo '<select id="select_charset_of_file" name="charset_of_file" size="1">';
foreach ($cfg['AvailableCharsets'] as $key => $temp_charset) { foreach ($cfg['AvailableCharsets'] as $temp_charset) {
echo ' <option value="' . $temp_charset . '"'; echo '<option value="' . $temp_charset . '"';
if ((empty($cfg['Export']['charset']) && $temp_charset == $charset) if ((empty($cfg['Export']['charset']) && $temp_charset == $charset)
|| $temp_charset == $cfg['Export']['charset']) { || $temp_charset == $cfg['Export']['charset']) {
echo ' selected="selected"'; echo ' selected="selected"';
} }
echo '>' . $temp_charset . '</option>' . "\n"; echo '>' . $temp_charset . '</option>';
} // end foreach } // end foreach
echo ' </select>'; echo '</select>';
} // end if } // end if
?> ?>
</div> </div>

View File

@@ -83,22 +83,17 @@ if (!empty($cfg['UploadDir'])) {
// charset of file // charset of file
echo '<div class="formelementrow">' . "\n"; echo '<div class="formelementrow">' . "\n";
if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) { if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) {
echo '<label for="charset_of_file">' . $strCharsetOfFile . '</label>' . "\n"; echo '<label for="charset_of_file">' . $strCharsetOfFile . '</label>';
$temp_charset = reset($cfg['AvailableCharsets']); reset($cfg['AvailableCharsets']);
echo ' <select id="charset_of_file" name="charset_of_file" size="1">' . "\n" echo '<select id="charset_of_file" name="charset_of_file" size="1">';
. ' <option value="' . htmlentities($temp_charset) . '"'; foreach ($cfg['AvailableCharsets'] as $temp_charset) {
if ($temp_charset == $charset) { echo '<option value="' . htmlentities($temp_charset) . '"';
echo ' selected="selected"';
}
echo '>' . htmlentities($temp_charset) . '</option>' . "\n";
while ($temp_charset = next($cfg['AvailableCharsets'])) {
echo ' <option value="' . htmlentities($temp_charset) . '"';
if ($temp_charset == $charset) { if ($temp_charset == $charset) {
echo ' selected="selected"'; echo ' selected="selected"';
} }
echo '>' . htmlentities($temp_charset) . '</option>' . "\n"; echo '>' . htmlentities($temp_charset) . '</option>';
} }
echo ' </select><br />' . "\n" . ' '; echo ' </select><br />';
} else { } else {
echo '<label for="charset_of_file">' . $strCharsetOfFile . '</label>' . "\n"; echo '<label for="charset_of_file">' . $strCharsetOfFile . '</label>' . "\n";
echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', 'charset_of_file', 'utf8', FALSE); echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', 'charset_of_file', 'utf8', FALSE);