Changeset View
Changeset View
Standalone View
Standalone View
src/applications/feed/query/PhabricatorFeedQuery.php
Show All 28 Lines | final class PhabricatorFeedQuery | ||||
} | } | ||||
protected function loadPage() { | protected function loadPage() { | ||||
// NOTE: We return raw rows from this method, which is a little unusual. | // NOTE: We return raw rows from this method, which is a little unusual. | ||||
return $this->loadStandardPageRows($this->newResultObject()); | return $this->loadStandardPageRows($this->newResultObject()); | ||||
} | } | ||||
protected function willFilterPage(array $data) { | protected function willFilterPage(array $data) { | ||||
return PhabricatorFeedStory::loadAllFromRows($data, $this->getViewer()); | $stories = PhabricatorFeedStory::loadAllFromRows($data, $this->getViewer()); | ||||
foreach ($stories as $key => $story) { | |||||
if (!$story->isVisibleInFeed()) { | |||||
unset($stories[$key]); | |||||
} | |||||
} | |||||
return $stories; | |||||
} | } | ||||
protected function buildJoinClauseParts(AphrontDatabaseConnection $conn) { | protected function buildJoinClauseParts(AphrontDatabaseConnection $conn) { | ||||
$joins = parent::buildJoinClauseParts($conn); | $joins = parent::buildJoinClauseParts($conn); | ||||
// NOTE: We perform this join unconditionally (even if we have no filter | // NOTE: We perform this join unconditionally (even if we have no filter | ||||
// PHIDs) to omit rows which have no story references. These story data | // PHIDs) to omit rows which have no story references. These story data | ||||
// rows are notifications or realtime alerts. | // rows are notifications or realtime alerts. | ||||
▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines |