forked from GNUsocial/gnu-social
[TESTS] Fix Core/ControllerTest
This commit is contained in:
@@ -66,8 +66,13 @@ class Collection extends Component
|
||||
|
||||
public function onCollectionQueryAddJoins(QueryBuilder &$note_qb, QueryBuilder &$actor_qb): bool
|
||||
{
|
||||
$note_qb->leftJoin(ActorSubscription::class, 'subscription', Expr\Join::WITH, 'note.actor_id = subscription.subscribed_id')
|
||||
->leftJoin(Actor::class, 'note_actor', Expr\Join::WITH, 'note.actor_id = note_actor.id');
|
||||
$note_aliases = $note_qb->getAllAliases();
|
||||
if (!\in_array('subscription', $note_aliases)) {
|
||||
$note_qb->leftJoin(ActorSubscription::class, 'subscription', Expr\Join::WITH, 'note.actor_id = subscription.subscribed_id');
|
||||
}
|
||||
if (!\in_array('note_actor', $note_aliases)) {
|
||||
$note_qb->leftJoin(Actor::class, 'note_actor', Expr\Join::WITH, 'note.actor_id = note_actor.id');
|
||||
}
|
||||
return Event::next;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user