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

Do not order descending in GROUP BY select

This commit is contained in:
Jakub Vrana
2025-06-05 10:26:11 +02:00
parent 146d3539d8
commit 31530ba03e
2 changed files with 2 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
## Adminer dev ## Adminer dev
- Allow specifying operator in search anywhere - Allow specifying operator in search anywhere
- Do not order descending in GROUP BY select
- Warn about exceeded max_file_uploads in import - Warn about exceeded max_file_uploads in import
- MySQL 5.0-: Do not load partitioning info in alter table (bug #1099) - MySQL 5.0-: Do not load partitioning info in alter table (bug #1099)
- PostgreSQL: Show structure of inherited tables - PostgreSQL: Show structure of inherited tables

View 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')});", ""); 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 $fun = apply_sql_function($val["fun"], $name); //! columns looking like functions
$sortable = isset($field["privileges"]["order"]) || $fun; $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'>"; echo "<span class='column hidden'>";
if ($sortable) { if ($sortable) {
echo "<a href='" . h($href . $desc) . "' title='" . lang('descending') . "' class='text'> ↓</a>"; echo "<a href='" . h($href . $desc) . "' title='" . lang('descending') . "' class='text'> ↓</a>";