Permalink
Browse files

Sort existing for ===

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@167 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent e78ec76 commit 89835826fe355a3af0c226654b0ab2f183d77d79 jakubvrana committed Jul 14, 2007
Showing with 3 additions and 1 deletion.
  1. +3 −1 indexes.inc.php
View
4 indexes.inc.php
@@ -19,6 +19,8 @@
}
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 @@
}
}
$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 => ""));
}
}

0 comments on commit 8983582

Please sign in to comment.