Skip to content

Commit

Permalink
Merge pull request Fabrik#1291 from trob/j3_oo
Browse files Browse the repository at this point in the history
list order by is breaking if order by is "unset"
  • Loading branch information
pollen8 committed Aug 11, 2014
2 parents 4f6b4b0 + 69bfe9d commit 9ca7712
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/com_fabrik/models/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -2800,12 +2800,12 @@ public function buildQueryOrder($query = false)
$dir = JArrayHelper::getValue($orderdirs, $o, 'desc');

// as we use getString() for query string, need to sanitize
if (!in_array(strtolower($dir), array('asc', 'desc')))
if (!in_array(strtolower($dir), array('asc', 'desc','-')))
{
throw new ErrorException('invalid order direction: ' . $dir, 500);
}

if ($orderbyRaw !== '')
if ($orderbyRaw !== '' && $dir != '-')
{
// $$$ hugh - getOrderByName can return a CONCAT, ie join element ...

Expand Down

0 comments on commit 9ca7712

Please sign in to comment.