Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/option/PhabricatorCoreConfigOptions.php
| <?php | <?php | ||||
| final class PhabricatorCoreConfigOptions | final class PhabricatorCoreConfigOptions | ||||
| extends PhabricatorApplicationConfigOptions { | extends PhabricatorApplicationConfigOptions { | ||||
| public function getName() { | public function getName() { | ||||
| return pht("Core"); | return pht('Core'); | ||||
| } | } | ||||
| public function getDescription() { | public function getDescription() { | ||||
| return pht("Configure core options, including URIs."); | return pht('Configure core options, including URIs.'); | ||||
| } | } | ||||
| public function getOptions() { | public function getOptions() { | ||||
| if (phutil_is_windows()) { | if (phutil_is_windows()) { | ||||
| $paths = array(); | $paths = array(); | ||||
| } else { | } else { | ||||
| $paths = array( | $paths = array( | ||||
| '/bin', | '/bin', | ||||
| '/usr/bin', | '/usr/bin', | ||||
| '/usr/local/bin', | '/usr/local/bin', | ||||
| ); | ); | ||||
| } | } | ||||
| $path = getenv('PATH'); | $path = getenv('PATH'); | ||||
| 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 '. | ||||
| "domains, and allows daemons to send emails with links that have ". | 'domains, and allows daemons to send emails with links that have '. | ||||
| "the correct domain.")) | 'the correct domain.')) | ||||
| ->addExample('http://phabricator.example.com/', pht('Valid Setting')), | ->addExample('http://phabricator.example.com/', pht('Valid Setting')), | ||||
| $this->newOption('phabricator.production-uri', 'string', null) | $this->newOption('phabricator.production-uri', 'string', null) | ||||
| ->setSummary( | ->setSummary( | ||||
| pht("Primary install URI, for multi-environment installs.")) | pht('Primary install URI, for multi-environment installs.')) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| "If you have multiple Phabricator environments (like a ". | 'If you have multiple Phabricator environments (like a '. | ||||
| "development/staging environment for working on testing ". | 'development/staging environment for working on testing '. | ||||
| "Phabricator, and a production environment for deploying it), ". | 'Phabricator, and a production environment for deploying it), '. | ||||
| "set the production environment URI here so that emails and other ". | 'set the production environment URI here so that emails and other '. | ||||
| "durable URIs will always generate with links pointing at the ". | 'durable URIs will always generate with links pointing at the '. | ||||
| "production environment. If unset, defaults to ". | 'production environment. If unset, defaults to '. | ||||
| "{{phabricator.base-uri}}. Most installs do not need to set ". | '{{phabricator.base-uri}}. Most installs do not need to set '. | ||||
| "this option.")) | 'this option.')) | ||||
| ->addExample('http://phabricator.example.com/', pht('Valid Setting')), | ->addExample('http://phabricator.example.com/', pht('Valid Setting')), | ||||
| $this->newOption('phabricator.allowed-uris', 'list<string>', array()) | $this->newOption('phabricator.allowed-uris', 'list<string>', array()) | ||||
| ->setLocked(true) | ->setLocked(true) | ||||
| ->setSummary(pht("Alternative URIs that can access Phabricator.")) | ->setSummary(pht('Alternative URIs that can access Phabricator.')) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| "These alternative URIs will be able to access 'normal' pages ". | "These alternative URIs will be able to access 'normal' pages ". | ||||
| "on your Phabricator install. Other features such as OAuth ". | "on your Phabricator install. Other features such as OAuth ". | ||||
| "won't work. The major use case for this is moving installs ". | "won't work. The major use case for this is moving installs ". | ||||
| "across domains.")) | "across domains.")) | ||||
| ->addExample( | ->addExample( | ||||
| "http://phabricator2.example.com/\n". | "http://phabricator2.example.com/\n". | ||||
| "http://phabricator3.example.com/", | "http://phabricator3.example.com/", | ||||
| pht('Valid Setting')), | pht('Valid Setting')), | ||||
| $this->newOption('phabricator.timezone', 'string', null) | $this->newOption('phabricator.timezone', 'string', null) | ||||
| ->setSummary( | ->setSummary( | ||||
| pht("The timezone Phabricator should use.")) | pht('The timezone Phabricator should use.')) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| "PHP requires that you set a timezone in your php.ini before ". | "PHP requires that you set a timezone in your php.ini before ". | ||||
| "using date functions, or it will emit a warning. If this isn't ". | "using date functions, or it will emit a warning. If this isn't ". | ||||
| "possible (for instance, because you are using HPHP) you can set ". | "possible (for instance, because you are using HPHP) you can set ". | ||||
| "some valid constant for date_default_timezone_set() here and ". | "some valid constant for date_default_timezone_set() here and ". | ||||
| "Phabricator will set it on your behalf, silencing the warning.")) | "Phabricator will set it on your behalf, silencing the warning.")) | ||||
| ->addExample('America/New_York', pht('US East (EDT)')) | ->addExample('America/New_York', pht('US East (EDT)')) | ||||
| ->addExample('America/Chicago', pht('US Central (CDT)')) | ->addExample('America/Chicago', pht('US Central (CDT)')) | ||||
| ->addExample('America/Boise', pht('US Mountain (MDT)')) | ->addExample('America/Boise', pht('US Mountain (MDT)')) | ||||
| ->addExample('America/Los_Angeles', pht('US West (PDT)')), | ->addExample('America/Los_Angeles', pht('US West (PDT)')), | ||||
| $this->newOption('phabricator.cookie-prefix', 'string', null) | $this->newOption('phabricator.cookie-prefix', 'string', null) | ||||
| ->setSummary( | ->setSummary( | ||||
| pht("Set a string Phabricator should use to prefix ". | pht('Set a string Phabricator should use to prefix '. | ||||
| "cookie names")) | 'cookie names')) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| "Cookies set for x.com are also sent for y.x.com. Assuming ". | 'Cookies set for x.com are also sent for y.x.com. Assuming '. | ||||
| "Phabricator instances are running on both domains, this will ". | 'Phabricator instances are running on both domains, this will '. | ||||
| "create a collision preventing you from logging in.")) | 'create a collision preventing you from logging in.')) | ||||
| ->addExample('dev', pht('Prefix cookie with "dev"')), | ->addExample('dev', pht('Prefix cookie with "dev"')), | ||||
| $this->newOption('phabricator.show-beta-applications', 'bool', false) | $this->newOption('phabricator.show-beta-applications', 'bool', false) | ||||
| ->setBoolOptions( | ->setBoolOptions( | ||||
| array( | array( | ||||
| pht('Install Beta Applications'), | pht('Install Beta Applications'), | ||||
| pht('Uninstall Beta Applications') | pht('Uninstall Beta Applications') | ||||
| )) | )) | ||||
| ->setSummary( | ->setSummary( | ||||
| Show All 11 Lines | return array( | ||||
| "them (like normal applications).")), | "them (like normal applications).")), | ||||
| $this->newOption('phabricator.serious-business', 'bool', false) | $this->newOption('phabricator.serious-business', 'bool', false) | ||||
| ->setBoolOptions( | ->setBoolOptions( | ||||
| array( | array( | ||||
| pht('Serious business'), | pht('Serious business'), | ||||
| pht('Shenanigans'), // That should be interesting to translate. :P | pht('Shenanigans'), // That should be interesting to translate. :P | ||||
| )) | )) | ||||
| ->setSummary( | ->setSummary( | ||||
| pht("Allows you to remove levity and jokes from the UI.")) | pht('Allows you to remove levity and jokes from the UI.')) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| 'By default, Phabricator includes some flavor text in the UI, '. | 'By default, Phabricator includes some flavor text in the UI, '. | ||||
| 'like a prompt to "Weigh In" rather than "Add Comment" in '. | 'like a prompt to "Weigh In" rather than "Add Comment" in '. | ||||
| 'Maniphest. If you\'d prefer more traditional UI strings like '. | 'Maniphest. If you\'d prefer more traditional UI strings like '. | ||||
| '"Add Comment", you can set this flag to disable most of the '. | '"Add Comment", you can set this flag to disable most of the '. | ||||
| 'extra flavor.')), | 'extra flavor.')), | ||||
| $this->newOption('environment.append-paths', 'list<string>', $paths) | $this->newOption('environment.append-paths', 'list<string>', $paths) | ||||
| ->setSummary( | ->setSummary( | ||||
| pht("These paths get appended to your \$PATH envrionment variable.")) | pht('These paths get appended to your \$PATH envrionment variable.')) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| "Phabricator occasionally shells out to other binaries on the ". | "Phabricator occasionally shells out to other binaries on the ". | ||||
| "server. An example of this is the `pygmentize` command, used ". | "server. An example of this is the `pygmentize` command, used ". | ||||
| "to syntax-highlight code written in languages other than PHP. ". | "to syntax-highlight code written in languages other than PHP. ". | ||||
| "By default, it is assumed that these binaries are in the \$PATH ". | "By default, it is assumed that these binaries are in the \$PATH ". | ||||
| "of the user running Phabricator (normally 'apache', 'httpd', or ". | "of the user running Phabricator (normally 'apache', 'httpd', or ". | ||||
| "'nobody'). Here you can add extra directories to the \$PATH ". | "'nobody'). Here you can add extra directories to the \$PATH ". | ||||
| ▲ Show 20 Lines • Show All 121 Lines • Show Last 20 Lines | |||||