@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Move notification configuration into PHP

Summary: Bring notification settings to PHP.

Test Plan: Viewed notification settings in /config/.

Reviewers: codeblock, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2255

Differential Revision: https://secure.phabricator.com/D4337

+61
+2
src/__phutil_library_map__.php
··· 942 942 'PhabricatorMySQLFileStorageEngine' => 'applications/files/engine/PhabricatorMySQLFileStorageEngine.php', 943 943 'PhabricatorNotificationBuilder' => 'applications/notification/builder/PhabricatorNotificationBuilder.php', 944 944 'PhabricatorNotificationClearController' => 'applications/notification/controller/PhabricatorNotificationClearController.php', 945 + 'PhabricatorNotificationConfigOptions' => 'applications/config/option/PhabricatorNotificationConfigOptions.php', 945 946 'PhabricatorNotificationController' => 'applications/notification/controller/PhabricatorNotificationController.php', 946 947 'PhabricatorNotificationIndividualController' => 'applications/notification/controller/PhabricatorNotificationIndividualController.php', 947 948 'PhabricatorNotificationListController' => 'applications/notification/controller/PhabricatorNotificationListController.php', ··· 2267 2268 'PhabricatorMySQLConfigOptions' => 'PhabricatorApplicationConfigOptions', 2268 2269 'PhabricatorMySQLFileStorageEngine' => 'PhabricatorFileStorageEngine', 2269 2270 'PhabricatorNotificationClearController' => 'PhabricatorNotificationController', 2271 + 'PhabricatorNotificationConfigOptions' => 'PhabricatorApplicationConfigOptions', 2270 2272 'PhabricatorNotificationController' => 'PhabricatorController', 2271 2273 'PhabricatorNotificationIndividualController' => 'PhabricatorNotificationController', 2272 2274 'PhabricatorNotificationListController' => 'PhabricatorNotificationController',
+59
src/applications/config/option/PhabricatorNotificationConfigOptions.php
··· 1 + <?php 2 + 3 + final class PhabricatorNotificationConfigOptions 4 + extends PhabricatorApplicationConfigOptions { 5 + 6 + public function getName() { 7 + return pht("Notifications"); 8 + } 9 + 10 + public function getDescription() { 11 + return pht("Configure real-time notifications."); 12 + } 13 + 14 + public function getOptions() { 15 + return array( 16 + $this->newOption('notification.enabled', 'bool', false) 17 + ->setOptions( 18 + array( 19 + pht("Disable Real-Time Notifications"), 20 + pht("Enable Real-Time Notifications"), 21 + )) 22 + ->setSummary(pht('Enable real-time notifications.')) 23 + ->setDescription( 24 + pht( 25 + "Enable real-time notifications. You must also run a Node.js ". 26 + "based notification server for this to work. Consult the ". 27 + "documentation in 'Notifications User Guide: Setup and ". 28 + "Configuration' for instructions.")), 29 + $this->newOption( 30 + 'notification.client-uri', 31 + 'string', 32 + 'http://localhost:22280') 33 + ->setDescription(pht('Location of the client server.')), 34 + $this->newOption( 35 + 'notification.server-uri', 36 + 'string', 37 + 'http://localhost:22281') 38 + ->setDescription(pht('Location of the notification receiver server.')), 39 + $this->newOption('notification.user', 'string', null) 40 + ->setSummary(pht('Drop permissions to a less-privileged user.')) 41 + ->setDescription( 42 + pht( 43 + "The notifcation server must be started as root so it can bind ". 44 + "to privileged ports, but if you specify a system user here it ". 45 + "will drop permissions to that user after binding to the ports ". 46 + "it needs.")), 47 + $this->newOption('notification.log', 'string', '/var/log/aphlict.log') 48 + ->setDescription(pht('Location of the server log file.')), 49 + $this->newOption( 50 + 'notification.pidfile', 51 + 'string', 52 + '/var/run/aphlict.pid') 53 + ->setDescription(pht('Location of the server PID file.')), 54 + $this->newOption('notification.debug', 'bool', false) 55 + ->setDescription(pht('Enable debug output in the browser.')), 56 + ); 57 + } 58 + 59 + }