@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.

Separate external editor integration from callsigns

Summary: Ref T4245. Pass the whole repository in so it can do something else in a future change.

Test Plan: Loaded changesets in Diffusion.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14931

+15 -15
+1 -1
src/applications/console/plugin/DarkConsoleErrorLogPlugin.php
··· 64 64 $line .= ' called at ['.$entry['file'].':'.$entry['line'].']'; 65 65 try { 66 66 $user = $this->getRequest()->getUser(); 67 - $href = $user->loadEditorLink($entry['file'], $entry['line'], ''); 67 + $href = $user->loadEditorLink($entry['file'], $entry['line'], null); 68 68 } catch (Exception $ex) { 69 69 // The database can be inaccessible. 70 70 }
+1 -2
src/applications/differential/view/DifferentialChangesetListView.php
··· 314 314 $changeset->getAbsoluteRepositoryPath($repository, $this->diff), 315 315 '/'); 316 316 $line = idx($changeset->getMetadata(), 'line:first', 1); 317 - $callsign = $repository->getCallsign(); 318 - $editor_link = $user->loadEditorLink($path, $line, $callsign); 317 + $editor_link = $user->loadEditorLink($path, $line, $repository); 319 318 if ($editor_link) { 320 319 $meta['editor'] = $editor_link; 321 320 } else {
+2 -3
src/applications/diffusion/controller/DiffusionBrowseFileController.php
··· 435 435 $path = $drequest->getPath(); 436 436 $line = nonempty((int)$drequest->getLine(), 1); 437 437 438 - $callsign = $repository->getCallsign(); 439 - $editor_link = $user->loadEditorLink($path, $line, $callsign); 440 - $template = $user->loadEditorLink($path, '%l', $callsign); 438 + $editor_link = $user->loadEditorLink($path, $line, $repository); 439 + $template = $user->loadEditorLink($path, '%l', $repository); 441 440 442 441 $icon_edit = id(new PHUIIconView()) 443 442 ->setIconFont('fa-pencil');
+11 -1
src/applications/people/storage/PhabricatorUser.php
··· 504 504 return $preferences; 505 505 } 506 506 507 - public function loadEditorLink($path, $line, $callsign) { 507 + public function loadEditorLink( 508 + $path, 509 + $line, 510 + PhabricatorRepository $repository = null) { 511 + 508 512 $editor = $this->loadPreferences()->getPreference( 509 513 PhabricatorUserPreferences::PREFERENCE_EDITOR); 510 514 ··· 522 526 523 527 if (!strlen($editor)) { 524 528 return null; 529 + } 530 + 531 + if ($repository) { 532 + $callsign = $repository->getCallsign(); 533 + } else { 534 + $callsign = null; 525 535 } 526 536 527 537 $uri = strtr($editor, array(
-8
src/view/widget/AphrontStackTraceView.php
··· 50 50 if ($file) { 51 51 if (isset($callsigns[$lib])) { 52 52 $attrs = array('title' => $file); 53 - try { 54 - $attrs['href'] = $user->loadEditorLink( 55 - '/src/'.$relative, 56 - $part['line'], 57 - $callsigns[$lib]); 58 - } catch (Exception $ex) { 59 - // The database can be inaccessible. 60 - } 61 53 if (empty($attrs['href'])) { 62 54 $attrs['href'] = sprintf($path, $callsigns[$lib]). 63 55 str_replace(DIRECTORY_SEPARATOR, '/', $relative).