The user may now choose his connection character set. This should fix bug #984912.

This commit is contained in:
Alexander M. Turek
2004-07-17 22:58:31 +00:00
parent 261abc7537
commit 278b126afe
108 changed files with 231 additions and 64 deletions

View File

@@ -285,7 +285,7 @@ if (PMA_MYSQL_INT_VERSION >= 40100){
define('PMA_CSDROPDOWN_COLLATION', 0);
define('PMA_CSDROPDOWN_CHARSET', 1);
function PMA_generateCharsetDropdownBox($type = PMA_CSDROPDOWN_COLLATION, $name = NULL, $id = NULL, $default = NULL, $label = TRUE, $indent = 0) {
function PMA_generateCharsetDropdownBox($type = PMA_CSDROPDOWN_COLLATION, $name = NULL, $id = NULL, $default = NULL, $label = TRUE, $indent = 0, $submitOnChange = FALSE) {
global $mysql_charsets, $mysql_charsets_descriptions, $mysql_collations;
if (empty($name)) {
@@ -299,7 +299,7 @@ if (PMA_MYSQL_INT_VERSION >= 40100){
$spacer = '';
for ($i = 1; $i <= $indent; $i++) $spacer .= ' ';
$return_str = $spacer . '<select name="' . htmlspecialchars($name) . '"' . (empty($id) ? '' : ' id="' . htmlspecialchars($id) . '"') . '>' . "\n";
$return_str = $spacer . '<select name="' . htmlspecialchars($name) . '"' . (empty($id) ? '' : ' id="' . htmlspecialchars($id) . '"') . ($submitOnChange ? ' onchange="this.form.submit();"' : '') . '>' . "\n";
if ($label) {
$return_str .= $spacer . ' <option value="">' . ($type == PMA_CSDROPDOWN_COLLATION ? $GLOBALS['strCollation'] : $GLOBALS['strCharset']) . '</option>' . "\n";
}