mirror of
https://github.com/vrana/adminer.git
synced 2025-08-11 09:04:02 +02:00
PostgreSQL, MS SQL, Oracle: Hide table actions for information_schema
This commit is contained in:
@@ -392,7 +392,7 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
|
|||||||
}
|
}
|
||||||
|
|
||||||
function information_schema($db) {
|
function information_schema($db) {
|
||||||
return false;
|
return get_schema() == "INFORMATION_SCHEMA";
|
||||||
}
|
}
|
||||||
|
|
||||||
function error() {
|
function error() {
|
||||||
|
@@ -346,7 +346,7 @@ ORDER BY ac.constraint_type, aic.column_position", $connection2) as $row) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function information_schema($db) {
|
function information_schema($db) {
|
||||||
return false;
|
return get_schema() == "INFORMATION_SCHEMA";
|
||||||
}
|
}
|
||||||
|
|
||||||
function error() {
|
function error() {
|
||||||
|
@@ -471,7 +471,7 @@ ORDER BY conkey, conname") as $row) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function information_schema($db) {
|
function information_schema($db) {
|
||||||
return ($db == "information_schema");
|
return get_schema() == "information_schema";
|
||||||
}
|
}
|
||||||
|
|
||||||
function error() {
|
function error() {
|
||||||
|
@@ -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();";
|
$onchange = "this.form['change-js'].value = '1'; this.form.submit();";
|
||||||
echo "<p>" . lang('Target table') . ": " . html_select("table", $referencable, $row["table"], $onchange) . "\n";
|
echo "<p>" . lang('Target table') . ": " . html_select("table", $referencable, $row["table"], $onchange) . "\n";
|
||||||
if (support("scheme")) {
|
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"] != "") {
|
if ($row["ns"] != "") {
|
||||||
set_schema($orig_schema);
|
set_schema($orig_schema);
|
||||||
}
|
}
|
||||||
|
@@ -6,6 +6,7 @@ PostgreSQL: Fix export of indexes with expressions (bug #768)
|
|||||||
PostgreSQL: Display ENUM types
|
PostgreSQL: Display ENUM types
|
||||||
PostgreSQL: Export ENUM types (bug #587)
|
PostgreSQL: Export ENUM types (bug #587)
|
||||||
PostgreSQL: Show accessible databases to non-owners (regression from 4.9.1)
|
PostgreSQL: Show accessible databases to non-owners (regression from 4.9.1)
|
||||||
|
PostgreSQL, MS SQL, Oracle: Hide table actions for information_schema
|
||||||
SQLite: Support CHECK constraint
|
SQLite: Support CHECK constraint
|
||||||
SQLite: Add command Check tables
|
SQLite: Add command Check tables
|
||||||
SQLite: Display all rows of variable values
|
SQLite: Display all rows of variable values
|
||||||
|
Reference in New Issue
Block a user