Page MenuHomePhabricator

D19492.id46616.diff
No OneTemporary

D19492.id46616.diff

diff --git a/src/applications/diffusion/controller/DiffusionCommitController.php b/src/applications/diffusion/controller/DiffusionCommitController.php
--- a/src/applications/diffusion/controller/DiffusionCommitController.php
+++ b/src/applications/diffusion/controller/DiffusionCommitController.php
@@ -45,6 +45,7 @@
->withIdentifiers(array($commit_identifier))
->needCommitData(true)
->needAuditRequests(true)
+ ->needIdentities(true)
->setLimit(100)
->execute();
@@ -716,27 +717,24 @@
return null;
}
- $author_phid = $data->getCommitDetail('authorPHID');
- $author_name = $data->getAuthorName();
+ $author_identity = $commit->getAuthorIdentity();
$author_epoch = $data->getCommitDetail('authorEpoch');
$date = null;
if ($author_epoch !== null) {
$date = phabricator_datetime($author_epoch, $viewer);
}
- if ($author_phid) {
- $handles = $viewer->loadHandles(array($author_phid));
- $image_uri = $handles[$author_phid]->getImageURI();
- $image_href = $handles[$author_phid]->getURI();
- $author = $handles[$author_phid]->renderLink();
- } else if (strlen($author_name)) {
- $author = $author_name;
- $image_uri = null;
- $image_href = null;
+ if ($author_identity->hasEffectiveUser()) {
+ $author_phid = $author_identity->getCurrentEffectiveUserPHID();
} else {
- return null;
+ $author_phid = $author_identity->getPHID();
}
+ $handles = $viewer->loadHandles(array($author_phid));
+ $image_uri = $handles[$author_phid]->getImageURI();
+ $image_href = $handles[$author_phid]->getURI();
+ $author = $handles[$author_phid]->renderLink();
+
$author = phutil_tag('strong', array(), $author);
if ($date) {
$content = pht('Authored by %s on %s.', $author, $date);
@@ -748,10 +746,8 @@
->setImage($image_uri)
->setImageHref($image_href)
->setContent($content);
-
}
-
private function buildComments(PhabricatorRepositoryCommit $commit) {
$timeline = $this->buildTransactionTimeline(
$commit,

File Metadata

Mime Type
text/plain
Expires
Jul 14 2025, 1:31 PM (14 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8447094
Default Alt Text
D19492.id46616.diff (2 KB)

Event Timeline