diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2016-11-17 18:21:14 +0100 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2016-11-17 18:21:14 +0100 |
| commit | f98e891b454e5677bdf61f476e366b01af713b50 (patch) | |
| tree | 6f44d739b0fbd4369945ec21bf5b0064dff590a8 /src/phinde/Elasticsearch.php | |
| parent | 202def908c2782312d82eeefd67afb0469dee440 (diff) | |
| download | phinde-f98e891b454e5677bdf61f476e366b01af713b50.tar.gz phinde-f98e891b454e5677bdf61f476e366b01af713b50.zip | |
Configuration for default sort order
Diffstat (limited to 'src/phinde/Elasticsearch.php')
| -rw-r--r-- | src/phinde/Elasticsearch.php | 3 |
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 { |
