Fixed some bugs with php3 (0 != empty)
This commit is contained in:
@@ -83,7 +83,7 @@ else if (MYSQL_MAJOR_VERSION >= 3.23 && isset($tbl_cache)) {
|
||||
<th><?php echo ucfirst($strTable); ?></th>
|
||||
<th colspan="6"><?php echo ucfirst($strAction); ?></th>
|
||||
<th><?php echo ucfirst($strRecords); ?></th>
|
||||
<th><?php echo ((!empty($strSize)) ? ucfirst($strSize) : ' '); ?></th>
|
||||
<th><?php echo ucfirst($strSize); ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$i = $sum_entries = $sum_size = 0;
|
||||
@@ -121,8 +121,11 @@ else if (MYSQL_MAJOR_VERSION >= 3.23 && isset($tbl_cache)) {
|
||||
$tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
|
||||
$sum_size += $tblsize;
|
||||
$sum_entries += $sts_data['Rows'];
|
||||
if ($tblsize>0) list($formated_size, $unit) = format_byte_down($tblsize, 3, 1);
|
||||
else list($formated_size, $unit) = format_byte_down($tblsize, 3, 0);
|
||||
if ($tblsize > 0) {
|
||||
list($formated_size, $unit) = format_byte_down($tblsize, 3, 1);
|
||||
} else {
|
||||
list($formated_size, $unit) = format_byte_down($tblsize, 3, 0);
|
||||
}
|
||||
?>
|
||||
<td align="right">
|
||||
<?php echo number_format($sts_data['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
|
||||
@@ -135,7 +138,7 @@ else if (MYSQL_MAJOR_VERSION >= 3.23 && isset($tbl_cache)) {
|
||||
} else {
|
||||
?>
|
||||
<td colspan="3" align="center">
|
||||
<?php if (!empty($strInUse)) {echo $strInUse;}; echo "\n"; ?>
|
||||
<?php echo $strInUse . "\n"; ?>
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
@@ -150,7 +153,7 @@ else if (MYSQL_MAJOR_VERSION >= 3.23 && isset($tbl_cache)) {
|
||||
?>
|
||||
<tr bgcolor="<?php echo $cfgThBgcolor; ?>">
|
||||
<td colspan="7" align="center">
|
||||
<?php if (!empty($strSum)) {echo $strSum;}; echo "\n"; ?>
|
||||
<?php echo $strSum . "\n"; ?>
|
||||
</td>
|
||||
<td align="right">
|
||||
<?php echo number_format($sum_entries, 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
|
||||
|
@@ -252,12 +252,14 @@ if (MYSQL_MAJOR_VERSION == "3.23" && intval(MYSQL_MINOR_VERSION) > 3 && $tbl_typ
|
||||
// Gets some sizes
|
||||
list($data_size, $data_unit) = format_byte_down($showtable['Data_length']);
|
||||
list($index_size, $index_unit) = format_byte_down($showtable['Index_length']);
|
||||
if (!empty($showtable['Data_free'])) {
|
||||
if (isset($showtable['Data_free']) && $showtable['Data_free'] > 0) {
|
||||
list($free_size, $free_unit) = format_byte_down($showtable['Data_free']);
|
||||
}
|
||||
list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free']);
|
||||
list($tot_size, $tot_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']);
|
||||
if (isset($showtable['Rows']) && $showtable['Rows']>0) list($avg_size, $avg_unit) = format_byte_down(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1);
|
||||
if (isset($showtable['Rows']) && $showtable['Rows']>0) {
|
||||
list($avg_size, $avg_unit) = format_byte_down(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1);
|
||||
}
|
||||
|
||||
// Displays them
|
||||
if ($index_count > 0) {
|
||||
@@ -285,7 +287,7 @@ if (MYSQL_MAJOR_VERSION == "3.23" && intval(MYSQL_MINOR_VERSION) > 3 && $tbl_typ
|
||||
<td><?php echo $index_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
if (!empty($showtable['Data_free'])) {
|
||||
if (isset($free_size)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="color: #bb0000">
|
||||
@@ -309,7 +311,7 @@ if (MYSQL_MAJOR_VERSION == "3.23" && intval(MYSQL_MINOR_VERSION) > 3 && $tbl_typ
|
||||
</tr>
|
||||
<?php
|
||||
// Optimize link if overhead
|
||||
if (!empty($showtable['Data_free']) && ($tbl_type == 'MYISAM' || $tbl_type == 'BDB')) {
|
||||
if (isset($free_size) && ($tbl_type == 'MYISAM' || $tbl_type == 'BDB')) {
|
||||
echo "\n";
|
||||
$query = "server=$server&lang=$lang&db=$db&table=$table&goto=tbl_properties.php3";
|
||||
?>
|
||||
|
Reference in New Issue
Block a user