]> git.joonet.de Git - adminer.git/commitdiff
Link to descending order
authorJakub Vrana <jakub@vrana.cz>
Tue, 1 May 2012 01:08:42 +0000 (18:08 -0700)
committerJakub Vrana <jakub@vrana.cz>
Tue, 1 May 2012 01:16:13 +0000 (18:16 -0700)
adminer/select.inc.php
adminer/static/default.css
changes.txt

index ca020e16e9a2727ea3e836b9f396b0b03160d461..e0d994c56134d09148100b61835857a2713bd385 100644 (file)
@@ -265,9 +265,9 @@ if (!$columns) {
                                                $rank++;
                                                $names[$key] = $name;
                                                $column = idf_escape($key);
-                                               echo '<th><a href="' . h(remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key)
-                                                       . ($order[0] == $column || $order[0] == $key || (!$order && count($group) < count($select) && $group[0] == $column) ? '&desc%5B0%5D=1' : '') // $order[0] == $key - COUNT(*)
-                                               ) . '">' . (!$select || $val ? apply_sql_function($val["fun"], $name) : h(current($select))) . "</a>"; //! columns looking like functions
+                                               $href = remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key);
+                                               echo '<th><a href="' . h($href) . '">' . (!$select || $val ? apply_sql_function($val["fun"], $name) : h(current($select))) . "</a>"; //! columns looking like functions
+                                               echo "<a href='" . h("$href&desc%5B0%5D=1") . "' title='" . lang('descending') . "' class='text'> ↓</a>";
                                        }
                                        $functions[$key] = $val["fun"];
                                        next($select);
index b9d6c251b41bf3e9c524f4b4c9384c6e418b30b9..fe15451de80ad857da19c011eee4b75bb4315357 100644 (file)
@@ -3,6 +3,7 @@ body { color: #000; background: #fff; font: 90%/1.25 Verdana, Arial, Helvetica,
 a { color: blue; }
 a:visited { color: navy; }
 a:hover { color: red; }
+a.text { text-decoration: none; }
 h1 { font-size: 150%; margin: 0; padding: .8em 1em; border-bottom: 1px solid #999; font-weight: normal; color: #777; background: #eee; }
 h2 { font-size: 150%; margin: 0 0 20px -18px; padding: .8em 1em; border-bottom: 1px solid #000; color: #000; font-weight: normal; background: #ddf; }
 h3 { font-weight: normal; font-size: 130%; margin: 1em 0 0; }
index b1ca7cf7467b743a32ae6883314826efeda30b54..0d5a23ce27f0070f39555609145af405dac76a10 100644 (file)
@@ -1,6 +1,7 @@
 Adminer 3.4.0-dev:
 Print current time next to executed SQL queries
 Highlight code in SQL command by CodeMirror
+Link to descending order
 Link to original table in EXPLAIN of SELECT * FROM table t
 Replace JSMin by better JavaScript minifier
 Don't use AJAX links and forms