Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15446741
D16014.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
D16014.id.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -2145,6 +2145,7 @@
'PhabricatorConfigVersionsModule' => 'applications/config/module/PhabricatorConfigVersionsModule.php',
'PhabricatorConfigWelcomeController' => 'applications/config/controller/PhabricatorConfigWelcomeController.php',
'PhabricatorConpherenceApplication' => 'applications/conpherence/application/PhabricatorConpherenceApplication.php',
+ 'PhabricatorConpherenceNotificationsSetting' => 'applications/settings/setting/PhabricatorConpherenceNotificationsSetting.php',
'PhabricatorConpherencePreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorConpherencePreferencesSettingsPanel.php',
'PhabricatorConpherenceThreadPHIDType' => 'applications/conpherence/phid/PhabricatorConpherenceThreadPHIDType.php',
'PhabricatorConsoleApplication' => 'applications/console/application/PhabricatorConsoleApplication.php',
@@ -6676,6 +6677,7 @@
'PhabricatorConfigVersionsModule' => 'PhabricatorConfigModule',
'PhabricatorConfigWelcomeController' => 'PhabricatorConfigController',
'PhabricatorConpherenceApplication' => 'PhabricatorApplication',
+ 'PhabricatorConpherenceNotificationsSetting' => 'PhabricatorSelectSetting',
'PhabricatorConpherencePreferencesSettingsPanel' => 'PhabricatorSettingsPanel',
'PhabricatorConpherenceThreadPHIDType' => 'PhabricatorPHIDType',
'PhabricatorConsoleApplication' => 'PhabricatorApplication',
diff --git a/src/applications/settings/editor/PhabricatorUserPreferencesEditor.php b/src/applications/settings/editor/PhabricatorUserPreferencesEditor.php
--- a/src/applications/settings/editor/PhabricatorUserPreferencesEditor.php
+++ b/src/applications/settings/editor/PhabricatorUserPreferencesEditor.php
@@ -99,6 +99,12 @@
$actor = $this->getActor();
$settings = PhabricatorSetting::getAllEnabledSettings($actor);
+ foreach ($settings as $key => $setting) {
+ $setting = clone $setting;
+ $setting->setViewer($actor);
+ $settings[$key] = $setting;
+ }
+
switch ($type) {
case PhabricatorUserPreferencesTransaction::TYPE_SETTING:
foreach ($xactions as $xaction) {
diff --git a/src/applications/settings/setting/PhabricatorConpherenceNotificationsSetting.php b/src/applications/settings/setting/PhabricatorConpherenceNotificationsSetting.php
new file mode 100644
--- /dev/null
+++ b/src/applications/settings/setting/PhabricatorConpherenceNotificationsSetting.php
@@ -0,0 +1,31 @@
+<?php
+
+final class PhabricatorConpherenceNotificationsSetting
+ extends PhabricatorSelectSetting {
+
+ const SETTINGKEY = 'conph-notifications';
+
+ const VALUE_CONPHERENCE_EMAIL = '0';
+ const VALUE_CONPHERENCE_NOTIFY = '1';
+
+ public function getSettingName() {
+ return pht('Conpherence Notifications');
+ }
+
+ protected function getControlInstructions() {
+ return pht(
+ 'Choose the default notification behavior for Conpherence rooms.');
+ }
+
+ public function getSettingDefaultValue() {
+ return self::VALUE_CONPHERENCE_EMAIL;
+ }
+
+ protected function getSelectOptions() {
+ return array(
+ self::VALUE_CONPHERENCE_EMAIL => pht('Send Email'),
+ self::VALUE_CONPHERENCE_NOTIFY => pht('Send Notifications'),
+ );
+ }
+
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 28, 8:00 PM (3 d, 21 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7713334
Default Alt Text
D16014.id.diff (3 KB)
Attached To
Mode
D16014: Modularize Conpherence notification preferences
Attached
Detach File
Event Timeline
Log In to Comment