Nieuws sorteren op publieke Laatst Bijgewerkt-datum, indien beschikbaar

This commit is contained in:
2018-01-24 18:03:06 +01:00
parent c8f7887761
commit fc947b05ff

View File

@@ -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'),