Skip to content

Commit

Permalink
Change referenced to references
Browse files Browse the repository at this point in the history
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@214 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information
jakubvrana committed Jul 17, 2007
1 parent b0b9042 commit d7d9c59
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions schema.inc.php
Expand Up @@ -11,7 +11,7 @@
if ($row["Engine"] == "InnoDB") { if ($row["Engine"] == "InnoDB") {
foreach (foreign_keys($row["Name"]) as $val) { foreach (foreign_keys($row["Name"]) as $val) {
if (!$val["db"]) { 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"]);
} }
} }
} }
Expand Down Expand Up @@ -45,7 +45,7 @@
} }
$left = 46; $left = 46;
foreach ($schema as $name => $table) { 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) { foreach ($refs as $ref) {
$min_pos = $top; $min_pos = $top;
$max_pos = 0; $max_pos = 0;
Expand All @@ -54,8 +54,8 @@
$pos2 = $positions[$target_name][$target]; $pos2 = $positions[$target_name][$target];
$min_pos = min($min_pos, $pos1, $pos2); $min_pos = min($min_pos, $pos1, $pos2);
$max_pos = max($max_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: $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='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"; 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; $left -= 2;
Expand Down

0 comments on commit d7d9c59

Please sign in to comment.