mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 21:32:43 +01:00
Fix two issues with Differential Transactions
Summary: With symbols, the transactions fataled on `getID()`. Also my line number sorting was a bit goofy. Auditors: btrahan
This commit is contained in:
parent
0159315763
commit
ee38e33496
2 changed files with 20 additions and 2 deletions
|
@ -262,11 +262,19 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
$revision,
|
||||
$changesets);
|
||||
|
||||
$wrap_id = celerity_generate_unique_node_id();
|
||||
$comment_view = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'id' => $wrap_id,
|
||||
),
|
||||
$comment_view);
|
||||
|
||||
if ($arc_project) {
|
||||
Javelin::initBehavior(
|
||||
'repository-crossreference',
|
||||
array(
|
||||
'section' => $comment_view->getID(),
|
||||
'section' => $wrap_id,
|
||||
'projects' => $project_phids,
|
||||
));
|
||||
}
|
||||
|
|
|
@ -96,7 +96,17 @@ final class DifferentialTransactionView
|
|||
array_keys($changesets));
|
||||
|
||||
foreach ($inline_groups as $changeset_id => $group) {
|
||||
$group = msort($group, 'getLineNumber');
|
||||
// Sort the group of inlines by line number.
|
||||
$by_line = array();
|
||||
foreach ($group as $inline) {
|
||||
$by_line[] = array(
|
||||
'line' => $inline->getComment()->getLineNumber().','.
|
||||
$inline->getComment()->getLineLength(),
|
||||
'inline' => $inline,
|
||||
);
|
||||
}
|
||||
$by_line = isort($by_line, 'line');
|
||||
$group = ipull($by_line, 'inline');
|
||||
|
||||
$changeset = $changesets[$changeset_id];
|
||||
$items = array();
|
||||
|
|
Loading…
Reference in a new issue