Page MenuHomePhabricator

D18619.id44708.diff
No OneTemporary

D18619.id44708.diff

diff --git a/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php b/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php
--- a/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php
+++ b/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php
@@ -10,9 +10,14 @@
}
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 @@
}
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
--- a/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php
+++ b/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php
@@ -10,9 +10,14 @@
}
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() {

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 26, 8:27 AM (10 h, 42 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6927616
Default Alt Text
D18619.id44708.diff (1 KB)

Event Timeline