Permalink
Browse files

BUGFIX DataQuery::orderby() don't sort relations DESC

  • Loading branch information...
1 parent fece61c commit 20554b1bf972c53176d113d616e859bd91a93176 @stojg stojg committed Dec 18, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 model/DataQuery.php
View
@@ -181,13 +181,13 @@ protected function ensureSelectContainsOrderbyColumns($query) {
$columnParts = explode(' ', $col);
if (count($columnParts) == 2) {
- $dir = $columnParts[1];
$col = $columnParts[0];
+ $dir = $columnParts[1];
} else {
- $dir = '';
+ $dir = 'ASC';
}
- $orderByFields[$ob] = $col;
+ $orderByFields[$ob] = $col . ' ' . $dir;
$col = str_replace('"', '', $col);
$parts = explode('.', $col);

0 comments on commit 20554b1

Please sign in to comment.