Browse files

Link to descending order

  • Loading branch information...
1 parent b16bb54 commit 70fb696fbd61bdb1990d192a85aa9f8251b5ff52 @vrana committed Apr 30, 2012
Showing with 5 additions and 3 deletions.
  1. +3 −3 adminer/select.inc.php
  2. +1 −0 adminer/static/default.css
  3. +1 −0 changes.txt
View
6 adminer/select.inc.php
@@ -265,9 +265,9 @@
$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);
View
1 adminer/static/default.css
@@ -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; }
View
1 changes.txt
@@ -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

0 comments on commit 70fb696

Please sign in to comment.