1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-18 20:31:19 +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";
}

View File

@@ -188,9 +188,10 @@ function get_driver($id) {
/** Get help link for table
* @param string
* @param bool
* @return string relative URL or null
*/
function tableHelp($name) {
function tableHelp($name, $is_view = false) {
}
/** Check if C-style escapes are supported