1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-09 16:17:48 +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
committed by Jakub Vrana
parent edef2b1a3d
commit c5fa212b26

View File

@@ -9,7 +9,12 @@ $name = $adminer->tableName($table_status);
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);
$rights = array();
foreach ($fields as $key => $field) {
$rights += $field["privileges"];
}
$adminer->selectLinks($table_status, (isset($rights["insert"]) || !support("table") ? "" : null));
$comment = $table_status["Comment"];
if ($comment != "") {
echo "<p class='nowrap'>" . lang('Comment') . ": " . h($comment) . "\n";