Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionCommitController.php
Show First 20 Lines • Show All 642 Lines • ▼ Show 20 Lines | private function loadCommitProperties( | ||||
return $props; | return $props; | ||||
} | } | ||||
private function buildComments(PhabricatorRepositoryCommit $commit) { | private function buildComments(PhabricatorRepositoryCommit $commit) { | ||||
$timeline = $this->buildTransactionTimeline( | $timeline = $this->buildTransactionTimeline( | ||||
$commit, | $commit, | ||||
new PhabricatorAuditTransactionQuery()); | new PhabricatorAuditTransactionQuery()); | ||||
$xactions = $timeline->getTransactions(); | $commit->willRenderTimeline($timeline, $this->getRequest()); | ||||
return $timeline; | |||||
$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); | |||||
} | } | ||||
private function renderAddCommentPanel( | private function renderAddCommentPanel( | ||||
PhabricatorRepositoryCommit $commit, | PhabricatorRepositoryCommit $commit, | ||||
array $audit_requests) { | array $audit_requests) { | ||||
assert_instances_of($audit_requests, 'PhabricatorRepositoryAuditRequest'); | assert_instances_of($audit_requests, 'PhabricatorRepositoryAuditRequest'); | ||||
$request = $this->getRequest(); | $request = $this->getRequest(); | ||||
▲ Show 20 Lines • Show All 426 Lines • Show Last 20 Lines |