diff --git a/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php b/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php index bec1e2a66c..e484a66ce6 100644 --- a/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php +++ b/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php @@ -10,9 +10,14 @@ final class DifferentialDiffAuthorProjectsHeraldField } public function getHeraldFieldValue($object) { - return PhabricatorEdgeQuery::loadDestinationPHIDs( - $object->getAuthorPHID(), - PhabricatorProjectMemberOfProjectEdgeType::EDGECONST); + $viewer = PhabricatorUser::getOmnipotentUser(); + + $projects = id(new PhabricatorProjectQuery()) + ->setViewer($viewer) + ->withMemberPHIDs(array($object->getAuthorPHID())) + ->execute(); + + return mpull($projects, 'getPHID'); } protected function getHeraldFieldStandardType() { @@ -20,7 +25,7 @@ final class DifferentialDiffAuthorProjectsHeraldField } protected function getDatasource() { - return new PhabricatorProjectOrUserDatasource(); + return new PhabricatorProjectDatasource(); } } diff --git a/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php b/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php index cb916fcf3d..bd91e810b2 100644 --- a/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php @@ -10,9 +10,14 @@ final class DifferentialRevisionAuthorProjectsHeraldField } public function getHeraldFieldValue($object) { - return PhabricatorEdgeQuery::loadDestinationPHIDs( - $object->getAuthorPHID(), - PhabricatorProjectMemberOfProjectEdgeType::EDGECONST); + $viewer = PhabricatorUser::getOmnipotentUser(); + + $projects = id(new PhabricatorProjectQuery()) + ->setViewer($viewer) + ->withMemberPHIDs(array($object->getAuthorPHID())) + ->execute(); + + return mpull($projects, 'getPHID'); } protected function getHeraldFieldStandardType() {