]> git.joonet.de Git - adminer.git/commitdiff
Sort existing for ===
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Sat, 14 Jul 2007 07:13:19 +0000 (07:13 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Sat, 14 Jul 2007 07:13:19 +0000 (07:13 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@167 7c3ca157-0c34-0410-bff1-cbf682f78f5c

indexes.inc.php

index 1f40219466a59e17edf1c923656fe4ecd2a0ae43..fb880c96cc91eb090d106d7e3a591e29cde4abee 100644 (file)
@@ -19,6 +19,8 @@ if ($_POST && !$error && !$_POST["add"]) {
                        }
                        if ($columns) {
                                foreach ($indexes as $name => $existing) {
+                                       ksort($existing["columns"]);
+                                       ksort($existing["lengths"]);
                                        if ($index["type"] == $existing["type"] && $existing["columns"] === $columns && $existing["lengths"] === $lengths) {
                                                unset($indexes[$name]);
                                                continue 2;
@@ -50,7 +52,7 @@ if ($_POST) {
                        }
                }
                $index = $row["indexes"][count($row["indexes"]) - 1];
-               if ($index["type"] || array_filter($index["columns"], 'strlen') || array_filter($index["columns"], 'length')) {
+               if ($index["type"] || array_filter($index["columns"], 'strlen') || array_filter($index["lengths"], 'strlen')) {
                        $row["indexes"][] = array("columns" => array(1 => ""));
                }
        }