Differential D18339 Diff 44158 src/applications/differential/search/DifferentialRevisionFulltextEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/search/DifferentialRevisionFulltextEngine.php
| Show All 28 Lines | $document->addRelationship( | ||||
| ? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED | ? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED | ||||
| : PhabricatorSearchRelationship::RELATIONSHIP_OPEN, | : PhabricatorSearchRelationship::RELATIONSHIP_OPEN, | ||||
| $revision->getPHID(), | $revision->getPHID(), | ||||
| DifferentialRevisionPHIDType::TYPECONST, | DifferentialRevisionPHIDType::TYPECONST, | ||||
| PhabricatorTime::getNow()); | PhabricatorTime::getNow()); | ||||
| // 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). | ||||
| $status_review = ArcanistDifferentialRevisionStatus::NEEDS_REVIEW; | if ($revision->isNeedsReview()) { | ||||
| if ($revision->getStatus() == $status_review) { | |||||
| $reviewers = $revision->getReviewerPHIDs(); | $reviewers = $revision->getReviewerPHIDs(); | ||||
| $reviewers = array_fuse($reviewers); | $reviewers = array_fuse($reviewers); | ||||
| if ($reviewers) { | if ($reviewers) { | ||||
| foreach ($reviewers as $phid) { | foreach ($reviewers as $phid) { | ||||
| $document->addRelationship( | $document->addRelationship( | ||||
| PhabricatorSearchRelationship::RELATIONSHIP_OWNER, | PhabricatorSearchRelationship::RELATIONSHIP_OWNER, | ||||
| $phid, | $phid, | ||||
| Show All 19 Lines | |||||