Various charset / collation fixes.

This commit is contained in:
Alexander M. Turek
2003-12-29 17:15:14 +00:00
parent ebf20488d8
commit f10c27765e
5 changed files with 98 additions and 52 deletions

View File

@@ -3,14 +3,16 @@
// vim: expandtab sw=4 ts=4 sts=4:
require_once('./libraries/grab_globals.lib.php');
require_once('./libraries/common.lib.php');
require_once('./libraries/mysql_charsets.lib.php');
/**
* Prepares the tables list if the user where not redirected to this script
* because there is no table in the database ($is_info is TRUE)
*/
if (empty($is_info)) {
require_once('./libraries/grab_globals.lib.php');
require_once('./libraries/common.lib.php');
// Drops/deletes/etc. multiple tables if required
if ((!empty($submit_mult) && isset($selected_tbl))
|| isset($mult_btn)) {
@@ -37,41 +39,40 @@ if (empty($is_info)) {
// Display function
function pma_TableHeader($alternate = FALSE) {
if ($alternate) {
?>
<table border="<?php echo $GLOBALS['cfg']['Border']; ?>">
<tr>
<td></td>
<th>&nbsp;<?php echo $GLOBALS['strTable']; ?>&nbsp;</th>
<th colspan="6"><?php echo $GLOBALS['strAction']; ?></th>
<th><?php echo $GLOBALS['strRecords']; ?></th>
</tr>
<?php
} else {
?>
<table border="<?php echo $GLOBALS['cfg']['Border']; ?>">
<tr>
<td></td>
<th>&nbsp;<?php echo $GLOBALS['strTable']; ?>&nbsp;</th>
<th colspan="6"><?php echo $GLOBALS['strAction']; ?></th>
<th><?php echo $GLOBALS['strRecords']; ?></th>
<?php
if (!($GLOBALS['cfg']['PropertiesNumColumns'] > 1)) {
?>
<th><?php echo $GLOBALS['strType']; ?></th>
<?php
}
?>
<?php
if ($GLOBALS['cfg']['ShowStats']) {
echo '<th>' . $GLOBALS['strSize'] . '</th>';
echo '<th>' . $GLOBALS['strOverhead'] . '</th>';
}
echo "\n";
?>
</tr>
<?php
echo ' <table border="' . $GLOBALS['cfg']['Border'] . '">' . "\n"
. ' <tr>' . "\n"
. ' <td></td>' . "\n"
. ' <th>' . "\n"
. ' &nbsp;' . $GLOBALS['strTable'] . '&nbsp;' . "\n"
. ' </th>' . "\n"
. ' <th colspan="6">' . "\n"
. ' &nbsp;' . $GLOBALS['strAction'] . '&nbsp;' . "\n"
. ' </th>' . "\n"
. ' <th>' . "\n"
. ' &nbsp;' . $GLOBALS['strRecords'] . '&nbsp;' . "\n"
. ' </th>' . "\n";
if (!$alternate) {
if (!($GLOBALS['cfg']['PropertiesNumColumns'] > 1)) {
echo ' <th>' . "\n"
. ' &nbsp;' . $GLOBALS['strType'] . '&nbsp;' . "\n"
. ' </th>' . "\n";
if (PMA_MYSQL_INT_VERSION >= 40100) {
echo ' <th>' . "\n"
. ' &nbsp;' . $GLOBALS['strCollation'] . '&nbsp;' . "\n"
. ' </th>' . "\n";
}
}
if ($GLOBALS['cfg']['ShowStats']) {
echo ' <th>' . "\n"
. ' &nbsp;' . $GLOBALS['strSize'] . '&nbsp;' . "\n"
. ' </th>' . "\n"
. ' <th>' . "\n"
. ' &nbsp;' . $GLOBALS['strOverhead'] . '&nbsp;' . "\n"
. ' </th>' . "\n";
}
echo "\n";
}
echo ' </tr>' . "\n";
}
@@ -378,11 +379,14 @@ else {
</td>
<?php
if (!($cfg['PropertiesNumColumns'] > 1)) {
?>
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
&nbsp;<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : '&nbsp;'); ?>&nbsp;
</td>
<?php
echo ' <td bgcolor="' . $bgcolor . '" nowrap="nowrap">' . "\n"
. ' &nbsp;' . (isset($sts_data['Type']) ? $sts_data['Type'] : '&nbsp;') . '&nbsp;' . "\n"
. ' </td>' . "\n";
if (PMA_MYSQL_INT_VERSION >= 40100) {
echo ' <td bgcolor="' . $bgcolor . '" nowrap="nowrap">' . "\n"
. ' &nbsp;' . (isset($sts_data['Collation']) ? '<dfn title="' . PMA_getCollationDescr($sts_data['Collation']) . '">' . $sts_data['Collation'] . '</dfn>' : '---') . '&nbsp;' . "\n"
. ' </td>' . "\n";
}
}
if ($cfg['ShowStats']) {
@@ -439,11 +443,15 @@ else {
</th>
<?php
if (!($cfg['PropertiesNumColumns'] > 1)) {
?>
<th align="center">
<b>--</b>
</th>
<?php
echo ' <th align="center">' . "\n"
. ' <b>--</b>' . "\n"
. ' </th>' . "\n";
if (PMA_MYSQL_INT_VERSION >= 40100) {
$db_collation = PMA_getDbCollation($db);
echo ' <th align="center">' . "\n"
. ' &nbsp;<b><dfn title="' . PMA_getCollationDescr($db_collation) . '">' . $db_collation . '</dfn></b>&nbsp;' . "\n"
. ' </th>' . "\n";
}
}
if ($cfg['ShowStats']) {