1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-06 22:56:46 +02:00

PostgreSQL: Link parent from inherited tables (bug #1031)

This commit is contained in:
Jakub Vrana
2025-04-13 16:59:07 +02:00
parent a3d0bbba8f
commit 9555c96d6a
6 changed files with 35 additions and 8 deletions

View File

@@ -184,6 +184,7 @@ class Adminer {
* @param ?string $set new item options, NULL for no new item
*/
function selectLinks(array $tableStatus, ?string $set = ""): void {
$name = $tableStatus["Name"];
echo '<p class="links">';
$links = array("select" => lang('Select data'));
if (support("table") || support("indexes")) {
@@ -194,14 +195,13 @@ class Adminer {
$is_view = is_view($tableStatus);
if ($is_view) {
$links["view"] = lang('Alter view');
} else {
} elseif (!driver()->inheritsFrom($name)) {
$links["create"] = lang('Alter table');
}
}
if ($set !== null) {
$links["edit"] = lang('New item');
}
$name = $tableStatus["Name"];
foreach ($links as $key => $val) {
echo " <a href='" . h(ME) . "$key=" . urlencode($name) . ($key == "edit" ? $set : "") . "'" . bold(isset($_GET[$key])) . ">$val</a>";
}