1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-17 20:01:25 +02:00

PostgreSQL, MS SQL, Oracle: Hide table actions for information_schema

This commit is contained in:
Jakub Vrana
2025-03-03 15:50:08 +01:00
parent af87336116
commit 116827060f
5 changed files with 8 additions and 4 deletions

View File

@@ -64,7 +64,10 @@ $target = array_keys(fields(in_array($row["table"], $referencable) ? $row["table
$onchange = "this.form['change-js'].value = '1'; this.form.submit();";
echo "<p>" . lang('Target table') . ": " . html_select("table", $referencable, $row["table"], $onchange) . "\n";
if (support("scheme")) {
echo lang('Schema') . ": " . html_select("ns", $adminer->schemas(), $row["ns"] != "" ? $row["ns"] : $_GET["ns"], $onchange);
$schemas = array_filter($adminer->schemas(), function ($schema) {
return !preg_match('~^information_schema$~i', $schema);
});
echo lang('Schema') . ": " . html_select("ns", $schemas, $row["ns"] != "" ? $row["ns"] : $_GET["ns"], $onchange);
if ($row["ns"] != "") {
set_schema($orig_schema);
}