mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
fix(sticky): filter mutator union takes order by out of its clause caung trouble
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
This commit is contained in:
@@ -60,7 +60,6 @@ class PinStickiedDiscussionsToTop
|
|||||||
$query->orderByRaw('is_sticky and not exists ('.$read->toSql().') and last_posted_at > ? desc')
|
$query->orderByRaw('is_sticky and not exists ('.$read->toSql().') and last_posted_at > ? desc')
|
||||||
->addBinding(array_merge($read->getBindings(), [$filterState->getActor()->read_time ?: 0]), 'union');
|
->addBinding(array_merge($read->getBindings(), [$filterState->getActor()->read_time ?: 0]), 'union');
|
||||||
|
|
||||||
$query->unionOrders = array_merge($query->unionOrders, $query->orders);
|
|
||||||
$query->unionLimit = $query->limit;
|
$query->unionLimit = $query->limit;
|
||||||
$query->unionOffset = $query->offset;
|
$query->unionOffset = $query->offset;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user