Skip to content

Commit

Permalink
bug #2080963 [charset] Clarify doc and improved code
Browse files Browse the repository at this point in the history
  • Loading branch information
lem9 committed Sep 7, 2008
1 parent 575dde5 commit bc4ad52
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Expand Up @@ -80,6 +80,8 @@ danbarry
- bug #2066923 [display] Navi browse icon does not go to page 1
- patch #2075263 [auth] Single sign-on and cookie clearing,
thanks to Charles Suh - cws125
- bug #2080963 [charset] Clarify doc and improved code, thanks to
Victor Volkov - hanut

2.11.9.0 (2008-08-28)
- bug #2031221 [auth] Links to version number on login screen
Expand Down
12 changes: 6 additions & 6 deletions libraries/display_export.lib.php
Expand Up @@ -207,17 +207,17 @@ function PMA_exportIsActive($what, $val) {
echo ' <label for="select_charset_of_file">'
. $strCharsetOfFile . '</label>' . "\n";

$temp_charset = reset($cfg['AvailableCharsets']);
echo ' <select id="select_charset_of_file" name="charset_of_file" size="1">' . "\n";
foreach ($cfg['AvailableCharsets'] as $key => $temp_charset) {
echo ' <option value="' . $temp_charset . '"';
reset($cfg['AvailableCharsets']);
echo '<select id="select_charset_of_file" name="charset_of_file" size="1">';
foreach ($cfg['AvailableCharsets'] as $temp_charset) {
echo '<option value="' . $temp_charset . '"';
if ((empty($cfg['Export']['charset']) && $temp_charset == $charset)
|| $temp_charset == $cfg['Export']['charset']) {
echo ' selected="selected"';
}
echo '>' . $temp_charset . '</option>' . "\n";
echo '>' . $temp_charset . '</option>';
} // end foreach
echo ' </select>';
echo '</select>';
} // end if
?>
</div>
Expand Down
19 changes: 7 additions & 12 deletions libraries/display_import.lib.php
Expand Up @@ -83,22 +83,17 @@
// charset of file
echo '<div class="formelementrow">' . "\n";
if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) {
echo '<label for="charset_of_file">' . $strCharsetOfFile . '</label>' . "\n";
$temp_charset = reset($cfg['AvailableCharsets']);
echo ' <select id="charset_of_file" name="charset_of_file" size="1">' . "\n"
. ' <option value="' . htmlentities($temp_charset) . '"';
if ($temp_charset == $charset) {
echo ' selected="selected"';
}
echo '>' . htmlentities($temp_charset) . '</option>' . "\n";
while ($temp_charset = next($cfg['AvailableCharsets'])) {
echo ' <option value="' . htmlentities($temp_charset) . '"';
echo '<label for="charset_of_file">' . $strCharsetOfFile . '</label>';
reset($cfg['AvailableCharsets']);
echo '<select id="charset_of_file" name="charset_of_file" size="1">';
foreach ($cfg['AvailableCharsets'] as $temp_charset) {
echo '<option value="' . htmlentities($temp_charset) . '"';
if ($temp_charset == $charset) {
echo ' selected="selected"';
}
echo '>' . htmlentities($temp_charset) . '</option>' . "\n";
echo '>' . htmlentities($temp_charset) . '</option>';
}
echo ' </select><br />' . "\n" . ' ';
echo ' </select><br />';
} else {
echo '<label for="charset_of_file">' . $strCharsetOfFile . '</label>' . "\n";
echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', 'charset_of_file', 'utf8', FALSE);
Expand Down

0 comments on commit bc4ad52

Please sign in to comment.