From 1de9275f117d972128b04d0861dc6b4cfdece8be Mon Sep 17 00:00:00 2001 From: Peter Knut Date: Mon, 23 Sep 2024 10:01:55 +0200 Subject: [PATCH] Show second link for editing a table under the table view, add table head to indexes --- adminer/include/adminer.inc.php | 6 +++++- adminer/table.inc.php | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index 020d8d68..d887cd4c 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -366,9 +366,12 @@ class Adminer { */ function tableIndexesPrint($indexes) { echo "\n"; + echo "\n"; + foreach ($indexes as $name => $index) { ksort($index["columns"]); // enforce correct columns order - $print = array(); + $print = []; + foreach ($index["columns"] as $key => $val) { $print[] = "" . h($val) . "" . ($index["lengths"][$key] ? "(" . $index["lengths"][$key] . ")" : "") @@ -377,6 +380,7 @@ class Adminer { } echo "
" . lang('Type') . "" . lang('Column (length)') . "
$index[type]" . implode(", ", $print) . "\n"; } + echo "
\n"; } diff --git a/adminer/table.inc.php b/adminer/table.inc.php index af459c0a..569808f5 100644 --- a/adminer/table.inc.php +++ b/adminer/table.inc.php @@ -28,10 +28,20 @@ if ($comment != "") { if ($fields) { $adminer->tableStructurePrint($fields); + if (is_view($table_status)) { + $editLink = '

" . lang('Partition by') . "

\n"; + $partitions_info = get_partitions_info($TABLE); $adminer->tablePartitionsPrint($partitions_info); + + echo $editLink; } }