Page MenuHomePhabricator

D19580.id46811.diff
No OneTemporary

D19580.id46811.diff

diff --git a/src/applications/diffusion/controller/DiffusionLastModifiedController.php b/src/applications/diffusion/controller/DiffusionLastModifiedController.php
--- a/src/applications/diffusion/controller/DiffusionLastModifiedController.php
+++ b/src/applications/diffusion/controller/DiffusionLastModifiedController.php
@@ -35,6 +35,7 @@
->withRepository($drequest->getRepository())
->withIdentifiers(array_values($modified_map))
->needCommitData(true)
+ ->needIdentities(true)
->execute();
$commit_map = mpull($commit_map, null, 'getCommitIdentifier');
} else {
@@ -54,9 +55,8 @@
$phids = array();
foreach ($commits as $commit) {
- $data = $commit->getCommitData();
- $phids[] = $data->getCommitDetail('authorPHID');
- $phids[] = $data->getCommitDetail('committerPHID');
+ $phids[] = $commit->getCommitterDisplayPHID();
+ $phids[] = $commit->getAuthorDisplayPHID();
}
$phids = array_filter($phids);
$handles = $this->loadViewerHandles($phids);
@@ -110,38 +110,27 @@
$date = '';
}
- $data = $commit->getCommitData();
- if ($data) {
- $author_phid = $data->getCommitDetail('authorPHID');
- if ($author_phid && isset($handles[$author_phid])) {
- $author = $handles[$author_phid]->renderLink();
- } else {
- $author = DiffusionView::renderName($data->getAuthorName());
- }
-
- $committer = $data->getCommitDetail('committer');
- if ($committer) {
- $committer_phid = $data->getCommitDetail('committerPHID');
- if ($committer_phid && isset($handles[$committer_phid])) {
- $committer = $handles[$committer_phid]->renderLink();
- } else {
- $committer = DiffusionView::renderName($committer);
- }
- if ($author != $committer) {
- $author = hsprintf('%s/%s', $author, $committer);
- }
- }
+ $author = $commit->renderAuthor($viewer, $handles);
+ $committer = $commit->renderCommitter($viewer, $handles);
+ if (is_string($author)) {
+ $author = DiffusionView::renderName($author);
+ }
+ if (is_string($committer)) {
+ $committer = DiffusionView::renderName($committer);
+ }
- $details = DiffusionView::linkDetail(
- $drequest->getRepository(),
- $commit->getCommitIdentifier(),
- $data->getSummary());
- $details = AphrontTableView::renderSingleDisplayLine($details);
- } else {
- $author = '';
- $details = '';
+ if ($author != $committer) {
+ $author = hsprintf('%s/%s', $author, $committer);
}
+ $data = $commit->getCommitData();
+ $details = DiffusionView::linkDetail(
+ $drequest->getRepository(),
+ $commit->getCommitIdentifier(),
+ $data->getSummary());
+ $details = AphrontTableView::renderSingleDisplayLine($details);
+
+
$return = array(
'commit' => $modified,
'date' => $date,

File Metadata

Mime Type
text/plain
Expires
Mon, Oct 6, 7:39 AM (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
12397026
Default Alt Text
D19580.id46811.diff (2 KB)

Event Timeline