Browse Source

MySQL: Hide index algorithm if only one

pull/1051/head
Jakub Vrana 3 months ago
parent
commit
de3220acc7
  1. 2
      adminer/include/adminer.inc.php
  2. 2
      adminer/indexes.inc.php

2
adminer/include/adminer.inc.php

@ -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";
}

2
adminer/indexes.inc.php

@ -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]);

Loading…
Cancel
Save