]> git.joonet.de Git - adminer.git/commitdiff
Remove table_comment function
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Fri, 21 Aug 2009 17:01:22 +0000 (17:01 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Fri, 21 Aug 2009 17:01:22 +0000 (17:01 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@995 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/create.inc.php
adminer/db.inc.php
adminer/include/mysql.inc.php
editor/include/adminer.inc.php

index b636ca1856a593cc598635a007e1539574a189db..a9a04bde29c1904168e29977b9f016fdc924c565 100644 (file)
@@ -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) {
index 758c0c847e9e9b88d9f267c9f51dd9c503d4d506..beb9e16e2aa38e3e13cfdf0089deba69708ded98 100644 (file)
@@ -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"])) {
index d6aca975970e502acd810e01fa2560052743c98e..4c6c68ac26f30b7457761d610659774e25fb2213 100644 (file)
@@ -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");
index 69e08a4bc1468e5f1a209d15a437220cd23cfabd..b82cc2ded3177ef3bb3ac18d17182fb087ecebe3 100644 (file)
@@ -32,7 +32,6 @@ class Adminer {
        }
        
        function tableName($tableStatus) {
-               table_comment($tableStatus);
                return h(strlen($tableStatus["Comment"]) ? $tableStatus["Comment"] : $tableStatus["Name"]);
        }