Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/option/PhabricatorCoreConfigOptions.php
| Show All 31 Lines | public function getOptions() { | ||||
| $path = getenv('PATH'); | $path = getenv('PATH'); | ||||
| $proto_doc_href = PhabricatorEnv::getDoclink( | $proto_doc_href = PhabricatorEnv::getDoclink( | ||||
| 'User Guide: Prototype Applications'); | 'User Guide: Prototype Applications'); | ||||
| $proto_doc_name = pht('User Guide: Prototype Applications'); | $proto_doc_name = pht('User Guide: Prototype Applications'); | ||||
| $applications_app_href = '/applications/'; | $applications_app_href = '/applications/'; | ||||
| $silent_description = $this->deformat(pht(<<<EOREMARKUP | |||||
| This option allows you to stop Phabricator from sending data to most external | |||||
| services: it will disable email, SMS, repository mirroring, remote builds, | |||||
| Doorkeeper writes, and webhooks. | |||||
| This option is intended to allow a Phabricator instance to be exported, copied, | |||||
| imported, and run in a test environment without impacting users. For example, | |||||
| if you are migrating to new hardware, you could perform a test migration first | |||||
| with this flag set, make sure things work, and then do a production cutover | |||||
| later with higher confidence and less disruption. | |||||
| Without making use of this flag to silence the temporary test environment, | |||||
| users would receive duplicate email during the time the test instance and old | |||||
| production instance were both in operation. | |||||
| EOREMARKUP | |||||
| )); | |||||
| return array( | return array( | ||||
| $this->newOption('phabricator.base-uri', 'string', null) | $this->newOption('phabricator.base-uri', 'string', null) | ||||
| ->setLocked(true) | ->setLocked(true) | ||||
| ->setSummary(pht('URI where Phabricator is installed.')) | ->setSummary(pht('URI where Phabricator is installed.')) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| 'Set the URI where Phabricator is installed. Setting this '. | 'Set the URI where Phabricator is installed. Setting this '. | ||||
| 'improves security by preventing cookies from being set on other '. | 'improves security by preventing cookies from being set on other '. | ||||
| ▲ Show 20 Lines • Show All 179 Lines • ▼ Show 20 Lines | return array( | ||||
| $this->newOption('phabricator.silent', 'bool', false) | $this->newOption('phabricator.silent', 'bool', false) | ||||
| ->setLocked(true) | ->setLocked(true) | ||||
| ->setBoolOptions( | ->setBoolOptions( | ||||
| array( | array( | ||||
| pht('Run Silently'), | pht('Run Silently'), | ||||
| pht('Run Normally'), | pht('Run Normally'), | ||||
| )) | )) | ||||
| ->setSummary(pht('Stop Phabricator from sending any email, etc.')) | ->setSummary(pht('Stop Phabricator from sending any email, etc.')) | ||||
| ->setDescription( | ->setDescription($silent_description), | ||||
| pht( | |||||
| 'This option allows you to stop Phabricator from sending '. | |||||
| 'any data to external services. Among other things, it will '. | |||||
| 'disable email, SMS, repository mirroring, and HTTP hooks.'. | |||||
| "\n\n". | |||||
| 'This option is intended to allow a Phabricator instance to '. | |||||
| 'be exported, copied, imported, and run in a test environment '. | |||||
| 'without impacting users. For example, if you are migrating '. | |||||
| 'to new hardware, you could perform a test migration first, '. | |||||
| 'make sure things work, and then do a production cutover '. | |||||
| 'later with higher confidence and less disruption. Without '. | |||||
| 'this flag, users would receive duplicate email during the '. | |||||
| 'time the test instance and old production instance were '. | |||||
| 'both in operation.')), | |||||
| ); | ); | ||||
| } | } | ||||
| protected function didValidateOption( | protected function didValidateOption( | ||||
| PhabricatorConfigOption $option, | PhabricatorConfigOption $option, | ||||
| $value) { | $value) { | ||||
| ▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines | |||||