Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepositoryCommit.php
Show First 20 Lines • Show All 400 Lines • ▼ Show 20 Lines | /* -( PhabricatorApplicationTransactionInterface )------------------------- */ | ||||
public function getApplicationTransactionTemplate() { | public function getApplicationTransactionTemplate() { | ||||
return new PhabricatorAuditTransaction(); | return new PhabricatorAuditTransaction(); | ||||
} | } | ||||
public function willRenderTimeline( | public function willRenderTimeline( | ||||
PhabricatorApplicationTransactionView $timeline, | PhabricatorApplicationTransactionView $timeline, | ||||
AphrontRequest $request) { | 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); | |||||
} | } | ||||
} | } |