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

MySQL: Hide index algorithm if only one

This commit is contained in:
Jakub Vrana
2025-04-18 14:58:41 +02:00
parent 1030e84904
commit de3220acc7
2 changed files with 2 additions and 2 deletions

View File

@@ -368,7 +368,7 @@ class Adminer {
}
echo "<tr title='" . h($name) . "'>";
echo "<th>$index[type]" . ($index['algorithm'] != $default_algorithm ? " ($index[algorithm])" : "");
echo "<th>$index[type]" . ($default_algorithm && $index['algorithm'] != $default_algorithm ? " ($index[algorithm])" : "");
echo "<td>" . implode(", ", $print);
echo "\n";
}

View File

@@ -54,7 +54,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"]) {
&& array_values($existing["columns"]) === $columns
&& (!$existing["lengths"] || array_values($existing["lengths"]) === $lengths)
&& array_values($existing["descs"]) === $descs
&& $existing["algorithm"] === $index_algorithm
&& (!$index_algorithms || $existing["algorithm"] == $index_algorithm)
) {
// skip existing index
unset($indexes[$name]);