Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
pull/768/head
Maxence Lange 2019-09-30 12:40:25 +02:00
rodzic dd1613463b
commit dd57e9adec
1 zmienionych plików z 3 dodań i 40 usunięć

Wyświetl plik

@ -158,45 +158,6 @@ class StreamRequestBuilder extends CoreRequestBuilder {
}
/**
* @param IQueryBuilder $qb
*/
protected function filterHiddenOnTimeline(IQueryBuilder $qb) {
$actor = $this->viewer;
if ($actor === null) {
return;
}
$func = $qb->func();
$expr = $qb->expr();
$filter = $expr->orX();
$filter->add($this->exprLimitToDBFieldInt($qb, 'hidden_on_timeline', 0));
$filter->add(
$expr->neq(
$func->lower('attributed_to'),
$func->lower($qb->createNamedParameter($actor->getId()))
)
);
$follower = $expr->andX();
$follower->add(
$expr->eq(
$func->lower('f.object_id'),
$func->lower('attributed_to')
)
);
$follower->add(
$this->exprLimitToDBField($qb, 'actor_id', $actor->getId(), true, false, 'f')
);
$filter->add($follower);
$qb->andwhere($filter);
}
/**
* @param IQueryBuilder $qb
* @param Person $actor
@ -317,6 +278,7 @@ class StreamRequestBuilder extends CoreRequestBuilder {
* @param string $recipient
* @param bool $asAuthor
* @param array $type
*
* @deprecated
*/
protected function limitToRecipient(
@ -331,8 +293,9 @@ class StreamRequestBuilder extends CoreRequestBuilder {
* @param string $recipient
* @param bool $asAuthor
* @param array $type
* @deprecated
*
* @return ICompositeExpression
* @deprecated
*/
protected function exprLimitToRecipient(
IQueryBuilder &$qb, string $recipient, bool $asAuthor = false, array $type = []