]> git.joonet.de Git - adminer.git/commitdiff
Fix index length
authorJakub Vrana <jakub@vrana.cz>
Fri, 3 Dec 2010 15:13:01 +0000 (16:13 +0100)
committerJakub Vrana <jakub@vrana.cz>
Fri, 3 Dec 2010 15:13:01 +0000 (16:13 +0100)
adminer/indexes.inc.php

index 090d86afe7cde7cf32346735eccf3ff482b6fb34..d5334c6f9c847fb50a5925def8d60320ff76aa66 100644 (file)
@@ -84,9 +84,9 @@ foreach ($row["indexes"] as $index) {
        echo "<tr><td>" . html_select("indexes[$j][type]", array(-1 => "") + $index_types, $index["type"], ($j == count($row["indexes"]) ? "indexesAddRow(this);" : 1)) . "<td>";
        ksort($index["columns"]);
        $i = 1;
-       foreach ($index["columns"] as $column) {
+       foreach ($index["columns"] as $key => $column) {
                echo "<span>" . html_select("indexes[$j][columns][$i]", array(-1 => "") + $fields, $column, ($i == count($index["columns"]) ? "indexesAddColumn(this);" : 1));
-               echo "<input name='indexes[$j][lengths][$i]' size='2' value='" . h($index["lengths"][$i]) . "'> </span>"; //! hide for non-MySQL drivers, add ASC|DESC
+               echo "<input name='indexes[$j][lengths][$i]' size='2' value='" . h($index["lengths"][$key]) . "'> </span>"; //! hide for non-MySQL drivers, add ASC|DESC
                $i++;
        }
        $j++;