Provide link to inlines in-context in $ghost['href']
Summary: See D12702. Test Plan: Made something a link and clicked it, seemed to work OK. Reviewers: chad Reviewed By: chad Subscribers: yelirekim, epriestley Differential Revision: https://secure.phabricator.com/D12703
This commit is contained in:
@@ -140,7 +140,8 @@ final class DifferentialInlineCommentQuery
|
||||
public function adjustInlinesForChangesets(
|
||||
array $inlines,
|
||||
array $old,
|
||||
array $new) {
|
||||
array $new,
|
||||
DifferentialRevision $revision) {
|
||||
|
||||
assert_instances_of($inlines, 'DifferentialInlineComment');
|
||||
assert_instances_of($old, 'DifferentialChangeset');
|
||||
@@ -302,6 +303,11 @@ final class DifferentialInlineCommentQuery
|
||||
// If we found a changeset to port this comment to, bring it forward
|
||||
// or backward and mark it.
|
||||
if ($target_id) {
|
||||
$diff_id = $changeset->getDiffID();
|
||||
$inline_id = $inline->getID();
|
||||
$revision_id = $revision->getID();
|
||||
$href = "/D{$revision_id}?id={$diff_id}#inline-{$inline_id}";
|
||||
|
||||
$inline
|
||||
->makeEphemeral(true)
|
||||
->setChangesetID($target_id)
|
||||
@@ -309,6 +315,7 @@ final class DifferentialInlineCommentQuery
|
||||
array(
|
||||
'new' => $is_new,
|
||||
'reason' => $reason,
|
||||
'href' => $href,
|
||||
));
|
||||
|
||||
$results[] = $inline;
|
||||
|
||||
Reference in New Issue
Block a user