From c125ab7a42bf868ff5b164d9a4f1fe3e075db8c9 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 17 Jan 2019 11:52:03 -0800 Subject: [PATCH] Remove "metamta.*.subject-prefix" options Summary: In ~2012, the first of these options was added because someone who hates dogs and works at Asana also hated `[Differential]` in the subject line. The use case there was actually //removing// the text, not changing it, but I made the prefix editable since it seemed like slightly less of a one-off. These options are among the dumbest and most useless config options we have and very rarely used, see T11760. A very small number of instances have configured one of these options. Newer applications stopped providing these options and no one has complained. You can get the same effect with `translation.override`. Although I'm not sure we'll keep that around forever, it's a reasonable replacement today. I'll call out an example in the changelog to help installs that want to preserve this option. If we did want to provide this, it should just be in {nav Applications > Settings} for each application, but I think it's wildly-low-value and "hack via translations" or "local patch" are entirely reasonable if you really want to change these strings. Test Plan: Grepped for `subject-prefix`. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D19993 --- src/__phutil_library_map__.php | 12 ------- .../audit/editor/PhabricatorAuditEditor.php | 2 +- .../PhabricatorExtraConfigSetupCheck.php | 18 +++++++++++ .../config/ConpherenceConfigOptions.php | 32 ------------------- .../conpherence/editor/ConpherenceEditor.php | 2 +- .../PhabricatorDifferentialConfigOptions.php | 5 --- ...alDoorkeeperRevisionFeedStoryPublisher.php | 3 +- .../editor/DifferentialTransactionEditor.php | 2 +- .../mail/DifferentialCreateMailReceiver.php | 3 +- .../PhabricatorDiffusionConfigOptions.php | 5 --- ...sionDoorkeeperCommitFeedStoryPublisher.php | 3 +- .../config/PhabricatorFilesConfigOptions.php | 5 --- .../files/editor/PhabricatorFileEditor.php | 2 +- .../files/mail/FileCreateMailReceiver.php | 3 +- .../PhabricatorLegalpadConfigOptions.php | 32 ------------------- .../editor/LegalpadDocumentEditor.php | 2 +- .../config/PhabricatorMacroConfigOptions.php | 29 ----------------- .../macro/editor/PhabricatorMacroEditor.php | 2 +- .../PhabricatorManiphestConfigOptions.php | 5 --- .../editor/ManiphestTransactionEditor.php | 2 +- .../config/PhabricatorOwnersConfigOptions.php | 2 -- ...bricatorOwnersPackageTransactionEditor.php | 2 +- .../config/PhabricatorPasteConfigOptions.php | 32 ------------------- .../paste/editor/PhabricatorPasteEditor.php | 2 +- .../paste/mail/PasteCreateMailReceiver.php | 3 +- .../config/PhabricatorPholioConfigOptions.php | 29 ----------------- .../pholio/editor/PholioMockEditor.php | 2 +- .../PhabricatorPhrictionConfigOptions.php | 30 ----------------- .../PhabricatorRepositoryPushMailWorker.php | 2 +- 29 files changed, 34 insertions(+), 239 deletions(-) delete mode 100644 src/applications/conpherence/config/ConpherenceConfigOptions.php delete mode 100644 src/applications/legalpad/config/PhabricatorLegalpadConfigOptions.php delete mode 100644 src/applications/macro/config/PhabricatorMacroConfigOptions.php delete mode 100644 src/applications/paste/config/PhabricatorPasteConfigOptions.php delete mode 100644 src/applications/pholio/config/PhabricatorPholioConfigOptions.php delete mode 100644 src/applications/phriction/config/PhabricatorPhrictionConfigOptions.php diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 04631101c4..648a8cd894 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -341,7 +341,6 @@ phutil_register_library_map(array( 'ConduitWildParameterType' => 'applications/conduit/parametertype/ConduitWildParameterType.php', 'ConpherenceColumnViewController' => 'applications/conpherence/controller/ConpherenceColumnViewController.php', 'ConpherenceConduitAPIMethod' => 'applications/conpherence/conduit/ConpherenceConduitAPIMethod.php', - 'ConpherenceConfigOptions' => 'applications/conpherence/config/ConpherenceConfigOptions.php', 'ConpherenceConstants' => 'applications/conpherence/constants/ConpherenceConstants.php', 'ConpherenceController' => 'applications/conpherence/controller/ConpherenceController.php', 'ConpherenceCreateThreadConduitAPIMethod' => 'applications/conpherence/conduit/ConpherenceCreateThreadConduitAPIMethod.php', @@ -3333,7 +3332,6 @@ phutil_register_library_map(array( 'PhabricatorLDAPAuthProvider' => 'applications/auth/provider/PhabricatorLDAPAuthProvider.php', 'PhabricatorLabelProfileMenuItem' => 'applications/search/menuitem/PhabricatorLabelProfileMenuItem.php', 'PhabricatorLegalpadApplication' => 'applications/legalpad/application/PhabricatorLegalpadApplication.php', - 'PhabricatorLegalpadConfigOptions' => 'applications/legalpad/config/PhabricatorLegalpadConfigOptions.php', 'PhabricatorLegalpadDocumentPHIDType' => 'applications/legalpad/phid/PhabricatorLegalpadDocumentPHIDType.php', 'PhabricatorLegalpadSignaturePolicyRule' => 'applications/legalpad/policyrule/PhabricatorLegalpadSignaturePolicyRule.php', 'PhabricatorLibraryTestCase' => '__tests__/PhabricatorLibraryTestCase.php', @@ -3362,7 +3360,6 @@ phutil_register_library_map(array( 'PhabricatorMacroAudioBehaviorTransaction' => 'applications/macro/xaction/PhabricatorMacroAudioBehaviorTransaction.php', 'PhabricatorMacroAudioController' => 'applications/macro/controller/PhabricatorMacroAudioController.php', 'PhabricatorMacroAudioTransaction' => 'applications/macro/xaction/PhabricatorMacroAudioTransaction.php', - 'PhabricatorMacroConfigOptions' => 'applications/macro/config/PhabricatorMacroConfigOptions.php', 'PhabricatorMacroController' => 'applications/macro/controller/PhabricatorMacroController.php', 'PhabricatorMacroDatasource' => 'applications/macro/typeahead/PhabricatorMacroDatasource.php', 'PhabricatorMacroDisableController' => 'applications/macro/controller/PhabricatorMacroDisableController.php', @@ -3766,7 +3763,6 @@ phutil_register_library_map(array( 'PhabricatorPaste' => 'applications/paste/storage/PhabricatorPaste.php', 'PhabricatorPasteApplication' => 'applications/paste/application/PhabricatorPasteApplication.php', 'PhabricatorPasteArchiveController' => 'applications/paste/controller/PhabricatorPasteArchiveController.php', - 'PhabricatorPasteConfigOptions' => 'applications/paste/config/PhabricatorPasteConfigOptions.php', 'PhabricatorPasteContentSearchEngineAttachment' => 'applications/paste/engineextension/PhabricatorPasteContentSearchEngineAttachment.php', 'PhabricatorPasteContentTransaction' => 'applications/paste/xaction/PhabricatorPasteContentTransaction.php', 'PhabricatorPasteController' => 'applications/paste/controller/PhabricatorPasteController.php', @@ -3851,7 +3847,6 @@ phutil_register_library_map(array( 'PhabricatorPhamePostPHIDType' => 'applications/phame/phid/PhabricatorPhamePostPHIDType.php', 'PhabricatorPhluxApplication' => 'applications/phlux/application/PhabricatorPhluxApplication.php', 'PhabricatorPholioApplication' => 'applications/pholio/application/PhabricatorPholioApplication.php', - 'PhabricatorPholioConfigOptions' => 'applications/pholio/config/PhabricatorPholioConfigOptions.php', 'PhabricatorPholioMockTestDataGenerator' => 'applications/pholio/lipsum/PhabricatorPholioMockTestDataGenerator.php', 'PhabricatorPhoneNumber' => 'applications/metamta/message/PhabricatorPhoneNumber.php', 'PhabricatorPhortuneApplication' => 'applications/phortune/application/PhabricatorPhortuneApplication.php', @@ -3862,7 +3857,6 @@ phutil_register_library_map(array( 'PhabricatorPhragmentApplication' => 'applications/phragment/application/PhabricatorPhragmentApplication.php', 'PhabricatorPhrequentApplication' => 'applications/phrequent/application/PhabricatorPhrequentApplication.php', 'PhabricatorPhrictionApplication' => 'applications/phriction/application/PhabricatorPhrictionApplication.php', - 'PhabricatorPhrictionConfigOptions' => 'applications/phriction/config/PhabricatorPhrictionConfigOptions.php', 'PhabricatorPhurlApplication' => 'applications/phurl/application/PhabricatorPhurlApplication.php', 'PhabricatorPhurlConfigOptions' => 'applications/config/option/PhabricatorPhurlConfigOptions.php', 'PhabricatorPhurlController' => 'applications/phurl/controller/PhabricatorPhurlController.php', @@ -5743,7 +5737,6 @@ phutil_register_library_map(array( 'ConduitWildParameterType' => 'ConduitParameterType', 'ConpherenceColumnViewController' => 'ConpherenceController', 'ConpherenceConduitAPIMethod' => 'ConduitAPIMethod', - 'ConpherenceConfigOptions' => 'PhabricatorApplicationConfigOptions', 'ConpherenceConstants' => 'Phobject', 'ConpherenceController' => 'PhabricatorController', 'ConpherenceCreateThreadConduitAPIMethod' => 'ConpherenceConduitAPIMethod', @@ -9172,7 +9165,6 @@ phutil_register_library_map(array( 'PhabricatorLDAPAuthProvider' => 'PhabricatorAuthProvider', 'PhabricatorLabelProfileMenuItem' => 'PhabricatorProfileMenuItem', 'PhabricatorLegalpadApplication' => 'PhabricatorApplication', - 'PhabricatorLegalpadConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorLegalpadDocumentPHIDType' => 'PhabricatorPHIDType', 'PhabricatorLegalpadSignaturePolicyRule' => 'PhabricatorPolicyRule', 'PhabricatorLibraryTestCase' => 'PhutilLibraryTestCase', @@ -9201,7 +9193,6 @@ phutil_register_library_map(array( 'PhabricatorMacroAudioBehaviorTransaction' => 'PhabricatorMacroTransactionType', 'PhabricatorMacroAudioController' => 'PhabricatorMacroController', 'PhabricatorMacroAudioTransaction' => 'PhabricatorMacroTransactionType', - 'PhabricatorMacroConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorMacroController' => 'PhabricatorController', 'PhabricatorMacroDatasource' => 'PhabricatorTypeaheadDatasource', 'PhabricatorMacroDisableController' => 'PhabricatorMacroController', @@ -9688,7 +9679,6 @@ phutil_register_library_map(array( ), 'PhabricatorPasteApplication' => 'PhabricatorApplication', 'PhabricatorPasteArchiveController' => 'PhabricatorPasteController', - 'PhabricatorPasteConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorPasteContentSearchEngineAttachment' => 'PhabricatorSearchEngineAttachment', 'PhabricatorPasteContentTransaction' => 'PhabricatorPasteTransactionType', 'PhabricatorPasteController' => 'PhabricatorController', @@ -9773,7 +9763,6 @@ phutil_register_library_map(array( 'PhabricatorPhamePostPHIDType' => 'PhabricatorPHIDType', 'PhabricatorPhluxApplication' => 'PhabricatorApplication', 'PhabricatorPholioApplication' => 'PhabricatorApplication', - 'PhabricatorPholioConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorPholioMockTestDataGenerator' => 'PhabricatorTestDataGenerator', 'PhabricatorPhoneNumber' => 'Phobject', 'PhabricatorPhortuneApplication' => 'PhabricatorApplication', @@ -9784,7 +9773,6 @@ phutil_register_library_map(array( 'PhabricatorPhragmentApplication' => 'PhabricatorApplication', 'PhabricatorPhrequentApplication' => 'PhabricatorApplication', 'PhabricatorPhrictionApplication' => 'PhabricatorApplication', - 'PhabricatorPhrictionConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorPhurlApplication' => 'PhabricatorApplication', 'PhabricatorPhurlConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorPhurlController' => 'PhabricatorController', diff --git a/src/applications/audit/editor/PhabricatorAuditEditor.php b/src/applications/audit/editor/PhabricatorAuditEditor.php index 1b032b3cf6..d4fa1c32ff 100644 --- a/src/applications/audit/editor/PhabricatorAuditEditor.php +++ b/src/applications/audit/editor/PhabricatorAuditEditor.php @@ -437,7 +437,7 @@ final class PhabricatorAuditEditor } protected function getMailSubjectPrefix() { - return PhabricatorEnv::getEnvConfig('metamta.diffusion.subject-prefix'); + return pht('[Diffusion]'); } protected function getMailThreadID(PhabricatorLiskDAO $object) { diff --git a/src/applications/config/check/PhabricatorExtraConfigSetupCheck.php b/src/applications/config/check/PhabricatorExtraConfigSetupCheck.php index 12b9463166..d5f44c87c8 100644 --- a/src/applications/config/check/PhabricatorExtraConfigSetupCheck.php +++ b/src/applications/config/check/PhabricatorExtraConfigSetupCheck.php @@ -203,6 +203,11 @@ final class PhabricatorExtraConfigSetupCheck extends PhabricatorSetupCheck { $mailers_reason = pht( 'Inbound and outbound mail is now configured with "cluster.mailers".'); + $prefix_reason = pht( + 'Per-application mail subject prefix customization is no longer '. + 'directly supported. Prefixes and other strings may be customized with '. + '"translation.override".'); + $ancient_config += array( 'phid.external-loaders' => pht( @@ -398,6 +403,19 @@ final class PhabricatorExtraConfigSetupCheck extends PhabricatorSetupCheck { 'phabricator.allow-email-users' => pht( 'Public email is now accepted if the associated address has a '. 'default author, and rejected otherwise.'), + + 'metamta.conpherence.subject-prefix' => $prefix_reason, + 'metamta.differential.subject-prefix' => $prefix_reason, + 'metamta.diffusion.subject-prefix' => $prefix_reason, + 'metamta.files.subject-prefix' => $prefix_reason, + 'metamta.legalpad.subject-prefix' => $prefix_reason, + 'metamta.macro.subject-prefix' => $prefix_reason, + 'metamta.maniphest.subject-prefix' => $prefix_reason, + 'metamta.package.subject-prefix' => $prefix_reason, + 'metamta.paste.subject-prefix' => $prefix_reason, + 'metamta.pholio.subject-prefix' => $prefix_reason, + 'metamta.phriction.subject-prefix' => $prefix_reason, + ); return $ancient_config; diff --git a/src/applications/conpherence/config/ConpherenceConfigOptions.php b/src/applications/conpherence/config/ConpherenceConfigOptions.php deleted file mode 100644 index 24e1cb126d..0000000000 --- a/src/applications/conpherence/config/ConpherenceConfigOptions.php +++ /dev/null @@ -1,32 +0,0 @@ -newOption( - 'metamta.conpherence.subject-prefix', - 'string', - '[Conpherence]') - ->setDescription(pht('Subject prefix for Conpherence mail.')), - ); - } - -} diff --git a/src/applications/conpherence/editor/ConpherenceEditor.php b/src/applications/conpherence/editor/ConpherenceEditor.php index 3b4ad09e11..a1d6431d8c 100644 --- a/src/applications/conpherence/editor/ConpherenceEditor.php +++ b/src/applications/conpherence/editor/ConpherenceEditor.php @@ -239,7 +239,7 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor { } protected function getMailSubjectPrefix() { - return PhabricatorEnv::getEnvConfig('metamta.conpherence.subject-prefix'); + return pht('[Conpherence]'); } protected function supportsSearch() { diff --git a/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php b/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php index 0d00207b43..ec2099f8dd 100644 --- a/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php +++ b/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php @@ -228,11 +228,6 @@ EOHELP "\n\n". 'This sort of workflow is very unusual. Very few installs should '. 'need to change this option.')), - $this->newOption( - 'metamta.differential.subject-prefix', - 'string', - '[Differential]') - ->setDescription(pht('Subject prefix for Differential mail.')), $this->newOption( 'metamta.differential.attach-patches', 'bool', diff --git a/src/applications/differential/doorkeeper/DifferentialDoorkeeperRevisionFeedStoryPublisher.php b/src/applications/differential/doorkeeper/DifferentialDoorkeeperRevisionFeedStoryPublisher.php index 59223f20da..3cfe7a7141 100644 --- a/src/applications/differential/doorkeeper/DifferentialDoorkeeperRevisionFeedStoryPublisher.php +++ b/src/applications/differential/doorkeeper/DifferentialDoorkeeperRevisionFeedStoryPublisher.php @@ -81,8 +81,7 @@ final class DifferentialDoorkeeperRevisionFeedStoryPublisher } private function getTitlePrefix(DifferentialRevision $revision) { - $prefix_key = 'metamta.differential.subject-prefix'; - return PhabricatorEnv::getEnvConfig($prefix_key); + return pht('[Differential]'); } } diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php index 8bc1b4d972..a250d5a2a0 100644 --- a/src/applications/differential/editor/DifferentialTransactionEditor.php +++ b/src/applications/differential/editor/DifferentialTransactionEditor.php @@ -563,7 +563,7 @@ final class DifferentialTransactionEditor } protected function getMailSubjectPrefix() { - return PhabricatorEnv::getEnvConfig('metamta.differential.subject-prefix'); + return pht('[Differential]'); } protected function getMailThreadID(PhabricatorLiskDAO $object) { diff --git a/src/applications/differential/mail/DifferentialCreateMailReceiver.php b/src/applications/differential/mail/DifferentialCreateMailReceiver.php index 0d4fd1a2be..a77277e983 100644 --- a/src/applications/differential/mail/DifferentialCreateMailReceiver.php +++ b/src/applications/differential/mail/DifferentialCreateMailReceiver.php @@ -69,8 +69,7 @@ final class DifferentialCreateMailReceiver } } - $subject_prefix = - PhabricatorEnv::getEnvConfig('metamta.differential.subject-prefix'); + $subject_prefix = pht('[Differential]'); if (count($diffs)) { $subject = pht( 'You successfully created %d diff(s).', diff --git a/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php b/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php index d15fb678d5..a0c2277f6e 100644 --- a/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php +++ b/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php @@ -37,11 +37,6 @@ final class PhabricatorDiffusionConfigOptions } return array( - $this->newOption( - 'metamta.diffusion.subject-prefix', - 'string', - '[Diffusion]') - ->setDescription(pht('Subject prefix for Diffusion mail.')), $this->newOption( 'metamta.diffusion.attach-patches', 'bool', diff --git a/src/applications/diffusion/doorkeeper/DiffusionDoorkeeperCommitFeedStoryPublisher.php b/src/applications/diffusion/doorkeeper/DiffusionDoorkeeperCommitFeedStoryPublisher.php index 712b7ae150..088e5dc71a 100644 --- a/src/applications/diffusion/doorkeeper/DiffusionDoorkeeperCommitFeedStoryPublisher.php +++ b/src/applications/diffusion/doorkeeper/DiffusionDoorkeeperCommitFeedStoryPublisher.php @@ -172,8 +172,7 @@ final class DiffusionDoorkeeperCommitFeedStoryPublisher } private function getTitlePrefix(PhabricatorRepositoryCommit $commit) { - $prefix_key = 'metamta.diffusion.subject-prefix'; - return PhabricatorEnv::getEnvConfig($prefix_key); + return pht('[Diffusion]'); } } diff --git a/src/applications/files/config/PhabricatorFilesConfigOptions.php b/src/applications/files/config/PhabricatorFilesConfigOptions.php index 751a06ffdb..735ddfcb0d 100644 --- a/src/applications/files/config/PhabricatorFilesConfigOptions.php +++ b/src/applications/files/config/PhabricatorFilesConfigOptions.php @@ -197,11 +197,6 @@ final class PhabricatorFilesConfigOptions "Set this to a valid Amazon S3 bucket to store files there. You ". "must also configure S3 access keys in the 'Amazon Web Services' ". "group.")), - $this->newOption( - 'metamta.files.subject-prefix', - 'string', - '[File]') - ->setDescription(pht('Subject prefix for Files email.')), $this->newOption('files.enable-imagemagick', 'bool', false) ->setBoolOptions( array( diff --git a/src/applications/files/editor/PhabricatorFileEditor.php b/src/applications/files/editor/PhabricatorFileEditor.php index db974cec65..91d168e68d 100644 --- a/src/applications/files/editor/PhabricatorFileEditor.php +++ b/src/applications/files/editor/PhabricatorFileEditor.php @@ -27,7 +27,7 @@ final class PhabricatorFileEditor } protected function getMailSubjectPrefix() { - return PhabricatorEnv::getEnvConfig('metamta.files.subject-prefix'); + return pht('[File]'); } protected function getMailTo(PhabricatorLiskDAO $object) { diff --git a/src/applications/files/mail/FileCreateMailReceiver.php b/src/applications/files/mail/FileCreateMailReceiver.php index fe314f1f0a..f3f31d9130 100644 --- a/src/applications/files/mail/FileCreateMailReceiver.php +++ b/src/applications/files/mail/FileCreateMailReceiver.php @@ -33,8 +33,7 @@ final class FileCreateMailReceiver } else { $subject = pht('You successfully uploaded a file.'); } - $subject_prefix = - PhabricatorEnv::getEnvConfig('metamta.files.subject-prefix'); + $subject_prefix = pht('[File]'); $file_uris = array(); foreach ($attachment_phids as $phid) { diff --git a/src/applications/legalpad/config/PhabricatorLegalpadConfigOptions.php b/src/applications/legalpad/config/PhabricatorLegalpadConfigOptions.php deleted file mode 100644 index a9584fc94b..0000000000 --- a/src/applications/legalpad/config/PhabricatorLegalpadConfigOptions.php +++ /dev/null @@ -1,32 +0,0 @@ -newOption( - 'metamta.legalpad.subject-prefix', - 'string', - '[Legalpad]') - ->setDescription(pht('Subject prefix for Legalpad email.')), - ); - } - -} diff --git a/src/applications/legalpad/editor/LegalpadDocumentEditor.php b/src/applications/legalpad/editor/LegalpadDocumentEditor.php index e4b43186ee..4ede196e39 100644 --- a/src/applications/legalpad/editor/LegalpadDocumentEditor.php +++ b/src/applications/legalpad/editor/LegalpadDocumentEditor.php @@ -166,7 +166,7 @@ final class LegalpadDocumentEditor } protected function getMailSubjectPrefix() { - return PhabricatorEnv::getEnvConfig('metamta.legalpad.subject-prefix'); + return pht('[Legalpad]'); } diff --git a/src/applications/macro/config/PhabricatorMacroConfigOptions.php b/src/applications/macro/config/PhabricatorMacroConfigOptions.php deleted file mode 100644 index 2cb01ff29f..0000000000 --- a/src/applications/macro/config/PhabricatorMacroConfigOptions.php +++ /dev/null @@ -1,29 +0,0 @@ -newOption('metamta.macro.subject-prefix', 'string', '[Macro]') - ->setDescription(pht('Subject prefix for Macro email.')), - ); - } - -} diff --git a/src/applications/macro/editor/PhabricatorMacroEditor.php b/src/applications/macro/editor/PhabricatorMacroEditor.php index f59c29b426..91ed23a259 100644 --- a/src/applications/macro/editor/PhabricatorMacroEditor.php +++ b/src/applications/macro/editor/PhabricatorMacroEditor.php @@ -57,7 +57,7 @@ final class PhabricatorMacroEditor } protected function getMailSubjectPrefix() { - return PhabricatorEnv::getEnvConfig('metamta.macro.subject-prefix'); + return pht('[Macro]'); } protected function shouldPublishFeedStory( diff --git a/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php b/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php index c5527aa485..8f2830908b 100644 --- a/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php +++ b/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php @@ -459,11 +459,6 @@ EOTEXT '%s configuration option. The default value (`90`) '. 'corresponds to the default "Needs Triage" priority.', 'maniphest.priorities')), - $this->newOption( - 'metamta.maniphest.subject-prefix', - 'string', - '[Maniphest]') - ->setDescription(pht('Subject prefix for Maniphest mail.')), $this->newOption('maniphest.points', $points_type, array()) ->setSummary(pht('Configure point values for tasks.')) ->setDescription($points_description) diff --git a/src/applications/maniphest/editor/ManiphestTransactionEditor.php b/src/applications/maniphest/editor/ManiphestTransactionEditor.php index 47a6b1b4f2..0722e0e27a 100644 --- a/src/applications/maniphest/editor/ManiphestTransactionEditor.php +++ b/src/applications/maniphest/editor/ManiphestTransactionEditor.php @@ -155,7 +155,7 @@ final class ManiphestTransactionEditor } protected function getMailSubjectPrefix() { - return PhabricatorEnv::getEnvConfig('metamta.maniphest.subject-prefix'); + return pht('[Maniphest]'); } protected function getMailThreadID(PhabricatorLiskDAO $object) { diff --git a/src/applications/owners/config/PhabricatorOwnersConfigOptions.php b/src/applications/owners/config/PhabricatorOwnersConfigOptions.php index 0f827672b7..330d465f3c 100644 --- a/src/applications/owners/config/PhabricatorOwnersConfigOptions.php +++ b/src/applications/owners/config/PhabricatorOwnersConfigOptions.php @@ -36,8 +36,6 @@ final class PhabricatorOwnersConfigOptions $fields_example = id(new PhutilJSON())->encodeFormatted($fields_example); return array( - $this->newOption('metamta.package.subject-prefix', 'string', '[Package]') - ->setDescription(pht('Subject prefix for Owners email.')), $this->newOption('owners.fields', $custom_field_type, $default_fields) ->setCustomData($field_base_class) ->setDescription(pht('Select and reorder package fields.')), diff --git a/src/applications/owners/editor/PhabricatorOwnersPackageTransactionEditor.php b/src/applications/owners/editor/PhabricatorOwnersPackageTransactionEditor.php index c6aad6e2bd..8885872706 100644 --- a/src/applications/owners/editor/PhabricatorOwnersPackageTransactionEditor.php +++ b/src/applications/owners/editor/PhabricatorOwnersPackageTransactionEditor.php @@ -27,7 +27,7 @@ final class PhabricatorOwnersPackageTransactionEditor } protected function getMailSubjectPrefix() { - return PhabricatorEnv::getEnvConfig('metamta.package.subject-prefix'); + return pht('[Package]'); } protected function getMailTo(PhabricatorLiskDAO $object) { diff --git a/src/applications/paste/config/PhabricatorPasteConfigOptions.php b/src/applications/paste/config/PhabricatorPasteConfigOptions.php deleted file mode 100644 index 15b32eeb04..0000000000 --- a/src/applications/paste/config/PhabricatorPasteConfigOptions.php +++ /dev/null @@ -1,32 +0,0 @@ -newOption( - 'metamta.paste.subject-prefix', - 'string', - '[Paste]') - ->setDescription(pht('Subject prefix for Paste email.')), - ); - } - -} diff --git a/src/applications/paste/editor/PhabricatorPasteEditor.php b/src/applications/paste/editor/PhabricatorPasteEditor.php index c312915727..76ade878c4 100644 --- a/src/applications/paste/editor/PhabricatorPasteEditor.php +++ b/src/applications/paste/editor/PhabricatorPasteEditor.php @@ -41,7 +41,7 @@ final class PhabricatorPasteEditor } protected function getMailSubjectPrefix() { - return PhabricatorEnv::getEnvConfig('metamta.paste.subject-prefix'); + return pht('[Paste]'); } protected function getMailTo(PhabricatorLiskDAO $object) { diff --git a/src/applications/paste/mail/PasteCreateMailReceiver.php b/src/applications/paste/mail/PasteCreateMailReceiver.php index 844c5f1acc..5562858b8e 100644 --- a/src/applications/paste/mail/PasteCreateMailReceiver.php +++ b/src/applications/paste/mail/PasteCreateMailReceiver.php @@ -44,8 +44,7 @@ final class PasteCreateMailReceiver return; } - $subject_prefix = - PhabricatorEnv::getEnvConfig('metamta.paste.subject-prefix'); + $subject_prefix = pht('[Paste]'); $subject = pht('You successfully created a paste.'); $paste_uri = PhabricatorEnv::getProductionURI($paste->getURI()); $body = new PhabricatorMetaMTAMailBody(); diff --git a/src/applications/pholio/config/PhabricatorPholioConfigOptions.php b/src/applications/pholio/config/PhabricatorPholioConfigOptions.php deleted file mode 100644 index 30bea98554..0000000000 --- a/src/applications/pholio/config/PhabricatorPholioConfigOptions.php +++ /dev/null @@ -1,29 +0,0 @@ -newOption('metamta.pholio.subject-prefix', 'string', '[Pholio]') - ->setDescription(pht('Subject prefix for Pholio email.')), - ); - } - -} diff --git a/src/applications/pholio/editor/PholioMockEditor.php b/src/applications/pholio/editor/PholioMockEditor.php index 7f4d589934..df5d55672c 100644 --- a/src/applications/pholio/editor/PholioMockEditor.php +++ b/src/applications/pholio/editor/PholioMockEditor.php @@ -139,7 +139,7 @@ final class PholioMockEditor extends PhabricatorApplicationTransactionEditor { } protected function getMailSubjectPrefix() { - return PhabricatorEnv::getEnvConfig('metamta.pholio.subject-prefix'); + return pht('[Pholio]'); } public function getMailTagsMap() { diff --git a/src/applications/phriction/config/PhabricatorPhrictionConfigOptions.php b/src/applications/phriction/config/PhabricatorPhrictionConfigOptions.php deleted file mode 100644 index 9fada90d3a..0000000000 --- a/src/applications/phriction/config/PhabricatorPhrictionConfigOptions.php +++ /dev/null @@ -1,30 +0,0 @@ -newOption( - 'metamta.phriction.subject-prefix', 'string', '[Phriction]') - ->setDescription(pht('Subject prefix for Phriction email.')), - ); - } - -} diff --git a/src/applications/repository/worker/PhabricatorRepositoryPushMailWorker.php b/src/applications/repository/worker/PhabricatorRepositoryPushMailWorker.php index 554c2cf772..7459073ca8 100644 --- a/src/applications/repository/worker/PhabricatorRepositoryPushMailWorker.php +++ b/src/applications/repository/worker/PhabricatorRepositoryPushMailWorker.php @@ -99,7 +99,7 @@ final class PhabricatorRepositoryPushMailWorker $body->addTextSection(pht('REFERENCES'), implode("\n", $ref_lines)); } - $prefix = PhabricatorEnv::getEnvConfig('metamta.diffusion.subject-prefix'); + $prefix = pht('[Diffusion]'); $parts = array(); if ($commit_count) { -- 2.51.2