1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-06 22:56:46 +02:00

Pass $tableStatus to indexMethods, rename

This commit is contained in:
Jakub Vrana
2025-04-17 10:22:32 +02:00
parent a93f0003ae
commit dbec3a1b92
6 changed files with 20 additions and 19 deletions

View File

@@ -348,9 +348,11 @@ class Adminer {
/** Print list of indexes on table in tabular format
* @param Index[] $indexes
* @param TableStatus $tableStatus
*/
function tableIndexesPrint(array $indexes): void {
function tableIndexesPrint(array $indexes, array $tableStatus): void {
echo "<table>\n";
$default_algorithm = first(driver()->indexAlgorithms($tableStatus));
foreach ($indexes as $name => $index) {
ksort($index["columns"]); // enforce correct columns order
$print = array();
@@ -362,7 +364,7 @@ class Adminer {
}
echo "<tr title='" . h($name) . "'>";
echo "<th>$index[type]" . ($index['algorithm'] != first(driver()->indexMethods()) ? " ($index[algorithm])" : "");
echo "<th>$index[type]" . ($index['algorithm'] != $default_algorithm ? " ($index[algorithm])" : "");
echo "<td>" . implode(", ", $print);
echo "\n";
}