]> git.joonet.de Git - adminer.git/commitdiff
Fix displayed foreign key columns from other DB (bug #766)
authorJakub Vrana <jakub@vrana.cz>
Sun, 7 Feb 2021 14:19:03 +0000 (15:19 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sun, 7 Feb 2021 14:19:03 +0000 (15:19 +0100)
adminer/foreign.inc.php
changes.txt

index 02392eb06822b4e19a12674715c74f0fc719d986..726d6c798405d056323c091ba20056772f1ffa09 100644 (file)
@@ -60,7 +60,7 @@ if ($row["ns"] != "") {
        set_schema($row["ns"]);
 }
 $referencable = array_keys(array_filter(table_status('', true), 'fk_support'));
-$target = ($TABLE === $row["table"] ? $source : array_keys(fields(in_array($row["table"], $referencable) ? $row["table"] : reset($referencable))));
+$target = array_keys(fields(in_array($row["table"], $referencable) ? $row["table"] : reset($referencable)));
 $onchange = "this.form['change-js'].value = '1'; this.form.submit();";
 echo "<p>" . lang('Target table') . ": " . html_select("table", $referencable, $row["table"], $onchange) . "\n";
 if ($jush == "pgsql") {
index 2ecf886f2f3945dbc5736da1842d3b6a1ee66d7c..61658cf039fa541be0ba340ca68e5d9cbf3c3699 100644 (file)
@@ -4,6 +4,7 @@ Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200
 Don't syntax highlight during IME composition (bug #747)
 Quote values with leading and trailing zeroes in CSV export (bug #777)
 Link URLs in SQL command (PR #411)
+Fix displayed foreign key columns from other DB (bug #766)
 MySQL: Do not export names in quotes with sql_mode='ANSI_QUOTES' (bug #749)
 MySQL: Avoid error in PHP 8 when connecting to socket (PR #409)
 MySQL: Don't quote default value of text fields (bug #779)