1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-04 12:42:43 +01:00
phorge-phorge/src/applications/settings/setting/PhabricatorEmailSelfActionsSetting.php
epriestley 7ef6c0a523 Modularize all the mail preferences
Summary:
Ref T4103. This isn't completely perfect but should let us move forward without also expanding scope into "too much mail".

I split the existing "Mail Preferences" into two panels: a "Mail Delivery" panel for the EditEngine settings, and a "2000000 dropdowns" panel for the two million dropdowns. This one retains the old code more or less unmodified.

Test Plan:
  - Ran unit tests, which cover most of this stuff.
  - Grepped for all removed constants.
  - Ran migrations, inspected database results.
  - Changed settings in both modified panels.
  - This covers a lot of ground, but anything I missed will hopefully be fairly obvious.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4103

Differential Revision: https://secure.phabricator.com/D16038
2016-06-05 08:50:07 -07:00

40 lines
891 B
PHP

<?php
final class PhabricatorEmailSelfActionsSetting
extends PhabricatorSelectSetting {
const SETTINGKEY = 'self-mail';
const VALUE_SEND_SELF = '0';
const VALUE_NO_SELF = '1';
public function getSettingName() {
return pht('Self Actions');
}
public function getSettingPanelKey() {
return PhabricatorEmailDeliverySettingsPanel::PANELKEY;
}
protected function getSettingOrder() {
return 200;
}
protected function getControlInstructions() {
return pht(
'If you disable **Self Actions**, Phabricator will not notify '.
'you about actions you take.');
}
public function getSettingDefaultValue() {
return self::VALUE_SEND_SELF;
}
protected function getSelectOptions() {
return array(
self::VALUE_SEND_SELF => pht('Enable Self Action Mail'),
self::VALUE_NO_SELF => pht('Disable Self Action Mail'),
);
}
}