Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18723428
D14931.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D14931.id.diff
View Options
diff --git a/src/applications/console/plugin/DarkConsoleErrorLogPlugin.php b/src/applications/console/plugin/DarkConsoleErrorLogPlugin.php
--- a/src/applications/console/plugin/DarkConsoleErrorLogPlugin.php
+++ b/src/applications/console/plugin/DarkConsoleErrorLogPlugin.php
@@ -64,7 +64,7 @@
$line .= ' called at ['.$entry['file'].':'.$entry['line'].']';
try {
$user = $this->getRequest()->getUser();
- $href = $user->loadEditorLink($entry['file'], $entry['line'], '');
+ $href = $user->loadEditorLink($entry['file'], $entry['line'], null);
} catch (Exception $ex) {
// The database can be inaccessible.
}
diff --git a/src/applications/differential/view/DifferentialChangesetListView.php b/src/applications/differential/view/DifferentialChangesetListView.php
--- a/src/applications/differential/view/DifferentialChangesetListView.php
+++ b/src/applications/differential/view/DifferentialChangesetListView.php
@@ -314,8 +314,7 @@
$changeset->getAbsoluteRepositoryPath($repository, $this->diff),
'/');
$line = idx($changeset->getMetadata(), 'line:first', 1);
- $callsign = $repository->getCallsign();
- $editor_link = $user->loadEditorLink($path, $line, $callsign);
+ $editor_link = $user->loadEditorLink($path, $line, $repository);
if ($editor_link) {
$meta['editor'] = $editor_link;
} else {
diff --git a/src/applications/diffusion/controller/DiffusionBrowseFileController.php b/src/applications/diffusion/controller/DiffusionBrowseFileController.php
--- a/src/applications/diffusion/controller/DiffusionBrowseFileController.php
+++ b/src/applications/diffusion/controller/DiffusionBrowseFileController.php
@@ -435,9 +435,8 @@
$path = $drequest->getPath();
$line = nonempty((int)$drequest->getLine(), 1);
- $callsign = $repository->getCallsign();
- $editor_link = $user->loadEditorLink($path, $line, $callsign);
- $template = $user->loadEditorLink($path, '%l', $callsign);
+ $editor_link = $user->loadEditorLink($path, $line, $repository);
+ $template = $user->loadEditorLink($path, '%l', $repository);
$icon_edit = id(new PHUIIconView())
->setIconFont('fa-pencil');
diff --git a/src/applications/people/storage/PhabricatorUser.php b/src/applications/people/storage/PhabricatorUser.php
--- a/src/applications/people/storage/PhabricatorUser.php
+++ b/src/applications/people/storage/PhabricatorUser.php
@@ -504,7 +504,11 @@
return $preferences;
}
- public function loadEditorLink($path, $line, $callsign) {
+ public function loadEditorLink(
+ $path,
+ $line,
+ PhabricatorRepository $repository = null) {
+
$editor = $this->loadPreferences()->getPreference(
PhabricatorUserPreferences::PREFERENCE_EDITOR);
@@ -524,6 +528,12 @@
return null;
}
+ if ($repository) {
+ $callsign = $repository->getCallsign();
+ } else {
+ $callsign = null;
+ }
+
$uri = strtr($editor, array(
'%%' => '%',
'%f' => phutil_escape_uri($path),
diff --git a/src/view/widget/AphrontStackTraceView.php b/src/view/widget/AphrontStackTraceView.php
--- a/src/view/widget/AphrontStackTraceView.php
+++ b/src/view/widget/AphrontStackTraceView.php
@@ -50,14 +50,6 @@
if ($file) {
if (isset($callsigns[$lib])) {
$attrs = array('title' => $file);
- try {
- $attrs['href'] = $user->loadEditorLink(
- '/src/'.$relative,
- $part['line'],
- $callsigns[$lib]);
- } catch (Exception $ex) {
- // The database can be inaccessible.
- }
if (empty($attrs['href'])) {
$attrs['href'] = sprintf($path, $callsigns[$lib]).
str_replace(DIRECTORY_SEPARATOR, '/', $relative).
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 1, 12:49 AM (12 h, 24 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8890811
Default Alt Text
D14931.id.diff (3 KB)
Attached To
Mode
D14931: Separate external editor integration from callsigns
Attached
Detach File
Event Timeline
Log In to Comment