Page MenuHomePhabricator

D11479.diff
No OneTemporary

D11479.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
@@ -648,27 +648,8 @@
$timeline = $this->buildTransactionTimeline(
$commit,
new PhabricatorAuditTransactionQuery());
- $xactions = $timeline->getTransactions();
-
- $path_ids = array();
- foreach ($xactions as $xaction) {
- if ($xaction->hasComment()) {
- $path_id = $xaction->getComment()->getPathID();
- if ($path_id) {
- $path_ids[] = $path_id;
- }
- }
- }
-
- $path_map = array();
- if ($path_ids) {
- $path_map = id(new DiffusionPathQuery())
- ->withPathIDs($path_ids)
- ->execute();
- $path_map = ipull($path_map, 'path', 'id');
- }
-
- return $timeline->setPathMap($path_map);
+ $commit->willRenderTimeline($timeline, $this->getRequest());
+ return $timeline;
}
private function renderAddCommentPanel(
diff --git a/src/applications/repository/storage/PhabricatorRepositoryCommit.php b/src/applications/repository/storage/PhabricatorRepositoryCommit.php
--- a/src/applications/repository/storage/PhabricatorRepositoryCommit.php
+++ b/src/applications/repository/storage/PhabricatorRepositoryCommit.php
@@ -406,7 +406,27 @@
PhabricatorApplicationTransactionView $timeline,
AphrontRequest $request) {
- return $timeline;
+ $xactions = $timeline->getTransactions();
+
+ $path_ids = array();
+ foreach ($xactions as $xaction) {
+ if ($xaction->hasComment()) {
+ $path_id = $xaction->getComment()->getPathID();
+ if ($path_id) {
+ $path_ids[] = $path_id;
+ }
+ }
+ }
+
+ $path_map = array();
+ if ($path_ids) {
+ $path_map = id(new DiffusionPathQuery())
+ ->withPathIDs($path_ids)
+ ->execute();
+ $path_map = ipull($path_map, 'path', 'id');
+ }
+
+ return $timeline->setPathMap($path_map);
}
}

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 11:17 AM (3 d, 4 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6736126
Default Alt Text
D11479.diff (2 KB)

Event Timeline