Page MenuHomePhorge

No OneTemporary

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
@@ -1,26 +1,31 @@
<?php
final class DifferentialDiffAuthorProjectsHeraldField
extends DifferentialDiffHeraldField {
const FIELDCONST = 'differential.diff.author.projects';
public function getHeraldFieldName() {
return pht("Author's projects");
}
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() {
return self::STANDARD_PHID_LIST;
}
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
@@ -1,26 +1,31 @@
<?php
final class DifferentialRevisionAuthorProjectsHeraldField
extends DifferentialRevisionHeraldField {
const FIELDCONST = 'differential.revision.author.projects';
public function getHeraldFieldName() {
return pht("Author's projects");
}
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() {
return self::STANDARD_PHID_LIST;
}
protected function getDatasource() {
return new PhabricatorProjectDatasource();
}
}

File Metadata

Mime Type
text/x-diff
Expires
Sun, Jan 19, 17:53 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127167
Default Alt Text
(2 KB)

Event Timeline