1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-16 03:24:01 +02:00

PostgreSQL: Fix help link to pg_catalog views

This commit is contained in:
Jakub Vrana
2025-02-26 19:21:13 +01:00
parent 4b47326ffa
commit ba70be12a4
5 changed files with 10 additions and 7 deletions

View File

@@ -180,8 +180,10 @@ class Adminer {
if (support("table") || support("indexes")) {
$links["table"] = lang('Show structure');
}
$is_view = false;
if (support("table")) {
if (is_view($tableStatus)) {
$is_view = is_view($tableStatus);
if ($is_view) {
$links["view"] = lang('Alter view');
} else {
$links["create"] = lang('Alter table');
@@ -194,7 +196,7 @@ class Adminer {
foreach ($links as $key => $val) {
echo " <a href='" . h(ME) . "$key=" . urlencode($name) . ($key == "edit" ? $set : "") . "'" . bold(isset($_GET[$key])) . ">$val</a>";
}
echo doc_link(array($jush => $driver->tableHelp($name)), "?");
echo doc_link(array($jush => $driver->tableHelp($name, $is_view)), "?");
echo "\n";
}