]> git.joonet.de Git - adminer.git/commitdiff
Don't alter foreign keys from other databases
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Wed, 11 Jul 2007 21:40:00 +0000 (21:40 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Wed, 11 Jul 2007 21:40:00 +0000 (21:40 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@143 7c3ca157-0c34-0410-bff1-cbf682f78f5c

table.inc.php

index 697b63a5405de3da8c60aae6d84e123196d2fd24..72f665f4d2453e43fa91fe079a33c38091f7d9f5 100644 (file)
@@ -42,7 +42,7 @@ if (!$result) {
                        echo "<td><i>" . implode("</i>, <i>", $foreign_key[2]) . "</i></td>";
                        $link = (strlen($foreign_key[0]) ? "<strong>" . htmlspecialchars($foreign_key[0]) . "</strong>." : "") . htmlspecialchars($foreign_key[1]);
                        echo '<td><a href="' . htmlspecialchars(strlen($foreign_key[0]) ? preg_replace('~db=[^&]*~', "db=" . urlencode($foreign_key[0]), $SELF) : $SELF) . "table=" . urlencode($foreign_key[1]) . "\">$link</a>(<em>" . implode("</em>, <em>", $foreign_key[3]) . "</em>)</td>";
-                       echo '<td><a href="' . htmlspecialchars($SELF) . 'foreign=' . urlencode($_GET["table"]) . '&amp;name=' . urlencode($name) . '">' . lang('Alter') . "</a></td>";
+                       echo '<td>' . (!strlen($foreign_key[0]) ? '<a href="' . htmlspecialchars($SELF) . 'foreign=' . urlencode($_GET["table"]) . '&amp;name=' . urlencode($name) . '">' . lang('Alter') . '</a>' : '&nbsp;') . '</td>';
                        echo "</tr>\n";
                }
                echo "</table>\n";