aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2016-11-17 18:21:14 +0100
committerChristian Weiske <cweiske@cweiske.de>2016-11-17 18:21:14 +0100
commitf98e891b454e5677bdf61f476e366b01af713b50 (patch)
tree6f44d739b0fbd4369945ec21bf5b0064dff590a8 /src
parent202def908c2782312d82eeefd67afb0469dee440 (diff)
downloadphinde-f98e891b454e5677bdf61f476e366b01af713b50.tar.gz
phinde-f98e891b454e5677bdf61f476e366b01af713b50.zip
Configuration for default sort order
Diffstat (limited to 'src')
-rw-r--r--src/phinde/Elasticsearch.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/phinde/Elasticsearch.php b/src/phinde/Elasticsearch.php
index 6c90480..c24f6cd 100644
--- a/src/phinde/Elasticsearch.php
+++ b/src/phinde/Elasticsearch.php
@@ -135,6 +135,9 @@ class Elasticsearch
)
);
+ if ($sort == '' && $GLOBALS['phinde']['defaultSort'] == 'date') {
+ $sort = 'date';
+ }
if ($sort == 'date') {
$sortCfg = array('status.modate' => array('order' => 'desc'));
} else {