diff --git a/adminer/table.inc.php b/adminer/table.inc.php index 6c63f970..10d2b5c4 100644 --- a/adminer/table.inc.php +++ b/adminer/table.inc.php @@ -7,9 +7,19 @@ if (!$fields) { $table_status = table_status1($TABLE, true); $name = $adminer->tableName($table_status); +$rights = []; +foreach ($fields as $key => $field) { + $rights += $field["privileges"]; +} + page_header(($fields && is_view($table_status) ? $table_status['Engine'] == 'materialized view' ? lang('Materialized view') : lang('View') : lang('Table')) . ": " . ($name != "" ? $name : h($TABLE)), $error); -$adminer->selectLinks($table_status); +$set = null; +if (isset($rights["insert"]) || !support("table")) { + $set = ""; +} +$adminer->selectLinks($table_status, $set); + $comment = $table_status["Comment"]; if ($comment != "") { echo "
" . lang('Comment') . ": " . h($comment) . "\n"; @@ -28,7 +38,7 @@ if (!is_view($table_status)) { } echo '
' . lang('Alter indexes') . "\n"; } - + if (fk_support($table_status)) { echo "