Skip to content

Commit e22cf1e

Browse files
committed
sort by descending order on first click
1 parent d0a9fb2 commit e22cf1e

3 files changed

Lines changed: 15 additions & 6 deletions

File tree

Docs/changelog.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
-------------------------------
2+
version 3.8
3+
-------------------------------
4+
Updates:
5+
- sort by descending order on first click (as records sort in ascending order by default)
6+
7+
Miscellaneous:
8+
- Fix display of result headers in safari (avoid wrapping)
9+
110
-------------------------------
211
version 3.7
312
-------------------------------
@@ -611,4 +620,4 @@ version 0.2
611620
-------------------------
612621
version 0.1
613622
-------------------------
614-
- First public release.
623+
- First public release.

config/constants.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// You should not change anything below unless you know what you are doing!
1313
define("EXTERNAL_PATH", defined('MYWEBSQL_COMPACT_DIST') ? $_SERVER["SCRIPT_NAME"] : str_replace(basename($_SERVER["SCRIPT_NAME"]), "", $_SERVER["SCRIPT_NAME"]));
1414

15-
define('APP_VERSION', '3.6');
15+
define('APP_VERSION', '3.8');
1616
define('PROJECT_SITEURL', 'http://mywebsql.net');
1717
define("DEVELOPER_EMAIL", "support@mywebsql.net");
1818
define("COOKIE_LIFETIME", 1440); // in hours
@@ -53,4 +53,4 @@ function stripdata($data)
5353
}
5454

5555
}
56-
?>
56+
?>

lib/util.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ function createInfoGrid(&$db, $query="", $numQueries=1, $affectedRows=-1, $addHi
386386
if ($numQueries == 1) {
387387
$formatted_query = preg_replace("/[\\n|\\r]?[\\n]+/", "<br>", htmlspecialchars($query));
388388
print "<div class='sql-text ui-state-default'>".$formatted_query."</div>";
389-
389+
390390
$warnings = $db->getWarnings();
391391
if (count($warnings) > 0) {
392392
print '<div class="message ui-state-error">';
@@ -435,7 +435,7 @@ function sortQuery($query, $field) {
435435
$sort = '';
436436
$sort_type = Session::get('select', 'sort');
437437
if (!$sort_type)
438-
$sort_type = 'ASC';
438+
$sort_type = 'DESC';
439439
$limit = '';
440440
// find and extract limit clause out of query (must be the last clause, otherwise sorting will not work)
441441
preg_match(LIMIT_REGEXP, $query, $matches);
@@ -603,4 +603,4 @@ function loadDbVars(&$db) {
603603
$db->query($query);
604604
}
605605
}
606-
?>
606+
?>

0 commit comments

Comments
 (0)