]> git.joonet.de Git - adminer.git/commitdiff
Add id to <th> in select (bug #724)
authorJakub Vrana <jakub@vrana.cz>
Mon, 8 Feb 2021 15:10:37 +0000 (16:10 +0100)
committerJakub Vrana <jakub@vrana.cz>
Mon, 8 Feb 2021 15:10:37 +0000 (16:10 +0100)
adminer/select.inc.php

index 2ea056a9c45fa0a2b8f5cf057f07c9de20a75815..5a40aeff2e673be73b392fa7a7eb375f7711d454 100644 (file)
@@ -331,7 +331,7 @@ if (!$columns && support("table")) {
                                                $column = idf_escape($key);
                                                $href = remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key);
                                                $desc = "&desc%5B0%5D=1";
-                                               echo "<th>" . 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')});", "");
                                                echo '<a href="' . h($href . ($order[0] == $column || $order[0] == $key || (!$order && $is_group && $group[0] == $column) ? $desc : '')) . '">'; // $order[0] == $key - COUNT(*)
                                                echo apply_sql_function($val["fun"], $name) . "</a>"; //! columns looking like functions
                                                echo "<span class='column hidden'>";