]> git.joonet.de Git - adminer.git/commitdiff
Do not order descending in GROUP BY select
authorJakub Vrana <jakub@vrana.cz>
Thu, 5 Jun 2025 08:26:11 +0000 (10:26 +0200)
committerJakub Vrana <jakub@vrana.cz>
Thu, 5 Jun 2025 08:26:11 +0000 (10:26 +0200)
CHANGELOG.md
adminer/select.inc.php

index bc4543a908579ced8b964604a67265c7d9b49913..42e2df42db7e5b604a69060bdd882d18cc689844 100644 (file)
@@ -1,5 +1,6 @@
 ## Adminer dev
 - Allow specifying operator in search anywhere
+- Do not order descending in GROUP BY select
 - Warn about exceeded max_file_uploads in import
 - MySQL 5.0-: Do not load partitioning info in alter table (bug #1099)
 - PostgreSQL: Show structure of inherited tables
index f429940d257dc05da4b1ceebe7f29c57580b3ca4..e5ab664a92036191c3b119eeb675e97914944e4a 100644 (file)
@@ -354,7 +354,7 @@ if (!$columns && support("table")) {
                                                echo "<th id='th[" . h(bracket_escape($key)) . "]'>" . script("mixin(qsl('th'), {onmouseover: partial(columnMouse), onmouseout: partial(columnMouse, ' hidden')});", "");
                                                $fun = apply_sql_function($val["fun"], $name); //! columns looking like functions
                                                $sortable = isset($field["privileges"]["order"]) || $fun;
-                                               echo ($sortable ? "<a href='" . h($href . ($order[0] == $column || $order[0] == $key || (!$order && $is_group && $group[0] == $column) ? $desc : '')) . "'>$fun</a>" : $fun); // $order[0] == $key - COUNT(*)
+                                               echo ($sortable ? "<a href='" . h($href . ($order[0] == $column || $order[0] == $key ? $desc : '')) . "'>$fun</a>" : $fun); // $order[0] == $key - COUNT(*)
                                                echo "<span class='column hidden'>";
                                                if ($sortable) {
                                                        echo "<a href='" . h($href . $desc) . "' title='" . lang('descending') . "' class='text'> ↓</a>";