Nieuws sorteren op publieke Laatst Bijgewerkt-datum, indien beschikbaar
This commit is contained in:
@@ -59,7 +59,7 @@ QUERY;
|
|||||||
$start = ($page - 1) * $count;
|
$start = ($page - 1) * $count;
|
||||||
$newsItems = app('db')->select(self::$BASE_SQL
|
$newsItems = app('db')->select(self::$BASE_SQL
|
||||||
. $filterSql
|
. $filterSql
|
||||||
. ' ORDER BY `published` DESC'
|
. ' ORDER BY COALESCE(`news`.`pubupdatedt`, `news`.`creationdt`) DESC'
|
||||||
. ' LIMIT ' . (int)$start . ', ' . (int)$count, $params);
|
. ' LIMIT ' . (int)$start . ', ' . (int)$count, $params);
|
||||||
|
|
||||||
$result = array();
|
$result = array();
|
||||||
@@ -95,7 +95,7 @@ QUERY;
|
|||||||
$newsItems = app('db')->select(self::$BASE_SQL
|
$newsItems = app('db')->select(self::$BASE_SQL
|
||||||
. ' AND `news`.`creationdt` >= :startRange AND `news`.`creationdt` <= :endRange'
|
. ' AND `news`.`creationdt` >= :startRange AND `news`.`creationdt` <= :endRange'
|
||||||
. ' AND MATCH(`content`.`title`, `content`.`content`) AGAINST(:query IN BOOLEAN MODE)'
|
. ' AND MATCH(`content`.`title`, `content`.`content`) AGAINST(:query IN BOOLEAN MODE)'
|
||||||
. ' ORDER BY `published` DESC'
|
. ' ORDER BY COALESCE(`news`.`pubupdatedt`, `news`.`creationdt`) DESC'
|
||||||
. ' LIMIT 0, 20', [
|
. ' LIMIT 0, 20', [
|
||||||
'category' => self::$NEWS_CATEGORY,
|
'category' => self::$NEWS_CATEGORY,
|
||||||
'startRange' => $searchRange[0]->format('Y-m-d'),
|
'startRange' => $searchRange[0]->format('Y-m-d'),
|
||||||
|
|||||||
Reference in New Issue
Block a user