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