]> git.joonet.de Git - adminer.git/commitdiff
Save bytes
authorJakub Vrana <jakub@vrana.cz>
Mon, 20 Feb 2017 16:25:59 +0000 (17:25 +0100)
committerJakub Vrana <jakub@vrana.cz>
Mon, 20 Feb 2017 16:25:59 +0000 (17:25 +0100)
adminer/drivers/mysql.inc.php

index dcd57bbffcb512befa5f337fe1001e3cc4205e2e..a8f7656e7aa020b0b07a5fbd1e71b5d9c91b5d75 100644 (file)
@@ -500,10 +500,11 @@ if (!defined("DRIVER")) {
        function indexes($table, $connection2 = null) {
                $return = array();
                foreach (get_rows("SHOW INDEX FROM " . table($table), $connection2) as $row) {
-                       $return[$row["Key_name"]]["type"] = ($row["Key_name"] == "PRIMARY" ? "PRIMARY" : ($row["Index_type"] == "FULLTEXT" ? "FULLTEXT" : ($row["Non_unique"] ? ($row["Index_type"] == "SPATIAL" ? "SPATIAL" : "INDEX") : "UNIQUE")));
-                       $return[$row["Key_name"]]["columns"][] = $row["Column_name"];
-                       $return[$row["Key_name"]]["lengths"][] = ($row["Index_type"] == "SPATIAL" ? null : $row["Sub_part"]);
-                       $return[$row["Key_name"]]["descs"][] = null;
+                       $name = $row["Key_name"];
+                       $return[$name]["type"] = ($name == "PRIMARY" ? "PRIMARY" : ($row["Index_type"] == "FULLTEXT" ? "FULLTEXT" : ($row["Non_unique"] ? ($row["Index_type"] == "SPATIAL" ? "SPATIAL" : "INDEX") : "UNIQUE")));
+                       $return[$name]["columns"][] = $row["Column_name"];
+                       $return[$name]["lengths"][] = ($row["Index_type"] == "SPATIAL" ? null : $row["Sub_part"]);
+                       $return[$name]["descs"][] = null;
                }
                return $return;
        }