diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 97cc423f..511ef698 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -169,7 +169,7 @@ if (!$columns) { $backward_keys = $adminer->backwardKeys($_GET["select"]); $table_names = array_keys($backward_keys); if ($table_names) { - $table_names = array_combine($table_names, array_map(array($adminer, 'tableName'), array_map('table_status', $table_names))); + $table_names = array_filter(array_combine($table_names, array_map(array($adminer, 'tableName'), array_map('table_status', $table_names))), 'strlen'); } echo "
" . lang('Relations') : "") . "\n"; + echo ($table_names ? " | " . lang('Relations') : "") . "\n"; foreach ($descriptions as $n => $row) { $unique_idf = implode('&', unique_idf($rows[$n], $indexes)); echo ' | |
---|---|---|
' . (count($select) != count($group) || information_schema($_GET["db"]) ? '' : ' ' . lang('edit') . ''); @@ -231,17 +231,17 @@ if (!$columns) { echo " | $val"; } } - if ($backward_keys) { + if ($table_names) { echo " | "; - foreach ($backward_keys as $table => $keys) { - foreach ($keys as $columns) { + foreach ($table_names as $table => $name) { + foreach ($backward_keys[$table] as $columns) { echo ' $table_names[$table]"; + echo "\">$name"; } } } |