From 25e8acf68110bbe6d7c7dea17cccae7828b3947d Mon Sep 17 00:00:00 2001 From: Anthony FREMION Date: Fri, 5 Jun 2015 14:23:59 +0200 Subject: [PATCH] patch: add default sort at the end of the table for queries --- module/Rubedo/src/Rubedo/Collection/Queries.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/module/Rubedo/src/Rubedo/Collection/Queries.php b/module/Rubedo/src/Rubedo/Collection/Queries.php index 8a30f02b2..67a3ff205 100644 --- a/module/Rubedo/src/Rubedo/Collection/Queries.php +++ b/module/Rubedo/src/Rubedo/Collection/Queries.php @@ -415,13 +415,16 @@ protected function _getFilterArrayForQuery($query) 'property' => $property, 'direction' => $value['sort'] ); - } else { - $sort[] = array( - 'property' => 'id', - 'direction' => 'DESC' - ); } } + + /* + * Add Default Sort On ID + */ + $sort[] = array( + 'property' => 'id', + 'direction' => 'DESC' + ); return array( "filter" => $filters,