Rename variable
This commit is contained in:
parent
b1f1b03424
commit
2e1d38a920
|
@ -3,21 +3,21 @@ header("Content-Type: text/javascript; charset=utf-8");
|
||||||
|
|
||||||
if ($_GET["script"] == "db") {
|
if ($_GET["script"] == "db") {
|
||||||
$sums = array("Data_length" => 0, "Index_length" => 0, "Data_free" => 0);
|
$sums = array("Data_length" => 0, "Index_length" => 0, "Data_free" => 0);
|
||||||
foreach (table_status() as $row) {
|
foreach (table_status() as $table_status) {
|
||||||
$id = js_escape($row["Name"]);
|
$id = js_escape($table_status["Name"]);
|
||||||
json_row("Comment-$id", nbsp($row["Comment"]));
|
json_row("Comment-$id", nbsp($table_status["Comment"]));
|
||||||
if (!is_view($row)) {
|
if (!is_view($table_status)) {
|
||||||
foreach (array("Engine", "Collation") as $key) {
|
foreach (array("Engine", "Collation") as $key) {
|
||||||
json_row("$key-$id", nbsp($row[$key]));
|
json_row("$key-$id", nbsp($table_status[$key]));
|
||||||
}
|
}
|
||||||
foreach ($sums + array("Auto_increment" => 0, "Rows" => 0) as $key => $val) {
|
foreach ($sums + array("Auto_increment" => 0, "Rows" => 0) as $key => $val) {
|
||||||
if ($row[$key] != "") {
|
if ($table_status[$key] != "") {
|
||||||
$val = number_format($row[$key], 0, '.', lang(','));
|
$val = number_format($table_status[$key], 0, '.', lang(','));
|
||||||
json_row("$key-$id", ($key == "Rows" && $row["Engine"] == "InnoDB" && $val ? "~ $val" : $val));
|
json_row("$key-$id", ($key == "Rows" && $table_status["Engine"] == "InnoDB" && $val ? "~ $val" : $val));
|
||||||
if (isset($sums[$key])) {
|
if (isset($sums[$key])) {
|
||||||
$sums[$key] += ($row["Engine"] != "InnoDB" || $key != "Data_free" ? $row[$key] : 0);
|
$sums[$key] += ($table_status["Engine"] != "InnoDB" || $key != "Data_free" ? $table_status[$key] : 0);
|
||||||
}
|
}
|
||||||
} elseif (array_key_exists($key, $row)) {
|
} elseif (array_key_exists($key, $table_status)) {
|
||||||
json_row("$key-$id");
|
json_row("$key-$id");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue