Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18601096
D19492.id46616.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D19492.id46616.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sep 14 2025, 11:30 AM (6 w, 4 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8447094
Default Alt Text
D19492.id46616.diff (2 KB)
Attached To
Mode
D19492: Start changing DiffusionCommitController to use identities
Attached
Detach File
Event Timeline
Log In to Comment