1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-14 02:23:59 +02:00

Don't alter foreign keys from other databases

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@143 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2007-07-11 21:40:00 +00:00
parent b295a84126
commit 1e0109cd2b

View 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";