1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-30 09:39:51 +02:00

Unify displaying of 'New item' action based on privileges

This commit is contained in:
Peter Knut
2024-10-04 00:26:04 +02:00
parent b6058368d3
commit 29fd200ef5

View File

@@ -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 "<p class='nowrap'>" . lang('Comment') . ": " . h($comment) . "\n";