1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Remove the "Edit Multiple Files" external editor setting

Summary: Ref T13515. No callsites actually use this, most editors don't support it, it doesn't seem terribly useful for the ones that do, it makes template-based APIs for line-number substitution complicated, and we can probably just loop on `window.open()` anyway.

Test Plan: Grepped for affected symbols, found no more references. Loaded settings page, saw no more setting.

Maniphest Tasks: T13515

Differential Revision: https://secure.phabricator.com/D21142
This commit is contained in:
epriestley 2020-04-18 11:32:17 -07:00
parent 8bdc713352
commit 4168335619
3 changed files with 0 additions and 55 deletions

View file

@ -3274,7 +3274,6 @@ phutil_register_library_map(array(
'PhabricatorEditorExtension' => 'applications/transactions/engineextension/PhabricatorEditorExtension.php',
'PhabricatorEditorExtensionModule' => 'applications/transactions/engineextension/PhabricatorEditorExtensionModule.php',
'PhabricatorEditorMailEngineExtension' => 'applications/transactions/engineextension/PhabricatorEditorMailEngineExtension.php',
'PhabricatorEditorMultipleSetting' => 'applications/settings/setting/PhabricatorEditorMultipleSetting.php',
'PhabricatorEditorSetting' => 'applications/settings/setting/PhabricatorEditorSetting.php',
'PhabricatorElasticFulltextStorageEngine' => 'applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php',
'PhabricatorElasticsearchHost' => 'infrastructure/cluster/search/PhabricatorElasticsearchHost.php',
@ -9735,7 +9734,6 @@ phutil_register_library_map(array(
'PhabricatorEditorExtension' => 'Phobject',
'PhabricatorEditorExtensionModule' => 'PhabricatorConfigModule',
'PhabricatorEditorMailEngineExtension' => 'PhabricatorMailEngineExtension',
'PhabricatorEditorMultipleSetting' => 'PhabricatorSelectSetting',
'PhabricatorEditorSetting' => 'PhabricatorStringSetting',
'PhabricatorElasticFulltextStorageEngine' => 'PhabricatorFulltextStorageEngine',
'PhabricatorElasticsearchHost' => 'PhabricatorSearchHost',

View file

@ -478,19 +478,6 @@ final class PhabricatorUser
$editor = $this->getUserSetting(PhabricatorEditorSetting::SETTINGKEY);
if (is_array($path)) {
$multi_key = PhabricatorEditorMultipleSetting::SETTINGKEY;
$multiedit = $this->getUserSetting($multi_key);
switch ($multiedit) {
case PhabricatorEditorMultipleSetting::VALUE_SPACES:
$path = implode(' ', $path);
break;
case PhabricatorEditorMultipleSetting::VALUE_SINGLE:
default:
return null;
}
}
if (!strlen($editor)) {
return null;
}

View file

@ -1,40 +0,0 @@
<?php
final class PhabricatorEditorMultipleSetting
extends PhabricatorSelectSetting {
const SETTINGKEY = 'multiedit';
const VALUE_SPACES = 'spaces';
const VALUE_SINGLE = 'disable';
public function getSettingName() {
return pht('Edit Multiple Files');
}
public function getSettingPanelKey() {
return PhabricatorExternalEditorSettingsPanel::PANELKEY;
}
protected function getSettingOrder() {
return 400;
}
protected function getControlInstructions() {
return pht(
'Some editors support opening multiple files with a single URI. You '.
'can specify the behavior of your editor here.');
}
public function getSettingDefaultValue() {
return self::VALUE_SPACES;
}
protected function getSelectOptions() {
return array(
self::VALUE_SPACES => pht('Supported, Separated by Spaces'),
self::VALUE_SINGLE => pht('Not Supported'),
);
}
}