@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+20 -4
+5 -1
src/applications/differential/controller/DifferentialChangesetViewController.php
··· 193 193 ->setViewer($viewer) 194 194 ->withRevisionPHIDs(array($revision->getPHID())); 195 195 $inlines = $query->execute(); 196 - $inlines = $query->adjustInlinesForChangesets($inlines, $old, $new); 196 + $inlines = $query->adjustInlinesForChangesets( 197 + $inlines, 198 + $old, 199 + $new, 200 + $revision); 197 201 } else { 198 202 $inlines = array(); 199 203 }
+5 -1
src/applications/differential/controller/DifferentialRevisionViewController.php
··· 178 178 ->setViewer($user) 179 179 ->withRevisionPHIDs(array($revision->getPHID())); 180 180 $inlines = $query->execute(); 181 - $inlines = $query->adjustInlinesForChangesets($inlines, $old, $new); 181 + $inlines = $query->adjustInlinesForChangesets( 182 + $inlines, 183 + $old, 184 + $new, 185 + $revision); 182 186 183 187 $visible_changesets = array(); 184 188 foreach ($inlines as $inline) {
+8 -1
src/applications/differential/query/DifferentialInlineCommentQuery.php
··· 140 140 public function adjustInlinesForChangesets( 141 141 array $inlines, 142 142 array $old, 143 - array $new) { 143 + array $new, 144 + DifferentialRevision $revision) { 144 145 145 146 assert_instances_of($inlines, 'DifferentialInlineComment'); 146 147 assert_instances_of($old, 'DifferentialChangeset'); ··· 302 303 // If we found a changeset to port this comment to, bring it forward 303 304 // or backward and mark it. 304 305 if ($target_id) { 306 + $diff_id = $changeset->getDiffID(); 307 + $inline_id = $inline->getID(); 308 + $revision_id = $revision->getID(); 309 + $href = "/D{$revision_id}?id={$diff_id}#inline-{$inline_id}"; 310 + 305 311 $inline 306 312 ->makeEphemeral(true) 307 313 ->setChangesetID($target_id) ··· 309 315 array( 310 316 'new' => $is_new, 311 317 'reason' => $reason, 318 + 'href' => $href, 312 319 )); 313 320 314 321 $results[] = $inline;
+2 -1
src/applications/differential/storage/DifferentialRevision.php
··· 531 531 $query->adjustInlinesForChangesets( 532 532 $inlines, 533 533 array_select_keys($changesets, $old_ids), 534 - array_select_keys($changesets, $new_ids)); 534 + array_select_keys($changesets, $new_ids), 535 + $this); 535 536 536 537 return $timeline 537 538 ->setChangesets($changesets)