]> git.joonet.de Git - adminer.git/commitdiff
Change referenced to references
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 17 Jul 2007 12:26:57 +0000 (12:26 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 17 Jul 2007 12:26:57 +0000 (12:26 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@214 7c3ca157-0c34-0410-bff1-cbf682f78f5c

schema.inc.php

index e94a0c48b8b92d9f3b129daf7b85c0a2717dd1ec..680bf95a889b48facd340bc50ec84a474dad2cd6 100644 (file)
@@ -11,7 +11,7 @@ while ($row = $result->fetch_assoc()) {
        if ($row["Engine"] == "InnoDB") {
                foreach (foreign_keys($row["Name"]) as $val) {
                        if (!$val["db"]) {
-                               $schema[$val["table"]]["referenced"][$row["Name"]][] = array_combine($val["target"], $val["source"]);
+                               $schema[$row["Name"]]["references"][$val["table"]][] = array_combine($val["source"], $val["target"]);
                        }
                }
        }
@@ -45,7 +45,7 @@ foreach ($schema as $name => $table) {
 }
 $left = 46;
 foreach ($schema as $name => $table) {
-       foreach ((array) $table["referenced"] as $target_name => $refs) {
+       foreach ((array) $table["references"] as $target_name => $refs) {
                foreach ($refs as $ref) {
                        $min_pos = $top;
                        $max_pos = 0;
@@ -54,8 +54,8 @@ foreach ($schema as $name => $table) {
                                $pos2 = $positions[$target_name][$target];
                                $min_pos = min($min_pos, $pos1, $pos2);
                                $max_pos = max($max_pos, $pos1, $pos2);
-                               echo "<div style='left: " . ($left+1) . "px; top: $pos1" . "em;'><img src='arrow.gif' width='12' height='9' alt='' /></div>\n";
-                               echo "<div style='left: " . ($left+1) . "px; top: $pos2" . "em;'><img src='hline.gif' width='12' height='7' alt='' /></div>\n";
+                               echo "<div style='left: " . ($left+1) . "px; top: $pos1" . "em;'><img src='hline.gif' width='12' height='7' alt='' /></div>\n";
+                               echo "<div style='left: " . ($left+1) . "px; top: $pos2" . "em;'><img src='arrow.gif' width='12' height='9' alt='' /></div>\n";
                        }
                        echo "<div style='left: $left" . "px; top: $min_pos" . "em;'><img src='vline.gif' width='1' height='12' alt='' style='padding: .5em 0; height: " . ($max_pos - $min_pos) . "em;' /></div>\n";
                        $left -= 2;