Skip to content
Snippets Groups Projects
Commit a70f69ce authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[BUGFIX] Fix wrong previous/next news when using sorting instead of date

parent 9198c39a
No related branches found
Tags 4.6.3
No related merge requests found
......@@ -392,7 +392,7 @@ class NewsRepository extends AbstractRepository {
'crdate' => QueryInterface::ORDER_DESCENDING
]);
return $query->matching(
$query->lessThan('sorting', $news->getSorting())
$query->greaterThan('sorting', $news->getSorting())
)->execute();
}
......@@ -425,7 +425,7 @@ class NewsRepository extends AbstractRepository {
'crdate' => QueryInterface::ORDER_ASCENDING
]);
return $query->matching(
$query->greaterThan('sorting', $news->getSorting())
$query->lessThan('sorting', $news->getSorting())
)->execute();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment