Remove "re prefix" and "vary subjects" config
Summary: Ref T11098. There is no reason to maintain these as separate values now that they can be configured in global settings. Test Plan: - Hit and read setup issue. - Fiddled with settings. - I'll vet this more throughly in the next diff since I need to fix an issue with global defaults in mail and can explicitly test this at the same time. Reviewers: chad Reviewed By: chad Subscribers: eadler Maniphest Tasks: T11098 Differential Revision: https://secure.phabricator.com/D16117
This commit is contained in:
		| @@ -190,6 +190,10 @@ final class PhabricatorExtraConfigSetupCheck extends PhabricatorSetupCheck { | |||||||
|       'The Differential revision list view age UI elements have been removed '. |       'The Differential revision list view age UI elements have been removed '. | ||||||
|       'to simplify the interface.'); |       'to simplify the interface.'); | ||||||
|  |  | ||||||
|  |     $global_settings_reason = pht( | ||||||
|  |       'The "Re: Prefix" and "Vary Subjects" settings are now configured '. | ||||||
|  |       'in global settings.'); | ||||||
|  |  | ||||||
|     $ancient_config += array( |     $ancient_config += array( | ||||||
|       'phid.external-loaders' => |       'phid.external-loaders' => | ||||||
|         pht( |         pht( | ||||||
| @@ -321,6 +325,9 @@ final class PhabricatorExtraConfigSetupCheck extends PhabricatorSetupCheck { | |||||||
|  |  | ||||||
|       'differential.days-fresh' => $stale_reason, |       'differential.days-fresh' => $stale_reason, | ||||||
|       'differential.days-stale' => $stale_reason, |       'differential.days-stale' => $stale_reason, | ||||||
|  |  | ||||||
|  |       'metamta.re-prefix' => $global_settings_reason, | ||||||
|  |       'metamta.vary-subjects' => $global_settings_reason, | ||||||
|     ); |     ); | ||||||
|  |  | ||||||
|     return $ancient_config; |     return $ancient_config; | ||||||
|   | |||||||
| @@ -276,22 +276,6 @@ EODOC | |||||||
|           )) |           )) | ||||||
|         ->setSummary(pht('Show email preferences link in email.')) |         ->setSummary(pht('Show email preferences link in email.')) | ||||||
|         ->setDescription($email_preferences_description), |         ->setDescription($email_preferences_description), | ||||||
|       $this->newOption('metamta.re-prefix', 'bool', false) |  | ||||||
|         ->setBoolOptions( |  | ||||||
|           array( |  | ||||||
|             pht('Force "Re:" Subject Prefix'), |  | ||||||
|             pht('No "Re:" Subject Prefix'), |  | ||||||
|           )) |  | ||||||
|         ->setSummary(pht('Control "Re:" subject prefix, for Mail.app.')) |  | ||||||
|         ->setDescription($re_prefix_description), |  | ||||||
|       $this->newOption('metamta.vary-subjects', 'bool', true) |  | ||||||
|         ->setBoolOptions( |  | ||||||
|           array( |  | ||||||
|             pht('Allow Varied Subjects'), |  | ||||||
|             pht('Always Use the Same Thread Subject'), |  | ||||||
|           )) |  | ||||||
|         ->setSummary(pht('Control subject variance, for some mail clients.')) |  | ||||||
|         ->setDescription($vary_subjects_description), |  | ||||||
|       $this->newOption('metamta.insecure-auth-with-reply-to', 'bool', false) |       $this->newOption('metamta.insecure-auth-with-reply-to', 'bool', false) | ||||||
|         ->setBoolOptions( |         ->setBoolOptions( | ||||||
|           array( |           array( | ||||||
|   | |||||||
| @@ -1131,27 +1131,16 @@ final class PhabricatorMetaMTAMail | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   private function shouldAddRePrefix(PhabricatorUserPreferences $preferences) { |   private function shouldAddRePrefix(PhabricatorUserPreferences $preferences) { | ||||||
|     $default_value = PhabricatorEnv::getEnvConfig('metamta.re-prefix'); |     $value = $preferences->getSettingValue( | ||||||
|  |  | ||||||
|     $value = $preferences->getPreference( |  | ||||||
|       PhabricatorEmailRePrefixSetting::SETTINGKEY); |       PhabricatorEmailRePrefixSetting::SETTINGKEY); | ||||||
|     if ($value === null) { |  | ||||||
|       return $default_value; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     return ($value == PhabricatorEmailRePrefixSetting::VALUE_RE_PREFIX); |     return ($value == PhabricatorEmailRePrefixSetting::VALUE_RE_PREFIX); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   private function shouldVarySubject(PhabricatorUserPreferences $preferences) { |   private function shouldVarySubject(PhabricatorUserPreferences $preferences) { | ||||||
|     $default_value = PhabricatorEnv::getEnvConfig('metamta.vary-subjects'); |     $value = $preferences->getSettingValue( | ||||||
|  |  | ||||||
|     $value = $preferences->getPreference( |  | ||||||
|       PhabricatorEmailVarySubjectsSetting::SETTINGKEY); |       PhabricatorEmailVarySubjectsSetting::SETTINGKEY); | ||||||
|  |  | ||||||
|     if ($value === null) { |  | ||||||
|       return $default_value; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     return ($value == PhabricatorEmailVarySubjectsSetting::VALUE_VARY_SUBJECTS); |     return ($value == PhabricatorEmailVarySubjectsSetting::VALUE_VARY_SUBJECTS); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -39,7 +39,7 @@ final class PhabricatorEmailRePrefixSetting | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   public function getSettingDefaultValue() { |   public function getSettingDefaultValue() { | ||||||
|     return self::VALUE_RE_PREFIX; |     return self::VALUE_NO_PREFIX; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   protected function getSelectOptions() { |   protected function getSelectOptions() { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 epriestley
					epriestley