Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/search/DifferentialSearchIndexer.php
Show All 37 Lines | protected function buildAbstractDocumentByPHID($phid) { | ||||
$doc->addRelationship( | $doc->addRelationship( | ||||
$rev->isClosed() | $rev->isClosed() | ||||
? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED | ? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED | ||||
: PhabricatorSearchRelationship::RELATIONSHIP_OPEN, | : PhabricatorSearchRelationship::RELATIONSHIP_OPEN, | ||||
$rev->getPHID(), | $rev->getPHID(), | ||||
DifferentialRevisionPHIDType::TYPECONST, | DifferentialRevisionPHIDType::TYPECONST, | ||||
time()); | time()); | ||||
$this->indexTransactions( | |||||
$doc, | |||||
new DifferentialTransactionQuery(), | |||||
array($rev->getPHID())); | |||||
// If a revision needs review, the owners are the reviewers. Otherwise, the | // If a revision needs review, the owners are the reviewers. Otherwise, the | ||||
// owner is the author (e.g., accepted, rejected, closed). | // owner is the author (e.g., accepted, rejected, closed). | ||||
if ($rev->getStatus() == ArcanistDifferentialRevisionStatus::NEEDS_REVIEW) { | if ($rev->getStatus() == ArcanistDifferentialRevisionStatus::NEEDS_REVIEW) { | ||||
$reviewers = $rev->getReviewerStatus(); | $reviewers = $rev->getReviewerStatus(); | ||||
$reviewers = mpull($reviewers, 'getReviewerPHID', 'getReviewerPHID'); | $reviewers = mpull($reviewers, 'getReviewerPHID', 'getReviewerPHID'); | ||||
if ($reviewers) { | if ($reviewers) { | ||||
foreach ($reviewers as $phid) { | foreach ($reviewers as $phid) { | ||||
$doc->addRelationship( | $doc->addRelationship( | ||||
Show All 23 Lines |