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

Fix displayed foreign key columns from other DB (bug #766)

This commit is contained in:
Jakub Vrana
2021-02-07 15:19:03 +01:00
parent 3d92eb703b
commit c727231ccd
2 changed files with 2 additions and 1 deletions

View 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") {