From c727231ccd3f3821cf7b25bb5d3e4c1de0657d4f Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 7 Feb 2021 15:19:03 +0100 Subject: [PATCH] Fix displayed foreign key columns from other DB (bug #766) --- adminer/foreign.inc.php | 2 +- changes.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/foreign.inc.php b/adminer/foreign.inc.php index 02392eb0..726d6c79 100644 --- a/adminer/foreign.inc.php +++ b/adminer/foreign.inc.php @@ -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 "

" . lang('Target table') . ": " . html_select("table", $referencable, $row["table"], $onchange) . "\n"; if ($jush == "pgsql") { diff --git a/changes.txt b/changes.txt index 2ecf886f..61658cf0 100644 --- a/changes.txt +++ b/changes.txt @@ -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)