Remove table_comment function
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@995 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
ea36c89a77
commit
a8bf261ab7
|
@ -103,7 +103,6 @@ if ($_POST) {
|
|||
process_fields($row["fields"]);
|
||||
} elseif (strlen($_GET["create"])) {
|
||||
$row = table_status($_GET["create"]);
|
||||
table_comment($row);
|
||||
$row["name"] = $_GET["create"];
|
||||
$row["fields"] = array();
|
||||
foreach ($orig_fields as $field) {
|
||||
|
|
|
@ -52,7 +52,6 @@ if (!$table_status) {
|
|||
echo '<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="form_check(this, /^(tables|views)\[/);"><th>' . lang('Table') . '<td>' . lang('Engine') . '<td>' . lang('Collation') . '<td>' . lang('Data Length') . '<td>' . lang('Index Length') . '<td>' . lang('Data Free') . '<td>' . lang('Auto Increment') . '<td>' . lang('Rows') . '<td>' . lang('Comment') . "</thead>\n";
|
||||
foreach ($table_status as $row) {
|
||||
$name = $row["Name"];
|
||||
table_comment($row);
|
||||
echo '<tr' . odd() . '><td><input type="checkbox" name="' . (isset($row["Rows"]) ? 'tables' : 'views') . '[]" value="' . h($name) . '"' . (in_array($name, $tables_views, true) ? ' checked' : '') . ' onclick="form_uncheck(\'check-all\');">';
|
||||
echo '<th><a href="' . h(ME) . 'table=' . urlencode($name) . '">' . h($name) . '</a>';
|
||||
if (isset($row["Rows"])) {
|
||||
|
|
|
@ -170,6 +170,10 @@ function table_status($name = "") {
|
|||
$return = array();
|
||||
$result = $dbh->query("SHOW TABLE STATUS" . (strlen($name) ? " LIKE " . $dbh->quote(addcslashes($name, "%_")) : ""));
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
if ($row["Engine"] == "InnoDB") {
|
||||
// ignore internal comment, unnecessary since MySQL 5.1.21
|
||||
$row["Comment"] = preg_replace('~(?:(.+); )?InnoDB free: .*~', '\\1', $row["Comment"]);
|
||||
}
|
||||
$return[$row["Name"]] = $row;
|
||||
}
|
||||
$result->free();
|
||||
|
@ -282,13 +286,6 @@ function escape_string($val) {
|
|||
return substr($dbh->quote($val), 1, -1);
|
||||
}
|
||||
|
||||
function table_comment(&$row) {
|
||||
if ($row["Engine"] == "InnoDB") {
|
||||
// ignore internal comment, unnecessary since MySQL 5.1.21
|
||||
$row["Comment"] = preg_replace('~(?:(.+); )?InnoDB free: .*~', '\\1', $row["Comment"]);
|
||||
}
|
||||
}
|
||||
|
||||
function information_schema($db) {
|
||||
global $dbh;
|
||||
return ($dbh->server_info >= 5 && $db == "information_schema");
|
||||
|
|
|
@ -32,7 +32,6 @@ class Adminer {
|
|||
}
|
||||
|
||||
function tableName($tableStatus) {
|
||||
table_comment($tableStatus);
|
||||
return h(strlen($tableStatus["Comment"]) ? $tableStatus["Comment"] : $tableStatus["Name"]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue