Change double quotes to single quotes.
Summary: Ran `arc lint --apply-patches --everything` over rP, mainly to change double quotes to single quotes where appropriate. These changes also validate that the `ArcanistXHPASTLinter::LINT_DOUBLE_QUOTE` rule is working as expected. Test Plan: Eyeballed it. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin, hach-que Differential Revision: https://secure.phabricator.com/D9431
This commit is contained in:
		
				
					committed by
					
						
						epriestley
					
				
			
			
				
	
			
			
			
						parent
						
							78f783222e
						
					
				
				
					commit
					0a62f13464
				
			@@ -24,7 +24,7 @@ foreach ($tables as $table) {
 | 
			
		||||
  echo "Converting {$name}...\n";
 | 
			
		||||
  queryfx(
 | 
			
		||||
    $conn,
 | 
			
		||||
    "ALTER TABLE %T.%T ENGINE=InnoDB",
 | 
			
		||||
    'ALTER TABLE %T.%T ENGINE=InnoDB',
 | 
			
		||||
    $table['db'],
 | 
			
		||||
    $table['tbl']);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -7,10 +7,10 @@ $table->openTransaction();
 | 
			
		||||
$table->beginReadLocking();
 | 
			
		||||
 | 
			
		||||
$users = $table->loadAll();
 | 
			
		||||
echo count($users)." users to index";
 | 
			
		||||
echo count($users).' users to index';
 | 
			
		||||
foreach ($users as $user) {
 | 
			
		||||
  $user->updateNameTokens();
 | 
			
		||||
  echo ".";
 | 
			
		||||
  echo '.';
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
$table->endReadLocking();
 | 
			
		||||
 
 | 
			
		||||
@@ -64,9 +64,9 @@ while ($update) {
 | 
			
		||||
  }
 | 
			
		||||
  if (count($update) == $size) {
 | 
			
		||||
    throw new Exception(
 | 
			
		||||
      "Failed to make any progress while updating projects. Schema upgrade ".
 | 
			
		||||
      "has failed. Go manually fix your project names to be unique (they are ".
 | 
			
		||||
      "probably ridiculous?) and then try again.");
 | 
			
		||||
      'Failed to make any progress while updating projects. Schema upgrade '.
 | 
			
		||||
      'has failed. Go manually fix your project names to be unique (they are '.
 | 
			
		||||
      'probably ridiculous?) and then try again.');
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -24,14 +24,14 @@ if ($rules) {
 | 
			
		||||
    mpull($rules, 'getID'));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
echo "This may take a moment";
 | 
			
		||||
echo 'This may take a moment';
 | 
			
		||||
do {
 | 
			
		||||
  queryfx(
 | 
			
		||||
    $conn_w,
 | 
			
		||||
    'DELETE FROM %T %Q LIMIT 1000',
 | 
			
		||||
    HeraldRule::TABLE_RULE_APPLIED,
 | 
			
		||||
    $clause);
 | 
			
		||||
  echo ".";
 | 
			
		||||
  echo '.';
 | 
			
		||||
} while ($conn_w->getAffectedRows());
 | 
			
		||||
 | 
			
		||||
$table->endReadLocking();
 | 
			
		||||
 
 | 
			
		||||
@@ -2,5 +2,5 @@
 | 
			
		||||
 | 
			
		||||
$conn = id(new PhabricatorRepository())->establishConnection('w');
 | 
			
		||||
if (queryfx_one($conn, "SHOW COLUMNS FROM `repository` LIKE 'description'")) {
 | 
			
		||||
  queryfx($conn, "ALTER TABLE `repository` DROP `description`");
 | 
			
		||||
  queryfx($conn, 'ALTER TABLE `repository` DROP `description`');
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -5,12 +5,12 @@ $table->openTransaction();
 | 
			
		||||
$table->beginReadLocking();
 | 
			
		||||
$conn_w = $table->establishConnection('w');
 | 
			
		||||
 | 
			
		||||
echo "Migrating revisions";
 | 
			
		||||
echo 'Migrating revisions';
 | 
			
		||||
do {
 | 
			
		||||
  $revisions = $table->loadAllWhere('branchName IS NULL LIMIT 1000');
 | 
			
		||||
 | 
			
		||||
  foreach ($revisions as $revision) {
 | 
			
		||||
    echo ".";
 | 
			
		||||
    echo '.';
 | 
			
		||||
 | 
			
		||||
    $diff = $revision->loadActiveDiff();
 | 
			
		||||
    if (!$diff) {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
echo "Giving image macros PHIDs";
 | 
			
		||||
echo 'Giving image macros PHIDs';
 | 
			
		||||
$table = new PhabricatorFileImageMacro();
 | 
			
		||||
$table->openTransaction();
 | 
			
		||||
 | 
			
		||||
@@ -9,7 +9,7 @@ foreach (new LiskMigrationIterator($table) as $macro) {
 | 
			
		||||
    continue;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  echo ".";
 | 
			
		||||
  echo '.';
 | 
			
		||||
 | 
			
		||||
  queryfx(
 | 
			
		||||
    $macro->establishConnection('w'),
 | 
			
		||||
 
 | 
			
		||||
@@ -11,7 +11,7 @@ $revs = queryfx_all(
 | 
			
		||||
  'SELECT id, phid, unsubscribed FROM differential_revision');
 | 
			
		||||
 | 
			
		||||
foreach ($revs as $rev) {
 | 
			
		||||
  echo ".";
 | 
			
		||||
  echo '.';
 | 
			
		||||
 | 
			
		||||
  $unsubscribed = json_decode($rev['unsubscribed']);
 | 
			
		||||
  if (!$unsubscribed) {
 | 
			
		||||
 
 | 
			
		||||
@@ -22,12 +22,12 @@ foreach (new LiskMigrationIterator($commit_table) as $commit) {
 | 
			
		||||
  $editor->addEdge($commit->getPHID(), $commit_drev, $revision_phid);
 | 
			
		||||
  $edges++;
 | 
			
		||||
  if ($edges % 256 == 0) {
 | 
			
		||||
    echo ".";
 | 
			
		||||
    echo '.';
 | 
			
		||||
    $editor->save();
 | 
			
		||||
    $editor = id(new PhabricatorEdgeEditor())->setSuppressEvents(true);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
echo ".";
 | 
			
		||||
echo '.';
 | 
			
		||||
$editor->save();
 | 
			
		||||
echo "\nDone.\n";
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
echo "Giving countdowns PHIDs";
 | 
			
		||||
echo 'Giving countdowns PHIDs';
 | 
			
		||||
$table = new PhabricatorCountdown();
 | 
			
		||||
$table->openTransaction();
 | 
			
		||||
 | 
			
		||||
@@ -9,7 +9,7 @@ foreach (new LiskMigrationIterator($table) as $countdown) {
 | 
			
		||||
    continue;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  echo ".";
 | 
			
		||||
  echo '.';
 | 
			
		||||
 | 
			
		||||
  queryfx(
 | 
			
		||||
    $countdown->establishConnection('w'),
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
echo "Populating Legalpad Documents with ",
 | 
			
		||||
echo 'Populating Legalpad Documents with ',
 | 
			
		||||
 "titles, recentContributorPHIDs, and contributorCounts...\n";
 | 
			
		||||
$table = new LegalpadDocument();
 | 
			
		||||
$table->openTransaction();
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
echo "Giving pholio images PHIDs";
 | 
			
		||||
echo 'Giving pholio images PHIDs';
 | 
			
		||||
$table = new PholioImage();
 | 
			
		||||
$table->openTransaction();
 | 
			
		||||
 | 
			
		||||
@@ -9,7 +9,7 @@ foreach (new LiskMigrationIterator($table) as $image) {
 | 
			
		||||
    continue;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  echo ".";
 | 
			
		||||
  echo '.';
 | 
			
		||||
 | 
			
		||||
  queryfx(
 | 
			
		||||
    $image->establishConnection('w'),
 | 
			
		||||
 
 | 
			
		||||
@@ -13,9 +13,9 @@ foreach (new LiskMigrationIterator($table) as $plan) {
 | 
			
		||||
 | 
			
		||||
  $rows = queryfx_all(
 | 
			
		||||
    $conn_w,
 | 
			
		||||
    "SELECT id, sequence FROM harbormaster_buildstep ".
 | 
			
		||||
    "WHERE buildPlanPHID = %s ".
 | 
			
		||||
    "ORDER BY id ASC",
 | 
			
		||||
    'SELECT id, sequence FROM harbormaster_buildstep '.
 | 
			
		||||
    'WHERE buildPlanPHID = %s '.
 | 
			
		||||
    'ORDER BY id ASC',
 | 
			
		||||
    $plan->getPHID());
 | 
			
		||||
 | 
			
		||||
  $sequence = 1;
 | 
			
		||||
@@ -29,9 +29,9 @@ foreach (new LiskMigrationIterator($table) as $plan) {
 | 
			
		||||
    echo "  - {$id} to position {$sequence}...\n";
 | 
			
		||||
    queryfx(
 | 
			
		||||
      $conn_w,
 | 
			
		||||
      "UPDATE harbormaster_buildstep ".
 | 
			
		||||
      "SET sequence = %d ".
 | 
			
		||||
      "WHERE id = %d",
 | 
			
		||||
      'UPDATE harbormaster_buildstep '.
 | 
			
		||||
      'SET sequence = %d '.
 | 
			
		||||
      'WHERE id = %d',
 | 
			
		||||
      $sequence,
 | 
			
		||||
      $id);
 | 
			
		||||
    $sequence++;
 | 
			
		||||
 
 | 
			
		||||
@@ -7,45 +7,45 @@ require_once $root.'/scripts/__init_script__.php';
 | 
			
		||||
// http://www.opm.gov/operating_status_schedules/fedhol/
 | 
			
		||||
$holidays = array(
 | 
			
		||||
  '2014-01-01' => "New Year's Day",
 | 
			
		||||
  '2014-01-20' => "Birthday of Martin Luther King, Jr.",
 | 
			
		||||
  '2014-01-20' => 'Birthday of Martin Luther King, Jr.',
 | 
			
		||||
  '2014-02-17' => "Washington's Birthday",
 | 
			
		||||
  '2014-05-26' => "Memorial Day",
 | 
			
		||||
  '2014-07-04' => "Independence Day",
 | 
			
		||||
  '2014-09-01' => "Labor Day",
 | 
			
		||||
  '2014-10-13' => "Columbus Day",
 | 
			
		||||
  '2014-11-11' => "Veterans Day",
 | 
			
		||||
  '2014-11-27' => "Thanksgiving Day",
 | 
			
		||||
  '2014-12-25' => "Christmas Day",
 | 
			
		||||
  '2014-05-26' => 'Memorial Day',
 | 
			
		||||
  '2014-07-04' => 'Independence Day',
 | 
			
		||||
  '2014-09-01' => 'Labor Day',
 | 
			
		||||
  '2014-10-13' => 'Columbus Day',
 | 
			
		||||
  '2014-11-11' => 'Veterans Day',
 | 
			
		||||
  '2014-11-27' => 'Thanksgiving Day',
 | 
			
		||||
  '2014-12-25' => 'Christmas Day',
 | 
			
		||||
  '2015-01-01' => "New Year's Day",
 | 
			
		||||
  '2015-01-19' => "Birthday of Martin Luther King, Jr.",
 | 
			
		||||
  '2015-01-19' => 'Birthday of Martin Luther King, Jr.',
 | 
			
		||||
  '2015-02-16' => "Washington's Birthday",
 | 
			
		||||
  '2015-05-25' => "Memorial Day",
 | 
			
		||||
  '2015-07-03' => "Independence Day",
 | 
			
		||||
  '2015-09-07' => "Labor Day",
 | 
			
		||||
  '2015-10-12' => "Columbus Day",
 | 
			
		||||
  '2015-11-11' => "Veterans Day",
 | 
			
		||||
  '2015-11-26' => "Thanksgiving Day",
 | 
			
		||||
  '2015-12-25' => "Christmas Day",
 | 
			
		||||
  '2015-05-25' => 'Memorial Day',
 | 
			
		||||
  '2015-07-03' => 'Independence Day',
 | 
			
		||||
  '2015-09-07' => 'Labor Day',
 | 
			
		||||
  '2015-10-12' => 'Columbus Day',
 | 
			
		||||
  '2015-11-11' => 'Veterans Day',
 | 
			
		||||
  '2015-11-26' => 'Thanksgiving Day',
 | 
			
		||||
  '2015-12-25' => 'Christmas Day',
 | 
			
		||||
  '2016-01-01' => "New Year's Day",
 | 
			
		||||
  '2016-01-18' => "Birthday of Martin Luther King, Jr.",
 | 
			
		||||
  '2016-01-18' => 'Birthday of Martin Luther King, Jr.',
 | 
			
		||||
  '2016-02-15' => "Washington's Birthday",
 | 
			
		||||
  '2016-05-30' => "Memorial Day",
 | 
			
		||||
  '2016-07-04' => "Independence Day",
 | 
			
		||||
  '2016-09-05' => "Labor Day",
 | 
			
		||||
  '2016-10-10' => "Columbus Day",
 | 
			
		||||
  '2016-11-11' => "Veterans Day",
 | 
			
		||||
  '2016-11-24' => "Thanksgiving Day",
 | 
			
		||||
  '2016-12-26' => "Christmas Day",
 | 
			
		||||
  '2016-05-30' => 'Memorial Day',
 | 
			
		||||
  '2016-07-04' => 'Independence Day',
 | 
			
		||||
  '2016-09-05' => 'Labor Day',
 | 
			
		||||
  '2016-10-10' => 'Columbus Day',
 | 
			
		||||
  '2016-11-11' => 'Veterans Day',
 | 
			
		||||
  '2016-11-24' => 'Thanksgiving Day',
 | 
			
		||||
  '2016-12-26' => 'Christmas Day',
 | 
			
		||||
  '2017-01-02' => "New Year's Day",
 | 
			
		||||
  '2017-01-16' => "Birthday of Martin Luther King, Jr.",
 | 
			
		||||
  '2017-01-16' => 'Birthday of Martin Luther King, Jr.',
 | 
			
		||||
  '2017-02-10' => "Washington's Birthday",
 | 
			
		||||
  '2017-05-29' => "Memorial Day",
 | 
			
		||||
  '2017-07-04' => "Independence Day",
 | 
			
		||||
  '2017-09-04' => "Labor Day",
 | 
			
		||||
  '2017-10-09' => "Columbus Day",
 | 
			
		||||
  '2017-11-10' => "Veterans Day",
 | 
			
		||||
  '2017-11-23' => "Thanksgiving Day",
 | 
			
		||||
  '2017-12-25' => "Christmas Day",
 | 
			
		||||
  '2017-05-29' => 'Memorial Day',
 | 
			
		||||
  '2017-07-04' => 'Independence Day',
 | 
			
		||||
  '2017-09-04' => 'Labor Day',
 | 
			
		||||
  '2017-10-09' => 'Columbus Day',
 | 
			
		||||
  '2017-11-10' => 'Veterans Day',
 | 
			
		||||
  '2017-11-23' => 'Thanksgiving Day',
 | 
			
		||||
  '2017-12-25' => 'Christmas Day',
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
$table = new PhabricatorCalendarHoliday();
 | 
			
		||||
 
 | 
			
		||||
@@ -44,12 +44,12 @@ if (
 | 
			
		||||
  (preg_match('/charset="(.*?)"/', $content_type, $matches) ||
 | 
			
		||||
   preg_match('/charset=(\S+)/', $content_type, $matches))
 | 
			
		||||
) {
 | 
			
		||||
  $text_body = phutil_utf8_convert($text_body, "UTF-8", $matches[1]);
 | 
			
		||||
  $text_body = phutil_utf8_convert($text_body, 'UTF-8', $matches[1]);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
$headers = $parser->getHeaders();
 | 
			
		||||
$headers['subject'] = iconv_mime_decode($headers['subject'], 0, "UTF-8");
 | 
			
		||||
$headers['from'] = iconv_mime_decode($headers['from'], 0, "UTF-8");
 | 
			
		||||
$headers['subject'] = iconv_mime_decode($headers['subject'], 0, 'UTF-8');
 | 
			
		||||
$headers['from'] = iconv_mime_decode($headers['from'], 0, 'UTF-8');
 | 
			
		||||
 | 
			
		||||
if ($args->getArg('process-duplicates')) {
 | 
			
		||||
  $headers['message-id'] = Filesystem::readRandomCharacters(64);
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,7 @@ $maxes = ipull($maxes, 'maxEpoch', 'repositoryID');
 | 
			
		||||
 | 
			
		||||
$repository_ids = array_keys($sizes + $maxes);
 | 
			
		||||
 | 
			
		||||
echo "Updating ".count($repository_ids)." repositories";
 | 
			
		||||
echo 'Updating '.count($repository_ids).' repositories';
 | 
			
		||||
 | 
			
		||||
foreach ($repository_ids as $repository_id) {
 | 
			
		||||
  $last_commit = queryfx_one(
 | 
			
		||||
@@ -48,6 +48,6 @@ foreach ($repository_ids as $repository_id) {
 | 
			
		||||
    $last_commit,
 | 
			
		||||
    idx($sizes, $repository_id, 0),
 | 
			
		||||
    idx($maxes, $repository_id, 0));
 | 
			
		||||
  echo ".";
 | 
			
		||||
  echo '.';
 | 
			
		||||
}
 | 
			
		||||
echo "\ndone.\n";
 | 
			
		||||
 
 | 
			
		||||
@@ -103,7 +103,7 @@ $force_local = $args->getArg('force-local');
 | 
			
		||||
$min_date = $args->getArg('min-date');
 | 
			
		||||
 | 
			
		||||
if (!$all_from_repo && !$reparse_what) {
 | 
			
		||||
  usage("Specify a commit or repository to reparse.");
 | 
			
		||||
  usage('Specify a commit or repository to reparse.');
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if ($all_from_repo && $reparse_what) {
 | 
			
		||||
@@ -116,8 +116,8 @@ if ($all_from_repo && $reparse_what) {
 | 
			
		||||
 | 
			
		||||
if (!$reparse_message && !$reparse_change && !$reparse_herald &&
 | 
			
		||||
    !$reparse_owners && !$reparse_harbormaster) {
 | 
			
		||||
  usage("Specify what information to reparse with --message, --change,  ".
 | 
			
		||||
        "--herald, --harbormaster, and/or --owners");
 | 
			
		||||
  usage('Specify what information to reparse with --message, --change,  '.
 | 
			
		||||
        '--herald, --harbormaster, and/or --owners');
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
$min_timestamp = false;
 | 
			
		||||
@@ -142,9 +142,9 @@ if ($min_date) {
 | 
			
		||||
 | 
			
		||||
if ($reparse_owners && !$force) {
 | 
			
		||||
  echo phutil_console_wrap(
 | 
			
		||||
    "You are about to recreate the relationship entries between the commits ".
 | 
			
		||||
    "and the packages they touch. This might delete some existing ".
 | 
			
		||||
    "relationship entries for some old commits.");
 | 
			
		||||
    'You are about to recreate the relationship entries between the commits '.
 | 
			
		||||
    'and the packages they touch. This might delete some existing '.
 | 
			
		||||
    'relationship entries for some old commits.');
 | 
			
		||||
 | 
			
		||||
  if (!phutil_console_confirm('Are you ready to continue?')) {
 | 
			
		||||
    echo "Cancelled.\n";
 | 
			
		||||
 
 | 
			
		||||
@@ -18,30 +18,30 @@ $args = id(new PhutilArgumentParser($argv))
 | 
			
		||||
    array(
 | 
			
		||||
      'name' => 'all',
 | 
			
		||||
      'help' =>
 | 
			
		||||
        "Discover problems in the whole repository instead of just changes ".
 | 
			
		||||
        "since the last run.",
 | 
			
		||||
        'Discover problems in the whole repository instead of just changes '.
 | 
			
		||||
        'since the last run.',
 | 
			
		||||
    ),
 | 
			
		||||
    array(
 | 
			
		||||
      'name' => 'arc',
 | 
			
		||||
      'param' => 'path',
 | 
			
		||||
      'default' => 'arc',
 | 
			
		||||
      'help' => "Path to Arcanist executable.",
 | 
			
		||||
      'help' => 'Path to Arcanist executable.',
 | 
			
		||||
    ),
 | 
			
		||||
    array(
 | 
			
		||||
      'name' => 'severity',
 | 
			
		||||
      'param' => 'string',
 | 
			
		||||
      'default' => ArcanistLintSeverity::SEVERITY_ADVICE,
 | 
			
		||||
      'help' => "Minimum severity, one of ArcanistLintSeverity constants.",
 | 
			
		||||
      'help' => 'Minimum severity, one of ArcanistLintSeverity constants.',
 | 
			
		||||
    ),
 | 
			
		||||
    array(
 | 
			
		||||
      'name' => 'chunk-size',
 | 
			
		||||
      'param' => 'number',
 | 
			
		||||
      'default' => 256,
 | 
			
		||||
      'help' => "Number of paths passed to `arc` at once.",
 | 
			
		||||
      'help' => 'Number of paths passed to `arc` at once.',
 | 
			
		||||
    ),
 | 
			
		||||
    array(
 | 
			
		||||
      'name' => 'blame',
 | 
			
		||||
      'help' => "Assign lint errors to authors who last modified the line.",
 | 
			
		||||
      'help' => 'Assign lint errors to authors who last modified the line.',
 | 
			
		||||
    ),
 | 
			
		||||
  ));
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@ $rows = queryfx_all(
 | 
			
		||||
  $ssh_dao->getTableName());
 | 
			
		||||
 | 
			
		||||
if (!$rows) {
 | 
			
		||||
  echo pht("No keys found.")."\n";
 | 
			
		||||
  echo pht('No keys found.')."\n";
 | 
			
		||||
  exit(1);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -32,14 +32,14 @@ $args->parse(
 | 
			
		||||
try {
 | 
			
		||||
  $user_name = $args->getArg('phabricator-ssh-user');
 | 
			
		||||
  if (!strlen($user_name)) {
 | 
			
		||||
    throw new Exception("No username.");
 | 
			
		||||
    throw new Exception('No username.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  $user = id(new PhabricatorUser())->loadOneWhere(
 | 
			
		||||
    'userName = %s',
 | 
			
		||||
    $user_name);
 | 
			
		||||
  if (!$user) {
 | 
			
		||||
    throw new Exception("Invalid username.");
 | 
			
		||||
    throw new Exception('Invalid username.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  $ssh_log->setData(
 | 
			
		||||
@@ -49,7 +49,7 @@ try {
 | 
			
		||||
    ));
 | 
			
		||||
 | 
			
		||||
  if (!$user->isUserActivated()) {
 | 
			
		||||
    throw new Exception(pht("Your account is not activated."));
 | 
			
		||||
    throw new Exception(pht('Your account is not activated.'));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if ($args->getArg('ssh-command')) {
 | 
			
		||||
@@ -96,7 +96,7 @@ try {
 | 
			
		||||
  $original_args = new PhutilArgumentParser($original_argv);
 | 
			
		||||
 | 
			
		||||
  if (empty($workflow_names[$command])) {
 | 
			
		||||
    throw new Exception("Invalid command.");
 | 
			
		||||
    throw new Exception('Invalid command.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  $workflow = $original_args->parseWorkflows($workflows);
 | 
			
		||||
@@ -104,17 +104,17 @@ try {
 | 
			
		||||
 | 
			
		||||
  $sock_stdin = fopen('php://stdin', 'r');
 | 
			
		||||
  if (!$sock_stdin) {
 | 
			
		||||
    throw new Exception("Unable to open stdin.");
 | 
			
		||||
    throw new Exception('Unable to open stdin.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  $sock_stdout = fopen('php://stdout', 'w');
 | 
			
		||||
  if (!$sock_stdout) {
 | 
			
		||||
    throw new Exception("Unable to open stdout.");
 | 
			
		||||
    throw new Exception('Unable to open stdout.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  $sock_stderr = fopen('php://stderr', 'w');
 | 
			
		||||
  if (!$sock_stderr) {
 | 
			
		||||
    throw new Exception("Unable to open stderr.");
 | 
			
		||||
    throw new Exception('Unable to open stderr.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  $socket_channel = new PhutilSocketChannel(
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@ foreach (Futures($futures)->limit(8) as $file => $future) {
 | 
			
		||||
  $tags = explode("\n", $tags[1]);
 | 
			
		||||
 | 
			
		||||
  foreach ($tags as $tag) {
 | 
			
		||||
    $parts = explode(";", $tag);
 | 
			
		||||
    $parts = explode(';', $tag);
 | 
			
		||||
    // skip lines that we can not parse
 | 
			
		||||
    if (count($parts) < 2) {
 | 
			
		||||
      continue;
 | 
			
		||||
@@ -67,11 +67,11 @@ foreach (Futures($futures)->limit(8) as $file => $future) {
 | 
			
		||||
 | 
			
		||||
    // To keep consistent with "Separate with commas, for example: php, py"
 | 
			
		||||
    // in Arcanist Project edit form.
 | 
			
		||||
    $language = str_ireplace("python", "py", $language);
 | 
			
		||||
    $language = str_ireplace('python', 'py', $language);
 | 
			
		||||
 | 
			
		||||
    // also, "normalize" c++ and c#
 | 
			
		||||
    $language = str_ireplace("c++", "cpp", $language);
 | 
			
		||||
    $language = str_ireplace("c#", "cs", $language);
 | 
			
		||||
    $language = str_ireplace('c++', 'cpp', $language);
 | 
			
		||||
    $language = str_ireplace('c#', 'cs', $language);
 | 
			
		||||
 | 
			
		||||
    // Ruby has "singleton method", for example
 | 
			
		||||
    $type = substr(str_replace(' ', '_', $type), 0, 12);
 | 
			
		||||
@@ -107,7 +107,7 @@ function ctags_check_executable() {
 | 
			
		||||
function print_symbol($file, $line_num, $type, $token, $context, $language) {
 | 
			
		||||
  // get rid of relative path
 | 
			
		||||
  $file = explode('/', $file);
 | 
			
		||||
  if ($file[0] == '.' || $file[0] == "..") {
 | 
			
		||||
  if ($file[0] == '.' || $file[0] == '..') {
 | 
			
		||||
    array_shift($file);
 | 
			
		||||
  }
 | 
			
		||||
  $file = '/' . implode('/', $file);
 | 
			
		||||
 
 | 
			
		||||
@@ -21,15 +21,15 @@ if ($is_first_user) {
 | 
			
		||||
    "which gives you more help setting up your install. If you create an ".
 | 
			
		||||
    "account with this script instead, you will skip the setup help and you ".
 | 
			
		||||
    "will not be able to access it later.");
 | 
			
		||||
  if (!phutil_console_confirm(pht("Skip easy setup and create account?"))) {
 | 
			
		||||
    echo pht("Cancelled.")."\n";
 | 
			
		||||
  if (!phutil_console_confirm(pht('Skip easy setup and create account?'))) {
 | 
			
		||||
    echo pht('Cancelled.')."\n";
 | 
			
		||||
    exit(1);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
echo "Enter a username to create a new account or edit an existing account.";
 | 
			
		||||
echo 'Enter a username to create a new account or edit an existing account.';
 | 
			
		||||
 | 
			
		||||
$username = phutil_console_prompt("Enter a username:");
 | 
			
		||||
$username = phutil_console_prompt('Enter a username:');
 | 
			
		||||
if (!strlen($username)) {
 | 
			
		||||
  echo "Cancelled.\n";
 | 
			
		||||
  exit(1);
 | 
			
		||||
@@ -95,7 +95,7 @@ $user->setRealName($realname);
 | 
			
		||||
$create_email = null;
 | 
			
		||||
if ($is_new) {
 | 
			
		||||
  do {
 | 
			
		||||
    $email = phutil_console_prompt("Enter user email address:");
 | 
			
		||||
    $email = phutil_console_prompt('Enter user email address:');
 | 
			
		||||
    $duplicate = id(new PhabricatorUserEmail())->loadOneWhere(
 | 
			
		||||
      'address = %s',
 | 
			
		||||
      $email);
 | 
			
		||||
@@ -115,7 +115,7 @@ $changed_pass = false;
 | 
			
		||||
// it.
 | 
			
		||||
phutil_passthru('stty -echo');
 | 
			
		||||
$password = phutil_console_prompt(
 | 
			
		||||
  "Enter a password for this user [blank to leave unchanged]:");
 | 
			
		||||
  'Enter a password for this user [blank to leave unchanged]:');
 | 
			
		||||
phutil_passthru('stty echo');
 | 
			
		||||
if (strlen($password)) {
 | 
			
		||||
  $changed_pass = $password;
 | 
			
		||||
@@ -183,7 +183,7 @@ printf(
 | 
			
		||||
 | 
			
		||||
echo "\n";
 | 
			
		||||
 | 
			
		||||
if (!phutil_console_confirm("Save these changes?", $default_no = false)) {
 | 
			
		||||
if (!phutil_console_confirm('Save these changes?', $default_no = false)) {
 | 
			
		||||
  echo "Cancelled.\n";
 | 
			
		||||
  exit(1);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -19,8 +19,8 @@ $admin = id(new PhabricatorUser())->loadOneWhere(
 | 
			
		||||
  $argv[4]);
 | 
			
		||||
if (!$admin) {
 | 
			
		||||
  throw new Exception(
 | 
			
		||||
    "Admin user must be the username of a valid Phabricator account, used ".
 | 
			
		||||
    "to send the new user a welcome email.");
 | 
			
		||||
    'Admin user must be the username of a valid Phabricator account, used '.
 | 
			
		||||
    'to send the new user a welcome email.');
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
$existing_user = id(new PhabricatorUser())->loadOneWhere(
 | 
			
		||||
 
 | 
			
		||||
@@ -483,7 +483,7 @@ final class AphrontRequest {
 | 
			
		||||
    if (empty($_SERVER['HTTPS'])) {
 | 
			
		||||
      return false;
 | 
			
		||||
    }
 | 
			
		||||
    if (!strcasecmp($_SERVER["HTTPS"], "off")) {
 | 
			
		||||
    if (!strcasecmp($_SERVER['HTTPS'], 'off')) {
 | 
			
		||||
      return false;
 | 
			
		||||
    }
 | 
			
		||||
    return true;
 | 
			
		||||
 
 | 
			
		||||
@@ -138,8 +138,8 @@ abstract class AphrontApplicationConfiguration {
 | 
			
		||||
          ->executeOne();
 | 
			
		||||
      } catch (PhabricatorPolicyException $ex) {
 | 
			
		||||
        throw new Exception(
 | 
			
		||||
          "This blog is not visible to logged out users, so it can not be ".
 | 
			
		||||
          "visited from a custom domain.");
 | 
			
		||||
          'This blog is not visible to logged out users, so it can not be '.
 | 
			
		||||
          'visited from a custom domain.');
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      if (!$blog) {
 | 
			
		||||
 
 | 
			
		||||
@@ -67,7 +67,7 @@ abstract class AphrontProxyResponse extends AphrontResponse {
 | 
			
		||||
 | 
			
		||||
  final public function buildResponseString() {
 | 
			
		||||
    throw new Exception(
 | 
			
		||||
      "AphrontProxyResponse must implement reduceProxyResponse().");
 | 
			
		||||
      'AphrontProxyResponse must implement reduceProxyResponse().');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -50,7 +50,7 @@ abstract class AphrontHTTPSink {
 | 
			
		||||
 | 
			
		||||
      if (strpos($name, ':') !== false) {
 | 
			
		||||
        throw new Exception(
 | 
			
		||||
          "Declining to emit response with malformed HTTP header name: ".
 | 
			
		||||
          'Declining to emit response with malformed HTTP header name: '.
 | 
			
		||||
          $name);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -36,7 +36,7 @@ final class AphrontHTTPSinkTestCase extends PhabricatorTestCase {
 | 
			
		||||
  public function testHTTPSinkResponseSplitting() {
 | 
			
		||||
    $input = $this->tryTestCaseMap(
 | 
			
		||||
      array(
 | 
			
		||||
        "test"      => true,
 | 
			
		||||
        'test'      => true,
 | 
			
		||||
        "test\nx"   => false,
 | 
			
		||||
        "test\rx"   => false,
 | 
			
		||||
        "test\0x"   => false,
 | 
			
		||||
@@ -75,7 +75,7 @@ final class AphrontHTTPSinkTestCase extends PhabricatorTestCase {
 | 
			
		||||
    $this->assertEqual(
 | 
			
		||||
      'for (;;);{"x":"\u003ciframe\u003e"}',
 | 
			
		||||
      $sink->getEmittedData(),
 | 
			
		||||
      "JSONResponse should prevent content-sniffing attacks.");
 | 
			
		||||
      'JSONResponse should prevent content-sniffing attacks.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@ final class ConduitAPI_arcanist_projectinfo_Method
 | 
			
		||||
  extends ConduitAPI_arcanist_Method {
 | 
			
		||||
 | 
			
		||||
  public function getMethodDescription() {
 | 
			
		||||
    return "Get information about Arcanist projects.";
 | 
			
		||||
    return 'Get information about Arcanist projects.';
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function defineParamTypes() {
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
final class ConduitAPI_audit_query_Method extends ConduitAPI_audit_Method {
 | 
			
		||||
 | 
			
		||||
  public function getMethodDescription() {
 | 
			
		||||
    return "Query audit requests.";
 | 
			
		||||
    return 'Query audit requests.';
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function defineParamTypes() {
 | 
			
		||||
 
 | 
			
		||||
@@ -145,7 +145,7 @@ final class PhabricatorAuditCommentEditor extends PhabricatorEditor {
 | 
			
		||||
        $actor_request = id(new PhabricatorRepositoryAuditRequest())
 | 
			
		||||
          ->setCommitPHID($commit->getPHID())
 | 
			
		||||
          ->setAuditorPHID($actor->getPHID())
 | 
			
		||||
          ->setAuditReasons(array("Resigned"));
 | 
			
		||||
          ->setAuditReasons(array('Resigned'));
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      $actor_request
 | 
			
		||||
@@ -220,7 +220,7 @@ final class PhabricatorAuditCommentEditor extends PhabricatorEditor {
 | 
			
		||||
          ->setCommitPHID($commit->getPHID())
 | 
			
		||||
          ->setAuditorPHID($actor->getPHID())
 | 
			
		||||
          ->setAuditStatus($new_status)
 | 
			
		||||
          ->setAuditReasons(array("Voluntary Participant"))
 | 
			
		||||
          ->setAuditReasons(array('Voluntary Participant'))
 | 
			
		||||
          ->save();
 | 
			
		||||
        $requests[] = $request;
 | 
			
		||||
      }
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@ final class PhabricatorAuditReplyHandler extends PhabricatorMailReplyHandler {
 | 
			
		||||
 | 
			
		||||
  public function validateMailReceiver($mail_receiver) {
 | 
			
		||||
    if (!($mail_receiver instanceof PhabricatorRepositoryCommit)) {
 | 
			
		||||
      throw new Exception("Mail receiver is not a commit!");
 | 
			
		||||
      throw new Exception('Mail receiver is not a commit!');
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -24,7 +24,7 @@ final class PhabricatorAuditReplyHandler extends PhabricatorMailReplyHandler {
 | 
			
		||||
 | 
			
		||||
  public function getReplyHandlerInstructions() {
 | 
			
		||||
    if ($this->supportsReplies()) {
 | 
			
		||||
      return pht("Reply to comment.");
 | 
			
		||||
      return pht('Reply to comment.');
 | 
			
		||||
    } else {
 | 
			
		||||
      return null;
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -72,7 +72,7 @@ final class PhabricatorAuditManagementDeleteWorkflow
 | 
			
		||||
    $max_date = $this->loadDate($args->getArg('max-commit-date'));
 | 
			
		||||
    if ($min_date && $max_date && ($min_date > $max_date)) {
 | 
			
		||||
      throw new PhutilArgumentUsageException(
 | 
			
		||||
        "Specified max date must come after specified min date.");
 | 
			
		||||
        'Specified max date must come after specified min date.');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $is_dry_run = $args->getArg('dry-run');
 | 
			
		||||
@@ -124,7 +124,7 @@ final class PhabricatorAuditManagementDeleteWorkflow
 | 
			
		||||
    $console = PhutilConsole::getConsole();
 | 
			
		||||
 | 
			
		||||
    if (!$audits) {
 | 
			
		||||
      $console->writeErr("%s\n", pht("No audits match the query."));
 | 
			
		||||
      $console->writeErr("%s\n", pht('No audits match the query.'));
 | 
			
		||||
      return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -140,7 +140,7 @@ final class PhabricatorAuditManagementDeleteWorkflow
 | 
			
		||||
      $console->writeOut(
 | 
			
		||||
        "%s\n",
 | 
			
		||||
        sprintf(
 | 
			
		||||
          "%10d %-16s %-16s %s: %s",
 | 
			
		||||
          '%10d %-16s %-16s %s: %s',
 | 
			
		||||
          $audit->getID(),
 | 
			
		||||
          $handles[$audit->getAuditorPHID()]->getName(),
 | 
			
		||||
          PhabricatorAuditStatusConstants::getStatusName(
 | 
			
		||||
@@ -158,7 +158,7 @@ final class PhabricatorAuditManagementDeleteWorkflow
 | 
			
		||||
      if ($console->confirm($message)) {
 | 
			
		||||
        foreach ($audits as $audit) {
 | 
			
		||||
          $id = $audit->getID();
 | 
			
		||||
          $console->writeOut("%s\n", pht("Deleting audit %d...", $id));
 | 
			
		||||
          $console->writeOut("%s\n", pht('Deleting audit %d...', $id));
 | 
			
		||||
          $audit->delete();
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
 
 | 
			
		||||
@@ -58,8 +58,8 @@ final class PhabricatorAuthConfirmLinkController
 | 
			
		||||
            'class' => 'aphront-form-instructions',
 | 
			
		||||
          ),
 | 
			
		||||
          pht(
 | 
			
		||||
            "Confirm the link with this %s account. This account will be ".
 | 
			
		||||
            "able to log in to your Phabricator account.",
 | 
			
		||||
            'Confirm the link with this %s account. This account will be '.
 | 
			
		||||
            'able to log in to your Phabricator account.',
 | 
			
		||||
            $provider->getProviderName())))
 | 
			
		||||
      ->appendChild(
 | 
			
		||||
        id(new PhabricatorAuthAccountView())
 | 
			
		||||
 
 | 
			
		||||
@@ -68,7 +68,7 @@ final class PhabricatorAuthLoginController
 | 
			
		||||
 | 
			
		||||
    if (!$account) {
 | 
			
		||||
      throw new Exception(
 | 
			
		||||
        "Auth provider failed to load an account from processLoginRequest()!");
 | 
			
		||||
        'Auth provider failed to load an account from processLoginRequest()!');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if ($account->getUserPHID()) {
 | 
			
		||||
@@ -164,7 +164,7 @@ final class PhabricatorAuthLoginController
 | 
			
		||||
    $next_uri) {
 | 
			
		||||
 | 
			
		||||
    if ($account->getUserPHID()) {
 | 
			
		||||
      throw new Exception("Account is already registered or linked.");
 | 
			
		||||
      throw new Exception('Account is already registered or linked.');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Regenerate the registration secret key, set it on the external account,
 | 
			
		||||
 
 | 
			
		||||
@@ -163,7 +163,7 @@ final class PhabricatorAuthRegisterController
 | 
			
		||||
 | 
			
		||||
        $captcha_ok = AphrontFormRecaptchaControl::processCaptcha($request);
 | 
			
		||||
        if (!$captcha_ok) {
 | 
			
		||||
          $errors[] = pht("Captcha response is incorrect, try again.");
 | 
			
		||||
          $errors[] = pht('Captcha response is incorrect, try again.');
 | 
			
		||||
          $e_captcha = pht('Invalid');
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
@@ -479,12 +479,12 @@ final class PhabricatorAuthRegisterController
 | 
			
		||||
    if (!$providers) {
 | 
			
		||||
      $response = $this->renderError(
 | 
			
		||||
        pht(
 | 
			
		||||
          "There are no configured default registration providers."));
 | 
			
		||||
          'There are no configured default registration providers.'));
 | 
			
		||||
      return array($account, $provider, $response);
 | 
			
		||||
    } else if (count($providers) > 1) {
 | 
			
		||||
      $response = $this->renderError(
 | 
			
		||||
        pht(
 | 
			
		||||
          "There are too many configured default registration providers."));
 | 
			
		||||
          'There are too many configured default registration providers.'));
 | 
			
		||||
      return array($account, $provider, $response);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -46,9 +46,9 @@ final class PhabricatorAuthStartController
 | 
			
		||||
 | 
			
		||||
          return $this->renderError(
 | 
			
		||||
            pht(
 | 
			
		||||
              "Your login session is invalid. Try reloading the page and ".
 | 
			
		||||
              "logging in again. If that does not work, clear your browser ".
 | 
			
		||||
              "cookies."));
 | 
			
		||||
              'Your login session is invalid. Try reloading the page and '.
 | 
			
		||||
              'logging in again. If that does not work, clear your browser '.
 | 
			
		||||
              'cookies.'));
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -69,11 +69,11 @@ final class PhabricatorAuthStartController
 | 
			
		||||
 | 
			
		||||
      return $this->renderError(
 | 
			
		||||
        pht(
 | 
			
		||||
          "This Phabricator install is not configured with any enabled ".
 | 
			
		||||
          "authentication providers which can be used to log in. If you ".
 | 
			
		||||
          "have accidentally locked yourself out by disabling all providers, ".
 | 
			
		||||
          "you can use `phabricator/bin/auth recover <username>` to ".
 | 
			
		||||
          "recover access to an administrative account."));
 | 
			
		||||
          'This Phabricator install is not configured with any enabled '.
 | 
			
		||||
          'authentication providers which can be used to log in. If you '.
 | 
			
		||||
          'have accidentally locked yourself out by disabling all providers, '.
 | 
			
		||||
          'you can use `phabricator/bin/auth recover <username>` to '.
 | 
			
		||||
          'recover access to an administrative account.'));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $next_uri = $request->getStr('next');
 | 
			
		||||
 
 | 
			
		||||
@@ -73,7 +73,7 @@ final class PhabricatorAuthUnlinkController
 | 
			
		||||
      ->setTitle(pht('No Such Account'))
 | 
			
		||||
      ->appendChild(
 | 
			
		||||
        pht(
 | 
			
		||||
          "You can not unlink this account because it is not linked."))
 | 
			
		||||
          'You can not unlink this account because it is not linked.'))
 | 
			
		||||
      ->addCancelButton($this->getDoneURI());
 | 
			
		||||
 | 
			
		||||
    return id(new AphrontDialogResponse())->setDialog($dialog);
 | 
			
		||||
@@ -87,8 +87,8 @@ final class PhabricatorAuthUnlinkController
 | 
			
		||||
      ->setTitle(pht('Permanent Account Link'))
 | 
			
		||||
      ->appendChild(
 | 
			
		||||
        pht(
 | 
			
		||||
          "You can not unlink this account because the administrator has ".
 | 
			
		||||
          "configured Phabricator to make links to %s accounts permanent.",
 | 
			
		||||
          'You can not unlink this account because the administrator has '.
 | 
			
		||||
          'configured Phabricator to make links to %s accounts permanent.',
 | 
			
		||||
          $provider->getProviderName()))
 | 
			
		||||
      ->addCancelButton($this->getDoneURI());
 | 
			
		||||
 | 
			
		||||
@@ -101,10 +101,10 @@ final class PhabricatorAuthUnlinkController
 | 
			
		||||
      ->setTitle(pht('Last Valid Account'))
 | 
			
		||||
      ->appendChild(
 | 
			
		||||
        pht(
 | 
			
		||||
          "You can not unlink this account because you have no other ".
 | 
			
		||||
          "valid login accounts. If you removed it, you would be unable ".
 | 
			
		||||
          "to login. Add another authentication method before removing ".
 | 
			
		||||
          "this one."))
 | 
			
		||||
          'You can not unlink this account because you have no other '.
 | 
			
		||||
          'valid login accounts. If you removed it, you would be unable '.
 | 
			
		||||
          'to login. Add another authentication method before removing '.
 | 
			
		||||
          'this one.'))
 | 
			
		||||
      ->addCancelButton($this->getDoneURI());
 | 
			
		||||
 | 
			
		||||
    return id(new AphrontDialogResponse())->setDialog($dialog);
 | 
			
		||||
 
 | 
			
		||||
@@ -49,8 +49,8 @@ final class PhabricatorAuthValidateController
 | 
			
		||||
    if (!$failures) {
 | 
			
		||||
      if (!$viewer->getPHID()) {
 | 
			
		||||
        $failures[] = pht(
 | 
			
		||||
          "Login cookie was set correctly, but your login session is not ".
 | 
			
		||||
          "valid. Try clearing cookies and logging in again.");
 | 
			
		||||
          'Login cookie was set correctly, but your login session is not '.
 | 
			
		||||
          'valid. Try clearing cookies and logging in again.');
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -26,13 +26,13 @@ final class PhabricatorEmailLoginController
 | 
			
		||||
 | 
			
		||||
      $captcha_ok = AphrontFormRecaptchaControl::processCaptcha($request);
 | 
			
		||||
      if (!$captcha_ok) {
 | 
			
		||||
        $errors[] = pht("Captcha response is incorrect, try again.");
 | 
			
		||||
        $errors[] = pht('Captcha response is incorrect, try again.');
 | 
			
		||||
        $e_captcha = pht('Invalid');
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      $email = $request->getStr('email');
 | 
			
		||||
      if (!strlen($email)) {
 | 
			
		||||
       $errors[] = pht("You must provide an email address.");
 | 
			
		||||
       $errors[] = pht('You must provide an email address.');
 | 
			
		||||
       $e_email = pht('Required');
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
@@ -54,8 +54,8 @@ final class PhabricatorEmailLoginController
 | 
			
		||||
 | 
			
		||||
        if (!$target_user) {
 | 
			
		||||
          $errors[] =
 | 
			
		||||
            pht("There is no account associated with that email address.");
 | 
			
		||||
          $e_email = pht("Invalid");
 | 
			
		||||
            pht('There is no account associated with that email address.');
 | 
			
		||||
          $e_email = pht('Invalid');
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (!$errors) {
 | 
			
		||||
 
 | 
			
		||||
@@ -177,8 +177,8 @@ final class PhabricatorAuthEditController
 | 
			
		||||
    $email_domains = PhabricatorEnv::getEnvConfig($config_name);
 | 
			
		||||
    if ($email_domains) {
 | 
			
		||||
      $registration_warning = pht(
 | 
			
		||||
        "Users will only be able to register with a verified email address ".
 | 
			
		||||
        "at one of the configured [[ %s | %s ]] domains: **%s**",
 | 
			
		||||
        'Users will only be able to register with a verified email address '.
 | 
			
		||||
        'at one of the configured [[ %s | %s ]] domains: **%s**',
 | 
			
		||||
        $config_href,
 | 
			
		||||
        $config_name,
 | 
			
		||||
        implode(', ', $email_domains));
 | 
			
		||||
 
 | 
			
		||||
@@ -19,33 +19,33 @@ final class PhabricatorAuthManagementLDAPWorkflow
 | 
			
		||||
    if (!$provider) {
 | 
			
		||||
      $console->writeOut(
 | 
			
		||||
        "%s\n",
 | 
			
		||||
        "The LDAP authentication provider is not enabled.");
 | 
			
		||||
        'The LDAP authentication provider is not enabled.');
 | 
			
		||||
      exit(1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (!function_exists('ldap_connect')) {
 | 
			
		||||
      $console->writeOut(
 | 
			
		||||
        "%s\n",
 | 
			
		||||
        "The LDAP extension is not enabled.");
 | 
			
		||||
        'The LDAP extension is not enabled.');
 | 
			
		||||
      exit(1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $adapter = $provider->getAdapter();
 | 
			
		||||
 | 
			
		||||
    $console->writeOut("%s\n", pht('Enter LDAP Credentials'));
 | 
			
		||||
    $username = phutil_console_prompt("LDAP Username: ");
 | 
			
		||||
    $username = phutil_console_prompt('LDAP Username: ');
 | 
			
		||||
    if (!strlen($username)) {
 | 
			
		||||
      throw new PhutilArgumentUsageException(
 | 
			
		||||
        pht("You must enter an LDAP username."));
 | 
			
		||||
        pht('You must enter an LDAP username.'));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    phutil_passthru('stty -echo');
 | 
			
		||||
    $password = phutil_console_prompt("LDAP Password: ");
 | 
			
		||||
    $password = phutil_console_prompt('LDAP Password: ');
 | 
			
		||||
    phutil_passthru('stty echo');
 | 
			
		||||
 | 
			
		||||
    if (!strlen($password)) {
 | 
			
		||||
      throw new PhutilArgumentUsageException(
 | 
			
		||||
        pht("You must enter an LDAP password."));
 | 
			
		||||
        pht('You must enter an LDAP password.'));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $adapter->setLoginUsername($username);
 | 
			
		||||
 
 | 
			
		||||
@@ -67,12 +67,12 @@ final class PhabricatorAuthManagementRefreshWorkflow
 | 
			
		||||
 | 
			
		||||
    if (!$accounts) {
 | 
			
		||||
      throw new PhutilArgumentUsageException(
 | 
			
		||||
        pht("No accounts match the arguments!"));
 | 
			
		||||
        pht('No accounts match the arguments!'));
 | 
			
		||||
    } else {
 | 
			
		||||
      $console->writeOut(
 | 
			
		||||
        "%s\n",
 | 
			
		||||
        pht(
 | 
			
		||||
          "Found %s account(s) to refresh.",
 | 
			
		||||
          'Found %s account(s) to refresh.',
 | 
			
		||||
          new PhutilNumber(count($accounts))));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -82,7 +82,7 @@ final class PhabricatorAuthManagementRefreshWorkflow
 | 
			
		||||
      $console->writeOut(
 | 
			
		||||
        "%s\n",
 | 
			
		||||
        pht(
 | 
			
		||||
          "Refreshing account #%d (%s/%s).",
 | 
			
		||||
          'Refreshing account #%d (%s/%s).',
 | 
			
		||||
          $account->getID(),
 | 
			
		||||
          $account->getAccountType(),
 | 
			
		||||
          $account->getAccountDomain()));
 | 
			
		||||
@@ -91,7 +91,7 @@ final class PhabricatorAuthManagementRefreshWorkflow
 | 
			
		||||
      if (empty($providers[$key])) {
 | 
			
		||||
        $console->writeOut(
 | 
			
		||||
          "> %s\n",
 | 
			
		||||
          pht("Skipping, provider is not enabled or does not exist."));
 | 
			
		||||
          pht('Skipping, provider is not enabled or does not exist.'));
 | 
			
		||||
        continue;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
@@ -99,7 +99,7 @@ final class PhabricatorAuthManagementRefreshWorkflow
 | 
			
		||||
      if (!($provider instanceof PhabricatorAuthProviderOAuth2)) {
 | 
			
		||||
        $console->writeOut(
 | 
			
		||||
          "> %s\n",
 | 
			
		||||
          pht("Skipping, provider is not an OAuth2 provider."));
 | 
			
		||||
          pht('Skipping, provider is not an OAuth2 provider.'));
 | 
			
		||||
        continue;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
@@ -107,7 +107,7 @@ final class PhabricatorAuthManagementRefreshWorkflow
 | 
			
		||||
      if (!$adapter->supportsTokenRefresh()) {
 | 
			
		||||
        $console->writeOut(
 | 
			
		||||
          "> %s\n",
 | 
			
		||||
          pht("Skipping, provider does not support token refresh."));
 | 
			
		||||
          pht('Skipping, provider does not support token refresh.'));
 | 
			
		||||
        continue;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
@@ -115,14 +115,14 @@ final class PhabricatorAuthManagementRefreshWorkflow
 | 
			
		||||
      if (!$refresh_token) {
 | 
			
		||||
        $console->writeOut(
 | 
			
		||||
          "> %s\n",
 | 
			
		||||
          pht("Skipping, provider has no stored refresh token."));
 | 
			
		||||
          pht('Skipping, provider has no stored refresh token.'));
 | 
			
		||||
        continue;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      $console->writeOut(
 | 
			
		||||
        "+ %s\n",
 | 
			
		||||
        pht(
 | 
			
		||||
          "Refreshing token, current token expires in %s seconds.",
 | 
			
		||||
          'Refreshing token, current token expires in %s seconds.',
 | 
			
		||||
          new PhutilNumber(
 | 
			
		||||
            $account->getProperty('oauth.token.access.expires') - time())));
 | 
			
		||||
 | 
			
		||||
@@ -137,13 +137,13 @@ final class PhabricatorAuthManagementRefreshWorkflow
 | 
			
		||||
      $console->writeOut(
 | 
			
		||||
        "+ %s\n",
 | 
			
		||||
        pht(
 | 
			
		||||
          "Refreshed token, new token expires in %s seconds.",
 | 
			
		||||
          'Refreshed token, new token expires in %s seconds.',
 | 
			
		||||
          new PhutilNumber(
 | 
			
		||||
            $account->getProperty('oauth.token.access.expires') - time())));
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $console->writeOut("%s\n", pht("Done."));
 | 
			
		||||
    $console->writeOut("%s\n", pht('Done.'));
 | 
			
		||||
 | 
			
		||||
    return 0;
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -120,7 +120,7 @@ final class PhabricatorAuthManagementStripWorkflow
 | 
			
		||||
 | 
			
		||||
    $console = PhutilConsole::getConsole();
 | 
			
		||||
 | 
			
		||||
    $console->writeOut("%s\n\n", pht("These auth factors will be stripped:"));
 | 
			
		||||
    $console->writeOut("%s\n\n", pht('These auth factors will be stripped:'));
 | 
			
		||||
 | 
			
		||||
    foreach ($factors as $factor) {
 | 
			
		||||
      $impl = $factor->getImplementation();
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@ abstract class PhabricatorAuthProvider {
 | 
			
		||||
  public function getProviderConfig() {
 | 
			
		||||
    if ($this->providerConfig === null) {
 | 
			
		||||
      throw new Exception(
 | 
			
		||||
        "Call attachProviderConfig() before getProviderConfig()!");
 | 
			
		||||
        'Call attachProviderConfig() before getProviderConfig()!');
 | 
			
		||||
    }
 | 
			
		||||
    return $this->providerConfig;
 | 
			
		||||
  }
 | 
			
		||||
@@ -180,7 +180,7 @@ abstract class PhabricatorAuthProvider {
 | 
			
		||||
  protected function renderLoginForm(
 | 
			
		||||
    AphrontRequest $request,
 | 
			
		||||
    $mode) {
 | 
			
		||||
    throw new Exception("Not implemented!");
 | 
			
		||||
    throw new Exception('Not implemented!');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function createProviders() {
 | 
			
		||||
@@ -198,7 +198,7 @@ abstract class PhabricatorAuthProvider {
 | 
			
		||||
  protected function loadOrCreateAccount($account_id) {
 | 
			
		||||
    if (!strlen($account_id)) {
 | 
			
		||||
      throw new Exception(
 | 
			
		||||
        "loadOrCreateAccount(...): empty account ID!");
 | 
			
		||||
        'loadOrCreateAccount(...): empty account ID!');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $adapter = $this->getAdapter();
 | 
			
		||||
@@ -295,7 +295,7 @@ abstract class PhabricatorAuthProvider {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDefaultExternalAccount() {
 | 
			
		||||
    throw new Exception("Not implemented!");
 | 
			
		||||
    throw new Exception('Not implemented!');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getLoginOrder() {
 | 
			
		||||
 
 | 
			
		||||
@@ -167,7 +167,7 @@ final class PhabricatorAuthProviderLDAP
 | 
			
		||||
            $account_id = $adapter->getAccountID();
 | 
			
		||||
          DarkConsoleErrorLogPluginAPI::disableDiscardMode();
 | 
			
		||||
        } else {
 | 
			
		||||
          throw new Exception("Username and password are required!");
 | 
			
		||||
          throw new Exception('Username and password are required!');
 | 
			
		||||
        }
 | 
			
		||||
      } catch (PhutilAuthCredentialException $ex) {
 | 
			
		||||
        $response = $controller->buildProviderPageResponse(
 | 
			
		||||
@@ -346,20 +346,20 @@ final class PhabricatorAuthProviderLDAP
 | 
			
		||||
        "All of the attribute names used here are just examples: your LDAP ".
 | 
			
		||||
        "server may use different attribute names."),
 | 
			
		||||
      self::KEY_ALWAYS_SEARCH => pht(
 | 
			
		||||
        "To search for an LDAP record before authenticating, either check ".
 | 
			
		||||
        "the **Always Search** checkbox or enter an anonymous ".
 | 
			
		||||
        "username and password to use to perform the search."),
 | 
			
		||||
        'To search for an LDAP record before authenticating, either check '.
 | 
			
		||||
        'the **Always Search** checkbox or enter an anonymous '.
 | 
			
		||||
        'username and password to use to perform the search.'),
 | 
			
		||||
      self::KEY_USERNAME_ATTRIBUTE => pht(
 | 
			
		||||
        "Optionally, specify a username attribute to use to prefill usernames ".
 | 
			
		||||
        "when registering a new account. This is purely cosmetic and does not ".
 | 
			
		||||
        "affect the login process, but you can configure it to make sure ".
 | 
			
		||||
        "users get the same default username as their LDAP username, so ".
 | 
			
		||||
        "usernames remain consistent across systems."),
 | 
			
		||||
        'Optionally, specify a username attribute to use to prefill usernames '.
 | 
			
		||||
        'when registering a new account. This is purely cosmetic and does not '.
 | 
			
		||||
        'affect the login process, but you can configure it to make sure '.
 | 
			
		||||
        'users get the same default username as their LDAP username, so '.
 | 
			
		||||
        'usernames remain consistent across systems.'),
 | 
			
		||||
      self::KEY_REALNAME_ATTRIBUTES => pht(
 | 
			
		||||
        "Optionally, specify one or more comma-separated attributes to use to ".
 | 
			
		||||
        "prefill the \"Real Name\" field when registering a new account. This ".
 | 
			
		||||
        "is purely cosmetic and does not affect the login process, but can ".
 | 
			
		||||
        "make registration a little easier."),
 | 
			
		||||
        'Optionally, specify one or more comma-separated attributes to use to '.
 | 
			
		||||
        'prefill the "Real Name" field when registering a new account. This '.
 | 
			
		||||
        'is purely cosmetic and does not affect the login process, but can '.
 | 
			
		||||
        'make registration a little easier.'),
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
    foreach ($labels as $key => $label) {
 | 
			
		||||
 
 | 
			
		||||
@@ -198,7 +198,7 @@ abstract class PhabricatorAuthProviderOAuth2
 | 
			
		||||
    $force_refresh = false) {
 | 
			
		||||
 | 
			
		||||
    if ($account->getProviderKey() !== $this->getProviderKey()) {
 | 
			
		||||
      throw new Exception("Account does not match provider!");
 | 
			
		||||
      throw new Exception('Account does not match provider!');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (!$force_refresh) {
 | 
			
		||||
 
 | 
			
		||||
@@ -55,12 +55,12 @@ final class PhabricatorAuthProviderPersona
 | 
			
		||||
    $response = null;
 | 
			
		||||
 | 
			
		||||
    if (!$request->isAjax()) {
 | 
			
		||||
      throw new Exception("Expected this request to come via Ajax.");
 | 
			
		||||
      throw new Exception('Expected this request to come via Ajax.');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $assertion = $request->getStr('assertion');
 | 
			
		||||
    if (!$assertion) {
 | 
			
		||||
      throw new Exception("Expected identity assertion.");
 | 
			
		||||
      throw new Exception('Expected identity assertion.');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $adapter->setAssertion($assertion);
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@ final class PhabricatorAuthProviderConfigTransaction
 | 
			
		||||
  const TYPE_REGISTRATION   = 'config:registration';
 | 
			
		||||
  const TYPE_LINK           = 'config:link';
 | 
			
		||||
  const TYPE_UNLINK         = 'config:unlink';
 | 
			
		||||
  const TYPE_TRUST_EMAILS   = "config:trustEmails";
 | 
			
		||||
  const TYPE_TRUST_EMAILS   = 'config:trustEmails';
 | 
			
		||||
  const TYPE_PROPERTY       = 'config:property';
 | 
			
		||||
 | 
			
		||||
  const PROPERTY_KEY        = 'auth:property';
 | 
			
		||||
 
 | 
			
		||||
@@ -251,7 +251,7 @@ abstract class PhabricatorController extends AphrontController {
 | 
			
		||||
 | 
			
		||||
  public function getApplicationURI($path = '') {
 | 
			
		||||
    if (!$this->getCurrentApplication()) {
 | 
			
		||||
      throw new Exception("No application!");
 | 
			
		||||
      throw new Exception('No application!');
 | 
			
		||||
    }
 | 
			
		||||
    return $this->getCurrentApplication()->getApplicationURI($path);
 | 
			
		||||
  }
 | 
			
		||||
@@ -324,7 +324,7 @@ abstract class PhabricatorController extends AphrontController {
 | 
			
		||||
      if (isset($seen[$hash])) {
 | 
			
		||||
        $seen[] = get_class($response);
 | 
			
		||||
        throw new Exception(
 | 
			
		||||
          "Cycle while reducing proxy responses: ".
 | 
			
		||||
          'Cycle while reducing proxy responses: '.
 | 
			
		||||
          implode(' -> ', $seen));
 | 
			
		||||
      }
 | 
			
		||||
      $seen[$hash] = get_class($response);
 | 
			
		||||
 
 | 
			
		||||
@@ -63,7 +63,7 @@ final class PhabricatorAccessControlTestCase
 | 
			
		||||
    // Test standard defaults.
 | 
			
		||||
 | 
			
		||||
    $this->checkAccess(
 | 
			
		||||
      "Default",
 | 
			
		||||
      'Default',
 | 
			
		||||
      id(clone $controller),
 | 
			
		||||
      $request,
 | 
			
		||||
      array(
 | 
			
		||||
@@ -82,7 +82,7 @@ final class PhabricatorAccessControlTestCase
 | 
			
		||||
 | 
			
		||||
    $env->overrideEnvConfig('auth.require-email-verification', true);
 | 
			
		||||
    $this->checkAccess(
 | 
			
		||||
      "Email Verification Required",
 | 
			
		||||
      'Email Verification Required',
 | 
			
		||||
      id(clone $controller),
 | 
			
		||||
      $request,
 | 
			
		||||
      array(
 | 
			
		||||
@@ -97,7 +97,7 @@ final class PhabricatorAccessControlTestCase
 | 
			
		||||
      ));
 | 
			
		||||
 | 
			
		||||
    $this->checkAccess(
 | 
			
		||||
      "Email Verification Required, With Exception",
 | 
			
		||||
      'Email Verification Required, With Exception',
 | 
			
		||||
      id(clone $controller)->setConfig('email', false),
 | 
			
		||||
      $request,
 | 
			
		||||
      array(
 | 
			
		||||
@@ -116,7 +116,7 @@ final class PhabricatorAccessControlTestCase
 | 
			
		||||
    // Test admin access.
 | 
			
		||||
 | 
			
		||||
    $this->checkAccess(
 | 
			
		||||
      "Admin Required",
 | 
			
		||||
      'Admin Required',
 | 
			
		||||
      id(clone $controller)->setConfig('admin', true),
 | 
			
		||||
      $request,
 | 
			
		||||
      array(
 | 
			
		||||
@@ -134,7 +134,7 @@ final class PhabricatorAccessControlTestCase
 | 
			
		||||
    // Test disabled access.
 | 
			
		||||
 | 
			
		||||
    $this->checkAccess(
 | 
			
		||||
      "Allow Disabled",
 | 
			
		||||
      'Allow Disabled',
 | 
			
		||||
      id(clone $controller)->setConfig('enabled', false),
 | 
			
		||||
      $request,
 | 
			
		||||
      array(
 | 
			
		||||
@@ -152,7 +152,7 @@ final class PhabricatorAccessControlTestCase
 | 
			
		||||
    // Test no login required.
 | 
			
		||||
 | 
			
		||||
    $this->checkAccess(
 | 
			
		||||
      "No Login Required",
 | 
			
		||||
      'No Login Required',
 | 
			
		||||
      id(clone $controller)->setConfig('login', false),
 | 
			
		||||
      $request,
 | 
			
		||||
      array(
 | 
			
		||||
@@ -170,7 +170,7 @@ final class PhabricatorAccessControlTestCase
 | 
			
		||||
    // Test public access.
 | 
			
		||||
 | 
			
		||||
    $this->checkAccess(
 | 
			
		||||
      "No Login Required",
 | 
			
		||||
      'No Login Required',
 | 
			
		||||
      id(clone $controller)->setConfig('public', true),
 | 
			
		||||
      $request,
 | 
			
		||||
      array(
 | 
			
		||||
@@ -185,7 +185,7 @@ final class PhabricatorAccessControlTestCase
 | 
			
		||||
 | 
			
		||||
    $env->overrideEnvConfig('policy.allow-public', true);
 | 
			
		||||
    $this->checkAccess(
 | 
			
		||||
      "Public + configured",
 | 
			
		||||
      'Public + configured',
 | 
			
		||||
      id(clone $controller)->setConfig('public', true),
 | 
			
		||||
      $request,
 | 
			
		||||
      array(
 | 
			
		||||
@@ -210,7 +210,7 @@ final class PhabricatorAccessControlTestCase
 | 
			
		||||
    $app_controller = id(clone $controller)->setCurrentApplication($app);
 | 
			
		||||
 | 
			
		||||
    $this->checkAccess(
 | 
			
		||||
      "Application Controller",
 | 
			
		||||
      'Application Controller',
 | 
			
		||||
      $app_controller,
 | 
			
		||||
      $request,
 | 
			
		||||
      array(
 | 
			
		||||
@@ -225,7 +225,7 @@ final class PhabricatorAccessControlTestCase
 | 
			
		||||
      ));
 | 
			
		||||
 | 
			
		||||
    $this->checkAccess(
 | 
			
		||||
      "Application Controller",
 | 
			
		||||
      'Application Controller',
 | 
			
		||||
      id(clone $app_controller)->setConfig('login', false),
 | 
			
		||||
      $request,
 | 
			
		||||
      array(
 | 
			
		||||
 
 | 
			
		||||
@@ -136,7 +136,7 @@ final class PhabricatorKeyValueDatabaseCache
 | 
			
		||||
 | 
			
		||||
  private function willWriteValue($key, $value) {
 | 
			
		||||
    if (!is_string($value)) {
 | 
			
		||||
      throw new Exception("Only strings may be written to the DB cache!");
 | 
			
		||||
      throw new Exception('Only strings may be written to the DB cache!');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static $can_deflate;
 | 
			
		||||
@@ -162,7 +162,7 @@ final class PhabricatorKeyValueDatabaseCache
 | 
			
		||||
      case self::CACHE_FORMAT_DEFLATE:
 | 
			
		||||
        return PhabricatorCaches::inflateData($value);
 | 
			
		||||
      default:
 | 
			
		||||
        throw new Exception("Unknown cache format.");
 | 
			
		||||
        throw new Exception('Unknown cache format.');
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -52,19 +52,19 @@ final class PhabricatorCacheManagementPurgeWorkflow
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if ($purge['remarkup']) {
 | 
			
		||||
      $console->writeOut("Purging remarkup cache...");
 | 
			
		||||
      $console->writeOut('Purging remarkup cache...');
 | 
			
		||||
      $this->purgeRemarkupCache();
 | 
			
		||||
      $console->writeOut("done.\n");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if ($purge['changeset']) {
 | 
			
		||||
      $console->writeOut("Purging changeset cache...");
 | 
			
		||||
      $console->writeOut('Purging changeset cache...');
 | 
			
		||||
      $this->purgeChangesetCache();
 | 
			
		||||
      $console->writeOut("done.\n");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if ($purge['general']) {
 | 
			
		||||
      $console->writeOut("Purging general cache...");
 | 
			
		||||
      $console->writeOut('Purging general cache...');
 | 
			
		||||
      $this->purgeGeneralCache();
 | 
			
		||||
      $console->writeOut("done.\n");
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -88,7 +88,7 @@ final class AphrontCalendarEventView extends AphrontView {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function render() {
 | 
			
		||||
    throw new Exception("Events are only rendered indirectly.");
 | 
			
		||||
    throw new Exception('Events are only rendered indirectly.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -11,7 +11,7 @@ final class ConduitAPI_chatlog_query_Method
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getMethodDescription() {
 | 
			
		||||
    return "Retrieve chatter.";
 | 
			
		||||
    return 'Retrieve chatter.';
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function defineParamTypes() {
 | 
			
		||||
 
 | 
			
		||||
@@ -11,7 +11,7 @@ final class ConduitAPI_chatlog_record_Method
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getMethodDescription() {
 | 
			
		||||
    return "Record chatter.";
 | 
			
		||||
    return 'Record chatter.';
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function defineParamTypes() {
 | 
			
		||||
 
 | 
			
		||||
@@ -152,7 +152,7 @@ final class PhabricatorChatLogChannelLogController
 | 
			
		||||
        array(
 | 
			
		||||
          'href' => $first_uri,
 | 
			
		||||
        ),
 | 
			
		||||
        "\xC2\xAB ". pht("Newest"));
 | 
			
		||||
        "\xC2\xAB ". pht('Newest'));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $prev_uri = $pager->getPrevPageURI();
 | 
			
		||||
@@ -162,7 +162,7 @@ final class PhabricatorChatLogChannelLogController
 | 
			
		||||
        array(
 | 
			
		||||
          'href' => $prev_uri,
 | 
			
		||||
        ),
 | 
			
		||||
        "\xE2\x80\xB9 " . pht("Newer"));
 | 
			
		||||
        "\xE2\x80\xB9 " . pht('Newer'));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $next_uri = $pager->getNextPageURI();
 | 
			
		||||
@@ -172,7 +172,7 @@ final class PhabricatorChatLogChannelLogController
 | 
			
		||||
        array(
 | 
			
		||||
          'href' => $next_uri,
 | 
			
		||||
        ),
 | 
			
		||||
        pht("Older") . " \xE2\x80\xBA");
 | 
			
		||||
        pht('Older') . " \xE2\x80\xBA");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $pager_top = phutil_tag(
 | 
			
		||||
@@ -224,7 +224,7 @@ final class PhabricatorChatLogChannelLogController
 | 
			
		||||
        array(
 | 
			
		||||
          'href' => '#latest'
 | 
			
		||||
        ),
 | 
			
		||||
        pht("Jump to Bottom") . " \xE2\x96\xBE");
 | 
			
		||||
        pht('Jump to Bottom') . " \xE2\x96\xBE");
 | 
			
		||||
 | 
			
		||||
    $jump = phutil_tag(
 | 
			
		||||
      'div',
 | 
			
		||||
 
 | 
			
		||||
@@ -114,7 +114,7 @@ final class ConduitCall {
 | 
			
		||||
      if (!$allow_public) {
 | 
			
		||||
        if (!$user->isLoggedIn() && !$user->isOmnipotent()) {
 | 
			
		||||
          // TODO: As per below, this should get centralized and cleaned up.
 | 
			
		||||
          throw new ConduitException("ERR-INVALID-AUTH");
 | 
			
		||||
          throw new ConduitException('ERR-INVALID-AUTH');
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
@@ -131,8 +131,8 @@ final class ConduitCall {
 | 
			
		||||
        if (!$can_view) {
 | 
			
		||||
          throw new ConduitException(
 | 
			
		||||
            pht(
 | 
			
		||||
              "You do not have access to the application which provides this ".
 | 
			
		||||
              "API method."));
 | 
			
		||||
              'You do not have access to the application which provides this '.
 | 
			
		||||
              'API method.'));
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
@@ -142,7 +142,7 @@ final class ConduitCall {
 | 
			
		||||
      $client = new ConduitClient($server);
 | 
			
		||||
      $params = $this->request->getAllParameters();
 | 
			
		||||
 | 
			
		||||
      $params["__conduit__"]["isProxied"] = true;
 | 
			
		||||
      $params['__conduit__']['isProxied'] = true;
 | 
			
		||||
 | 
			
		||||
      if ($this->handler->shouldRequireAuthentication()) {
 | 
			
		||||
        $client->callMethodSynchronous(
 | 
			
		||||
@@ -152,7 +152,7 @@ final class ConduitCall {
 | 
			
		||||
             'clientVersion'     => '1.0',
 | 
			
		||||
             'user'              => $this->getUser()->getUserName(),
 | 
			
		||||
             'certificate'       => $this->getUser()->getConduitCertificate(),
 | 
			
		||||
             '__conduit__'       => $params["__conduit__"],
 | 
			
		||||
             '__conduit__'       => $params['__conduit__'],
 | 
			
		||||
        ));
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -23,6 +23,6 @@ final class ConduitCallTestCase extends PhabricatorTestCase {
 | 
			
		||||
 | 
			
		||||
    $this->assertTrue(
 | 
			
		||||
      ($caught instanceof ConduitException),
 | 
			
		||||
      "user.whoami should require authentication");
 | 
			
		||||
      'user.whoami should require authentication');
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -4,18 +4,18 @@ final class PhabricatorConduitConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("Conduit");
 | 
			
		||||
    return pht('Conduit');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Configure conduit.");
 | 
			
		||||
    return pht('Configure conduit.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
    return array(
 | 
			
		||||
      $this->newOption("conduit.servers", "list<string>", array())
 | 
			
		||||
      $this->newOption('conduit.servers', 'list<string>', array())
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(pht("Servers that conduit can connect to."))
 | 
			
		||||
        ->setSummary(pht('Servers that conduit can connect to.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
            pht(
 | 
			
		||||
              "Set an array of servers where conduit can connect to. This is ".
 | 
			
		||||
 
 | 
			
		||||
@@ -168,7 +168,7 @@ final class PhabricatorConduitAPIController
 | 
			
		||||
    $user_name) {
 | 
			
		||||
 | 
			
		||||
    if (!$api_request->getUser()->getIsAdmin()) {
 | 
			
		||||
      throw new Exception("Only administrators can use actAsUser");
 | 
			
		||||
      throw new Exception('Only administrators can use actAsUser');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $user = id(new PhabricatorUser())->loadOneWhere(
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@ final class ConduitAPI_conduit_connect_Method extends ConduitAPIMethod {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getMethodDescription() {
 | 
			
		||||
    return "Connect a session-based client.";
 | 
			
		||||
    return 'Connect a session-based client.';
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function defineParamTypes() {
 | 
			
		||||
@@ -35,22 +35,22 @@ final class ConduitAPI_conduit_connect_Method extends ConduitAPIMethod {
 | 
			
		||||
 | 
			
		||||
  public function defineErrorTypes() {
 | 
			
		||||
    return array(
 | 
			
		||||
      "ERR-BAD-VERSION" =>
 | 
			
		||||
        "Client/server version mismatch. Upgrade your server or downgrade ".
 | 
			
		||||
        "your client.",
 | 
			
		||||
      "NEW-ARC-VERSION" =>
 | 
			
		||||
        "Client/server version mismatch. Upgrade your client.",
 | 
			
		||||
      "ERR-UNKNOWN-CLIENT" =>
 | 
			
		||||
        "Client is unknown.",
 | 
			
		||||
      "ERR-INVALID-USER" =>
 | 
			
		||||
        "The username you are attempting to authenticate with is not valid.",
 | 
			
		||||
      "ERR-INVALID-CERTIFICATE" =>
 | 
			
		||||
        "Your authentication certificate for this server is invalid.",
 | 
			
		||||
      "ERR-INVALID-TOKEN" =>
 | 
			
		||||
      'ERR-BAD-VERSION' =>
 | 
			
		||||
        'Client/server version mismatch. Upgrade your server or downgrade '.
 | 
			
		||||
        'your client.',
 | 
			
		||||
      'NEW-ARC-VERSION' =>
 | 
			
		||||
        'Client/server version mismatch. Upgrade your client.',
 | 
			
		||||
      'ERR-UNKNOWN-CLIENT' =>
 | 
			
		||||
        'Client is unknown.',
 | 
			
		||||
      'ERR-INVALID-USER' =>
 | 
			
		||||
        'The username you are attempting to authenticate with is not valid.',
 | 
			
		||||
      'ERR-INVALID-CERTIFICATE' =>
 | 
			
		||||
        'Your authentication certificate for this server is invalid.',
 | 
			
		||||
      'ERR-INVALID-TOKEN' =>
 | 
			
		||||
        "The challenge token you are authenticating with is outside of the ".
 | 
			
		||||
        "allowed time range. Either your system clock is out of whack or ".
 | 
			
		||||
        "you're executing a replay attack.",
 | 
			
		||||
      "ERR-NO-CERTIFICATE" => "This server requires authentication.",
 | 
			
		||||
      'ERR-NO-CERTIFICATE' => 'This server requires authentication.',
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -126,13 +126,13 @@ final class ConduitAPI_conduit_connect_Method extends ConduitAPIMethod {
 | 
			
		||||
        throw id(new ConduitException('ERR-INVALID-TOKEN'))
 | 
			
		||||
          ->setErrorDescription(
 | 
			
		||||
            pht(
 | 
			
		||||
              "The request you submitted is signed with a timestamp, but that ".
 | 
			
		||||
              "timestamp is not within %s of the current time. The ".
 | 
			
		||||
              "signed timestamp is %s (%s), and the current server time is ".
 | 
			
		||||
              "%s (%s). This is a difference of %s seconds, but the ".
 | 
			
		||||
              "timestamp must differ from the server time by no more than ".
 | 
			
		||||
              "%s seconds. Your client or server clock may not be set ".
 | 
			
		||||
              "correctly.",
 | 
			
		||||
              'The request you submitted is signed with a timestamp, but that '.
 | 
			
		||||
              'timestamp is not within %s of the current time. The '.
 | 
			
		||||
              'signed timestamp is %s (%s), and the current server time is '.
 | 
			
		||||
              '%s (%s). This is a difference of %s seconds, but the '.
 | 
			
		||||
              'timestamp must differ from the server time by no more than '.
 | 
			
		||||
              '%s seconds. Your client or server clock may not be set '.
 | 
			
		||||
              'correctly.',
 | 
			
		||||
              phabricator_format_relative_time($threshold),
 | 
			
		||||
              $token,
 | 
			
		||||
              date('r', $token),
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,7 @@ final class ConduitAPI_conduit_getcertificate_Method extends ConduitAPIMethod {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getMethodDescription() {
 | 
			
		||||
    return "Retrieve certificate information for a user.";
 | 
			
		||||
    return 'Retrieve certificate information for a user.';
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function defineParamTypes() {
 | 
			
		||||
@@ -31,10 +31,10 @@ final class ConduitAPI_conduit_getcertificate_Method extends ConduitAPIMethod {
 | 
			
		||||
 | 
			
		||||
  public function defineErrorTypes() {
 | 
			
		||||
    return array(
 | 
			
		||||
      "ERR-BAD-TOKEN" => "Token does not exist or has expired.",
 | 
			
		||||
      "ERR-RATE-LIMIT" =>
 | 
			
		||||
        "You have made too many invalid token requests recently. Wait before ".
 | 
			
		||||
        "making more.",
 | 
			
		||||
      'ERR-BAD-TOKEN' => 'Token does not exist or has expired.',
 | 
			
		||||
      'ERR-RATE-LIMIT' =>
 | 
			
		||||
        'You have made too many invalid token requests recently. Wait before '.
 | 
			
		||||
        'making more.',
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -70,7 +70,7 @@ final class ConduitAPI_conduit_getcertificate_Method extends ConduitAPIMethod {
 | 
			
		||||
      'phid = %s',
 | 
			
		||||
      $info->getUserPHID());
 | 
			
		||||
    if (!$user) {
 | 
			
		||||
      throw new Exception("Certificate token points to an invalid user!");
 | 
			
		||||
      throw new Exception('Certificate token points to an invalid user!');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return array(
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,7 @@ final class ConduitAPI_conduit_ping_Method extends ConduitAPIMethod {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getMethodDescription() {
 | 
			
		||||
    return "Basic ping for monitoring or a health-check.";
 | 
			
		||||
    return 'Basic ping for monitoring or a health-check.';
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function defineParamTypes() {
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
final class ConduitAPI_conduit_query_Method extends ConduitAPIMethod {
 | 
			
		||||
 | 
			
		||||
  public function getMethodDescription() {
 | 
			
		||||
    return "Returns the parameters of the Conduit methods.";
 | 
			
		||||
    return 'Returns the parameters of the Conduit methods.';
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function defineParamTypes() {
 | 
			
		||||
@@ -30,10 +30,10 @@ final class ConduitAPI_conduit_query_Method extends ConduitAPIMethod {
 | 
			
		||||
 | 
			
		||||
    $names_to_params = array();
 | 
			
		||||
    foreach ($classes as $class) {
 | 
			
		||||
      $method_name = $class["name"];
 | 
			
		||||
      $method_name = $class['name'];
 | 
			
		||||
      $obj = newv($method_name, array());
 | 
			
		||||
      $names_to_params[$this->getAPIMethodNameFromClassName($method_name)] =
 | 
			
		||||
        array("params" => $obj->defineParamTypes());
 | 
			
		||||
        array('params' => $obj->defineParamTypes());
 | 
			
		||||
    }
 | 
			
		||||
    return $names_to_params;
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -38,9 +38,9 @@ final class ConduitAPIRequest {
 | 
			
		||||
  public function getUser() {
 | 
			
		||||
    if (!$this->user) {
 | 
			
		||||
      throw new Exception(
 | 
			
		||||
        "You can not access the user inside the implementation of a Conduit ".
 | 
			
		||||
        "method which does not require authentication (as per ".
 | 
			
		||||
        "shouldRequireAuthentication()).");
 | 
			
		||||
        'You can not access the user inside the implementation of a Conduit '.
 | 
			
		||||
        'method which does not require authentication (as per '.
 | 
			
		||||
        'shouldRequireAuthentication()).');
 | 
			
		||||
    }
 | 
			
		||||
    return $this->user;
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -18,9 +18,9 @@ final class ConduitSSHWorkflow extends PhabricatorSSHWorkflow {
 | 
			
		||||
 | 
			
		||||
    $methodv = $args->getArg('method');
 | 
			
		||||
    if (!$methodv) {
 | 
			
		||||
      throw new Exception("No Conduit method provided.");
 | 
			
		||||
      throw new Exception('No Conduit method provided.');
 | 
			
		||||
    } else if (count($methodv) > 1) {
 | 
			
		||||
      throw new Exception("Too many Conduit methods provided.");
 | 
			
		||||
      throw new Exception('Too many Conduit methods provided.');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $method = head($methodv);
 | 
			
		||||
@@ -28,7 +28,7 @@ final class ConduitSSHWorkflow extends PhabricatorSSHWorkflow {
 | 
			
		||||
    $json = $this->readAllInput();
 | 
			
		||||
    $raw_params = json_decode($json, true);
 | 
			
		||||
    if (!is_array($raw_params)) {
 | 
			
		||||
      throw new Exception("Invalid JSON input.");
 | 
			
		||||
      throw new Exception('Invalid JSON input.');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $params = idx($raw_params, 'params', '[]');
 | 
			
		||||
 
 | 
			
		||||
@@ -19,7 +19,7 @@ final class PhabricatorSetupCheckAPC extends PhabricatorSetupCheck {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (!ini_get('apc.enabled')) {
 | 
			
		||||
      $summary = pht("Enabling APC will dramatically improve performance.");
 | 
			
		||||
      $summary = pht('Enabling APC will dramatically improve performance.');
 | 
			
		||||
      $message = pht(
 | 
			
		||||
        "The PHP extension 'APC' is installed, but not enabled in your PHP ".
 | 
			
		||||
        "configuration. Enabling it will dramatically improve Phabricator ".
 | 
			
		||||
 
 | 
			
		||||
@@ -55,7 +55,7 @@ final class PhabricatorSetupCheckBaseURI extends PhabricatorSetupCheck {
 | 
			
		||||
    $this
 | 
			
		||||
      ->newIssue('config.phabricator.base-uri')
 | 
			
		||||
      ->setShortName(pht('No Base URI'))
 | 
			
		||||
      ->setName(pht("Base URI Not Configured"))
 | 
			
		||||
      ->setName(pht('Base URI Not Configured'))
 | 
			
		||||
      ->setSummary($summary)
 | 
			
		||||
      ->setMessage($message)
 | 
			
		||||
      ->addCommand(
 | 
			
		||||
 
 | 
			
		||||
@@ -29,7 +29,7 @@ final class PhabricatorSetupCheckExtraConfig extends PhabricatorSetupCheck {
 | 
			
		||||
        $short = pht('Obsolete Config');
 | 
			
		||||
        $name = pht('Obsolete Configuration Option "%s"', $key);
 | 
			
		||||
      } else {
 | 
			
		||||
        $summary = pht("This option is not recognized. It may be misspelled.");
 | 
			
		||||
        $summary = pht('This option is not recognized. It may be misspelled.');
 | 
			
		||||
        $message = pht(
 | 
			
		||||
          "The configuration option '%s' is not recognized. It may be ".
 | 
			
		||||
          "misspelled, or it might have existed in an older version of ".
 | 
			
		||||
@@ -65,8 +65,8 @@ final class PhabricatorSetupCheckExtraConfig extends PhabricatorSetupCheck {
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      $message = $message."\n\n".pht(
 | 
			
		||||
        "This configuration value is defined in these %d ".
 | 
			
		||||
        "configuration source(s): %s.",
 | 
			
		||||
        'This configuration value is defined in these %d '.
 | 
			
		||||
        'configuration source(s): %s.',
 | 
			
		||||
        count($found),
 | 
			
		||||
        implode(', ', $found));
 | 
			
		||||
      $issue->setMessage($message);
 | 
			
		||||
 
 | 
			
		||||
@@ -41,7 +41,7 @@ final class PhabricatorSetupCheckMail extends PhabricatorSetupCheck {
 | 
			
		||||
            'different mail adapter.');
 | 
			
		||||
 | 
			
		||||
          $this->newIssue('config.amazon-ses.access-key')
 | 
			
		||||
            ->setName(pht("Amazon SES Access Key Not Set"))
 | 
			
		||||
            ->setName(pht('Amazon SES Access Key Not Set'))
 | 
			
		||||
            ->setMessage($message)
 | 
			
		||||
            ->addRelatedPhabricatorConfig('metamta.mail-adapter')
 | 
			
		||||
            ->addPhabricatorConfig('amazon-ses.access-key');
 | 
			
		||||
@@ -54,7 +54,7 @@ final class PhabricatorSetupCheckMail extends PhabricatorSetupCheck {
 | 
			
		||||
            'different mail adapter.');
 | 
			
		||||
 | 
			
		||||
          $this->newIssue('config.amazon-ses.secret-key')
 | 
			
		||||
            ->setName(pht("Amazon SES Secret Key Not Set"))
 | 
			
		||||
            ->setName(pht('Amazon SES Secret Key Not Set'))
 | 
			
		||||
            ->setMessage($message)
 | 
			
		||||
            ->addRelatedPhabricatorConfig('metamta.mail-adapter')
 | 
			
		||||
            ->addPhabricatorConfig('amazon-ses.secret-key');
 | 
			
		||||
@@ -71,7 +71,7 @@ final class PhabricatorSetupCheckMail extends PhabricatorSetupCheck {
 | 
			
		||||
            'a "From" address, or choose a different mail adapter.');
 | 
			
		||||
 | 
			
		||||
          $this->newIssue('config.metamta.default-address')
 | 
			
		||||
            ->setName(pht("No SES From Address Configured"))
 | 
			
		||||
            ->setName(pht('No SES From Address Configured'))
 | 
			
		||||
            ->setMessage($message)
 | 
			
		||||
            ->addRelatedPhabricatorConfig('metamta.mail-adapter')
 | 
			
		||||
            ->addPhabricatorConfig('metamta.default-address');
 | 
			
		||||
 
 | 
			
		||||
@@ -25,12 +25,12 @@ final class PhabricatorSetupCheckMySQL extends PhabricatorSetupCheck {
 | 
			
		||||
        ->setMessage($message);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $mode_string = queryfx_one($conn_raw, "SELECT @@sql_mode");
 | 
			
		||||
    $mode_string = queryfx_one($conn_raw, 'SELECT @@sql_mode');
 | 
			
		||||
    $modes = explode(',', $mode_string['@@sql_mode']);
 | 
			
		||||
    if (!in_array('STRICT_ALL_TABLES', $modes)) {
 | 
			
		||||
      $summary = pht(
 | 
			
		||||
        "MySQL is not in strict mode, but using strict mode is strongly ".
 | 
			
		||||
        "encouraged.");
 | 
			
		||||
        'MySQL is not in strict mode, but using strict mode is strongly '.
 | 
			
		||||
        'encouraged.');
 | 
			
		||||
 | 
			
		||||
      $message = pht(
 | 
			
		||||
        "On your MySQL instance, the global %s is not set to %s. ".
 | 
			
		||||
 
 | 
			
		||||
@@ -103,8 +103,8 @@ final class PhabricatorSetupCheckPath extends PhabricatorSetupCheck {
 | 
			
		||||
          ->setName(pht('$PATH Component Unusable'))
 | 
			
		||||
          ->setSummary(
 | 
			
		||||
            pht(
 | 
			
		||||
              "A component of the configured PATH can not be used by ".
 | 
			
		||||
              "the webserver: %s",
 | 
			
		||||
              'A component of the configured PATH can not be used by '.
 | 
			
		||||
              'the webserver: %s',
 | 
			
		||||
              $path_part))
 | 
			
		||||
          ->setMessage(
 | 
			
		||||
            pht(
 | 
			
		||||
 
 | 
			
		||||
@@ -18,8 +18,8 @@ final class PhabricatorSetupCheckRepositories extends PhabricatorSetupCheck {
 | 
			
		||||
 | 
			
		||||
    if (!Filesystem::pathExists($repo_path)) {
 | 
			
		||||
      $summary = pht(
 | 
			
		||||
        "The path for local repositories does not exist, or is not ".
 | 
			
		||||
        "readable by the webserver.");
 | 
			
		||||
        'The path for local repositories does not exist, or is not '.
 | 
			
		||||
        'readable by the webserver.');
 | 
			
		||||
      $message = pht(
 | 
			
		||||
        "The directory for local repositories (%s) does not exist, or is not ".
 | 
			
		||||
        "readable by the webserver. Phabricator uses this directory to store ".
 | 
			
		||||
 
 | 
			
		||||
@@ -31,8 +31,8 @@ final class PhabricatorSetupCheckTimezone extends PhabricatorSetupCheck {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $summary = pht(
 | 
			
		||||
      "Without a configured timezone, PHP will emit warnings when working ".
 | 
			
		||||
      "with dates, and dates and times may not display correctly.");
 | 
			
		||||
      'Without a configured timezone, PHP will emit warnings when working '.
 | 
			
		||||
      'with dates, and dates and times may not display correctly.');
 | 
			
		||||
 | 
			
		||||
    $message = pht(
 | 
			
		||||
      "Your configuration fails to specify a server timezone. You can either ".
 | 
			
		||||
 
 | 
			
		||||
@@ -24,8 +24,8 @@ final class PhabricatorConfigEditController
 | 
			
		||||
          $ancient[$this->key]);
 | 
			
		||||
      } else {
 | 
			
		||||
        $desc = pht(
 | 
			
		||||
          "This configuration option is unknown. It may be misspelled, ".
 | 
			
		||||
          "or have existed in a previous version of Phabricator.");
 | 
			
		||||
          'This configuration option is unknown. It may be misspelled, '.
 | 
			
		||||
          'or have existed in a previous version of Phabricator.');
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      // This may be a dead config entry, which existed in the past but no
 | 
			
		||||
@@ -112,8 +112,8 @@ final class PhabricatorConfigEditController
 | 
			
		||||
        ->setErrors($errors);
 | 
			
		||||
    } else if ($option->getHidden()) {
 | 
			
		||||
      $msg = pht(
 | 
			
		||||
        "This configuration is hidden and can not be edited or viewed from ".
 | 
			
		||||
        "the web interface.");
 | 
			
		||||
        'This configuration is hidden and can not be edited or viewed from '.
 | 
			
		||||
        'the web interface.');
 | 
			
		||||
 | 
			
		||||
      $error_view = id(new AphrontErrorView())
 | 
			
		||||
        ->setTitle(pht('Configuration Hidden'))
 | 
			
		||||
@@ -121,8 +121,8 @@ final class PhabricatorConfigEditController
 | 
			
		||||
        ->appendChild(phutil_tag('p', array(), $msg));
 | 
			
		||||
    } else if ($option->getLocked()) {
 | 
			
		||||
      $msg = pht(
 | 
			
		||||
        "This configuration is locked and can not be edited from the web ".
 | 
			
		||||
        "interface. Use `./bin/config` in `phabricator/` to edit it.");
 | 
			
		||||
        'This configuration is locked and can not be edited from the web '.
 | 
			
		||||
        'interface. Use `./bin/config` in `phabricator/` to edit it.');
 | 
			
		||||
 | 
			
		||||
      $error_view = id(new AphrontErrorView())
 | 
			
		||||
        ->setTitle(pht('Configuration Locked'))
 | 
			
		||||
 
 | 
			
		||||
@@ -31,8 +31,8 @@ final class PhabricatorConfigIgnoreController
 | 
			
		||||
      $title = pht('Unignore this setup issue?');
 | 
			
		||||
      $submit_title = pht('Unignore');
 | 
			
		||||
      $body = pht(
 | 
			
		||||
        "This issue will no longer be suppressed, and will return to its ".
 | 
			
		||||
        "rightful place as a global setup warning.");
 | 
			
		||||
        'This issue will no longer be suppressed, and will return to its '.
 | 
			
		||||
        'rightful place as a global setup warning.');
 | 
			
		||||
    } else {
 | 
			
		||||
      throw new Exception('Unrecognized verb: ' . $this->verb);
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,7 @@ final class PhabricatorConfigIssueListController
 | 
			
		||||
      PhabricatorSetupCheck::countUnignoredIssues($issues));
 | 
			
		||||
 | 
			
		||||
    $list = $this->buildIssueList($issues);
 | 
			
		||||
    $list->setNoDataString(pht("There are no open setup issues."));
 | 
			
		||||
    $list->setNoDataString(pht('There are no open setup issues.'));
 | 
			
		||||
 | 
			
		||||
    $header = id(new PHUIHeaderView())
 | 
			
		||||
      ->setHeader(pht('Open Phabricator Setup Issues'));
 | 
			
		||||
 
 | 
			
		||||
@@ -23,14 +23,14 @@ final class PhabricatorConfigManagementDeleteWorkflow
 | 
			
		||||
    $argv = $args->getArg('args');
 | 
			
		||||
    if (count($argv) == 0) {
 | 
			
		||||
      throw new PhutilArgumentUsageException(
 | 
			
		||||
        "Specify a configuration key to delete.");
 | 
			
		||||
        'Specify a configuration key to delete.');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $key = $argv[0];
 | 
			
		||||
 | 
			
		||||
    if (count($argv) > 1) {
 | 
			
		||||
      throw new PhutilArgumentUsageException(
 | 
			
		||||
        "Too many arguments: expected one key.");
 | 
			
		||||
        'Too many arguments: expected one key.');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $config = new PhabricatorConfigLocalSource();
 | 
			
		||||
 
 | 
			
		||||
@@ -23,14 +23,14 @@ final class PhabricatorConfigManagementGetWorkflow
 | 
			
		||||
    $argv = $args->getArg('args');
 | 
			
		||||
    if (count($argv) == 0) {
 | 
			
		||||
      throw new PhutilArgumentUsageException(
 | 
			
		||||
        "Specify a configuration key to get.");
 | 
			
		||||
        'Specify a configuration key to get.');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $key = $argv[0];
 | 
			
		||||
 | 
			
		||||
    if (count($argv) > 1) {
 | 
			
		||||
      throw new PhutilArgumentUsageException(
 | 
			
		||||
        "Too many arguments: expected one key.");
 | 
			
		||||
        'Too many arguments: expected one key.');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $options = PhabricatorApplicationConfigOptions::loadAllOptions();
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,7 @@ final class PhabricatorConfigManagementSetWorkflow
 | 
			
		||||
    $argv = $args->getArg('args');
 | 
			
		||||
    if (count($argv) == 0) {
 | 
			
		||||
      throw new PhutilArgumentUsageException(
 | 
			
		||||
        "Specify a configuration key and a value to set it to.");
 | 
			
		||||
        'Specify a configuration key and a value to set it to.');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $key = $argv[0];
 | 
			
		||||
@@ -36,7 +36,7 @@ final class PhabricatorConfigManagementSetWorkflow
 | 
			
		||||
 | 
			
		||||
    if (count($argv) > 2) {
 | 
			
		||||
      throw new PhutilArgumentUsageException(
 | 
			
		||||
        "Too many arguments: expected one key and one value.");
 | 
			
		||||
        'Too many arguments: expected one key and one value.');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $options = PhabricatorApplicationConfigOptions::loadAllOptions();
 | 
			
		||||
 
 | 
			
		||||
@@ -4,11 +4,11 @@ final class PhabricatorAWSConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("Amazon Web Services");
 | 
			
		||||
    return pht('Amazon Web Services');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Configure integration with AWS (EC2, SES, S3, etc).");
 | 
			
		||||
    return pht('Configure integration with AWS (EC2, SES, S3, etc).');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
 
 | 
			
		||||
@@ -4,57 +4,57 @@ final class PhabricatorAccessLogConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("Access Logs");
 | 
			
		||||
    return pht('Access Logs');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Configure the access logs, which log HTTP/SSH requests.");
 | 
			
		||||
    return pht('Configure the access logs, which log HTTP/SSH requests.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
    $common_map = array(
 | 
			
		||||
      'C' => pht("The controller or workflow which handled the request."),
 | 
			
		||||
      'c' => pht("The HTTP response code or process exit code."),
 | 
			
		||||
      'D' => pht("The request date."),
 | 
			
		||||
      'e' => pht("Epoch timestamp."),
 | 
			
		||||
      'C' => pht('The controller or workflow which handled the request.'),
 | 
			
		||||
      'c' => pht('The HTTP response code or process exit code.'),
 | 
			
		||||
      'D' => pht('The request date.'),
 | 
			
		||||
      'e' => pht('Epoch timestamp.'),
 | 
			
		||||
      'h' => pht("The webserver's host name."),
 | 
			
		||||
      'p' => pht("The PID of the server process."),
 | 
			
		||||
      'r' => pht("The remote IP."),
 | 
			
		||||
      'T' => pht("The request duration, in microseconds."),
 | 
			
		||||
      'U' => pht("The request path, or request target."),
 | 
			
		||||
      'm' => pht("For conduit, the Conduit method which was invoked."),
 | 
			
		||||
      'u' => pht("The logged-in username, if one is logged in."),
 | 
			
		||||
      'P' => pht("The logged-in user PHID, if one is logged in."),
 | 
			
		||||
      'i' => pht("Request input, in bytes."),
 | 
			
		||||
      'o' => pht("Request output, in bytes."),
 | 
			
		||||
      'p' => pht('The PID of the server process.'),
 | 
			
		||||
      'r' => pht('The remote IP.'),
 | 
			
		||||
      'T' => pht('The request duration, in microseconds.'),
 | 
			
		||||
      'U' => pht('The request path, or request target.'),
 | 
			
		||||
      'm' => pht('For conduit, the Conduit method which was invoked.'),
 | 
			
		||||
      'u' => pht('The logged-in username, if one is logged in.'),
 | 
			
		||||
      'P' => pht('The logged-in user PHID, if one is logged in.'),
 | 
			
		||||
      'i' => pht('Request input, in bytes.'),
 | 
			
		||||
      'o' => pht('Request output, in bytes.'),
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
    $http_map = $common_map + array(
 | 
			
		||||
      'R' => pht("The HTTP referrer."),
 | 
			
		||||
      'M' => pht("The HTTP method."),
 | 
			
		||||
      'R' => pht('The HTTP referrer.'),
 | 
			
		||||
      'M' => pht('The HTTP method.'),
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
    $ssh_map = $common_map + array(
 | 
			
		||||
      's' => pht("The system user."),
 | 
			
		||||
      'S' => pht("The system sudo user."),
 | 
			
		||||
      's' => pht('The system user.'),
 | 
			
		||||
      'S' => pht('The system sudo user.'),
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
    $http_desc = pht(
 | 
			
		||||
      "Format for the HTTP access log. Use {{log.access.path}} to set the ".
 | 
			
		||||
      "path. Available variables are:");
 | 
			
		||||
      'Format for the HTTP access log. Use {{log.access.path}} to set the '.
 | 
			
		||||
      'path. Available variables are:');
 | 
			
		||||
    $http_desc .= "\n\n";
 | 
			
		||||
    $http_desc .= $this->renderMapHelp($http_map);
 | 
			
		||||
 | 
			
		||||
    $ssh_desc = pht(
 | 
			
		||||
      "Format for the SSH access log. Use {{log.ssh.path}} to set the ".
 | 
			
		||||
      "path. Available variables are:");
 | 
			
		||||
      'Format for the SSH access log. Use {{log.ssh.path}} to set the '.
 | 
			
		||||
      'path. Available variables are:');
 | 
			
		||||
    $ssh_desc .= "\n\n";
 | 
			
		||||
    $ssh_desc .= $this->renderMapHelp($ssh_map);
 | 
			
		||||
 | 
			
		||||
    return array(
 | 
			
		||||
      $this->newOption('log.access.path', 'string', null)
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(pht("Access log location."))
 | 
			
		||||
        ->setSummary(pht('Access log location.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "To enable the Phabricator access log, specify a path. The ".
 | 
			
		||||
@@ -76,11 +76,11 @@ final class PhabricatorAccessLogConfigOptions
 | 
			
		||||
        'wild',
 | 
			
		||||
        "[%D]\t%p\t%h\t%r\t%u\t%C\t%m\t%U\t%R\t%c\t%T")
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(pht("Access log format."))
 | 
			
		||||
        ->setSummary(pht('Access log format.'))
 | 
			
		||||
        ->setDescription($http_desc),
 | 
			
		||||
      $this->newOption('log.ssh.path', 'string', null)
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(pht("SSH log location."))
 | 
			
		||||
        ->setSummary(pht('SSH log location.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "To enable the Phabricator SSH log, specify a path. The ".
 | 
			
		||||
@@ -99,7 +99,7 @@ final class PhabricatorAccessLogConfigOptions
 | 
			
		||||
        'wild',
 | 
			
		||||
        "[%D]\t%p\t%h\t%r\t%s\t%S\t%u\t%C\t%U\t%c\t%T\t%i\t%o")
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(pht("SSH log format."))
 | 
			
		||||
        ->setSummary(pht('SSH log format.'))
 | 
			
		||||
        ->setDescription($ssh_desc),
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -4,11 +4,11 @@ final class PhabricatorAuthenticationConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("Authentication");
 | 
			
		||||
    return pht('Authentication');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Options relating to authentication.");
 | 
			
		||||
    return pht('Options relating to authentication.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
@@ -16,24 +16,24 @@ final class PhabricatorAuthenticationConfigOptions
 | 
			
		||||
      $this->newOption('auth.require-email-verification', 'bool', false)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht("Require email verification"),
 | 
			
		||||
            pht('Require email verification'),
 | 
			
		||||
            pht("Don't require email verification")
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Require email verification before a user can log in."))
 | 
			
		||||
          pht('Require email verification before a user can log in.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "If true, email addresses must be verified (by clicking a link ".
 | 
			
		||||
            "in an email) before a user can login. By default, verification ".
 | 
			
		||||
            "is optional unless {{auth.email-domains}} is nonempty.")),
 | 
			
		||||
            'If true, email addresses must be verified (by clicking a link '.
 | 
			
		||||
            'in an email) before a user can login. By default, verification '.
 | 
			
		||||
            'is optional unless {{auth.email-domains}} is nonempty.')),
 | 
			
		||||
      $this->newOption('auth.require-approval', 'bool', true)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht("Require Administrators to Approve Accounts"),
 | 
			
		||||
            pht('Require Administrators to Approve Accounts'),
 | 
			
		||||
            pht("Don't Require Manual Approval"),
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Require administrators to approve new accounts."))
 | 
			
		||||
          pht('Require administrators to approve new accounts.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Newly registered Phabricator accounts can either be placed ".
 | 
			
		||||
@@ -50,7 +50,7 @@ final class PhabricatorAuthenticationConfigOptions
 | 
			
		||||
            "{{auth.email-domains}} is configured correctly for your ".
 | 
			
		||||
            "install!")),
 | 
			
		||||
      $this->newOption('auth.email-domains', 'list<string>', array())
 | 
			
		||||
        ->setSummary(pht("Only allow registration from particular domains."))
 | 
			
		||||
        ->setSummary(pht('Only allow registration from particular domains.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "You can restrict allowed email addresses to certain domains ".
 | 
			
		||||
@@ -67,7 +67,7 @@ final class PhabricatorAuthenticationConfigOptions
 | 
			
		||||
          pht('Valid Setting')),
 | 
			
		||||
      $this->newOption('auth.login-message', 'string', null)
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(pht("A block of HTML displayed on the login screen."))
 | 
			
		||||
        ->setSummary(pht('A block of HTML displayed on the login screen.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "You can provide an arbitrary block of HTML here, which will ".
 | 
			
		||||
@@ -76,26 +76,26 @@ final class PhabricatorAuthenticationConfigOptions
 | 
			
		||||
      $this->newOption('account.editable', 'bool', true)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht("Allow editing"),
 | 
			
		||||
            pht("Prevent editing")
 | 
			
		||||
            pht('Allow editing'),
 | 
			
		||||
            pht('Prevent editing')
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Determines whether or not basic account information is ".
 | 
			
		||||
            "editable."))
 | 
			
		||||
            'Determines whether or not basic account information is '.
 | 
			
		||||
            'editable.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Is basic account information (email, real name, profile ".
 | 
			
		||||
            "picture) editable? If you set up Phabricator to automatically ".
 | 
			
		||||
            "synchronize account information from some other authoritative ".
 | 
			
		||||
            "system, you can disable this to ensure information remains ".
 | 
			
		||||
            "consistent across both systems.")),
 | 
			
		||||
            'Is basic account information (email, real name, profile '.
 | 
			
		||||
            'picture) editable? If you set up Phabricator to automatically '.
 | 
			
		||||
            'synchronize account information from some other authoritative '.
 | 
			
		||||
            'system, you can disable this to ensure information remains '.
 | 
			
		||||
            'consistent across both systems.')),
 | 
			
		||||
      $this->newOption('account.minimum-password-length', 'int', 8)
 | 
			
		||||
        ->setSummary(pht("Minimum password length."))
 | 
			
		||||
        ->setSummary(pht('Minimum password length.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "When users set or reset a password, it must have at least this ".
 | 
			
		||||
            "many characters.")),
 | 
			
		||||
            'When users set or reset a password, it must have at least this '.
 | 
			
		||||
            'many characters.')),
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -187,7 +187,7 @@ final class PhabricatorConfigOption
 | 
			
		||||
  public function getCustomObject() {
 | 
			
		||||
    if (!$this->customObject) {
 | 
			
		||||
      if (!$this->isCustomType()) {
 | 
			
		||||
        throw new Exception("This option does not have a custom type!");
 | 
			
		||||
        throw new Exception('This option does not have a custom type!');
 | 
			
		||||
      }
 | 
			
		||||
      $this->customObject = newv(substr($this->getType(), 7), array());
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -4,11 +4,11 @@ final class PhabricatorCoreConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("Core");
 | 
			
		||||
    return pht('Core');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Configure core options, including URIs.");
 | 
			
		||||
    return pht('Configure core options, including URIs.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
@@ -27,31 +27,31 @@ final class PhabricatorCoreConfigOptions
 | 
			
		||||
    return array(
 | 
			
		||||
      $this->newOption('phabricator.base-uri', 'string', null)
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(pht("URI where Phabricator is installed."))
 | 
			
		||||
        ->setSummary(pht('URI where Phabricator is installed.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Set the URI where Phabricator is installed. Setting this ".
 | 
			
		||||
            "improves security by preventing cookies from being set on other ".
 | 
			
		||||
            "domains, and allows daemons to send emails with links that have ".
 | 
			
		||||
            "the correct domain."))
 | 
			
		||||
            'Set the URI where Phabricator is installed. Setting this '.
 | 
			
		||||
            'improves security by preventing cookies from being set on other '.
 | 
			
		||||
            'domains, and allows daemons to send emails with links that have '.
 | 
			
		||||
            'the correct domain.'))
 | 
			
		||||
        ->addExample('http://phabricator.example.com/', pht('Valid Setting')),
 | 
			
		||||
      $this->newOption('phabricator.production-uri', 'string', null)
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Primary install URI, for multi-environment installs."))
 | 
			
		||||
          pht('Primary install URI, for multi-environment installs.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "If you have multiple Phabricator environments (like a ".
 | 
			
		||||
            "development/staging environment for working on testing ".
 | 
			
		||||
            "Phabricator, and a production environment for deploying it), ".
 | 
			
		||||
            "set the production environment URI here so that emails and other ".
 | 
			
		||||
            "durable URIs will always generate with links pointing at the ".
 | 
			
		||||
            "production environment. If unset, defaults to ".
 | 
			
		||||
            "{{phabricator.base-uri}}. Most installs do not need to set ".
 | 
			
		||||
            "this option."))
 | 
			
		||||
            'If you have multiple Phabricator environments (like a '.
 | 
			
		||||
            'development/staging environment for working on testing '.
 | 
			
		||||
            'Phabricator, and a production environment for deploying it), '.
 | 
			
		||||
            'set the production environment URI here so that emails and other '.
 | 
			
		||||
            'durable URIs will always generate with links pointing at the '.
 | 
			
		||||
            'production environment. If unset, defaults to '.
 | 
			
		||||
            '{{phabricator.base-uri}}. Most installs do not need to set '.
 | 
			
		||||
            'this option.'))
 | 
			
		||||
        ->addExample('http://phabricator.example.com/', pht('Valid Setting')),
 | 
			
		||||
      $this->newOption('phabricator.allowed-uris', 'list<string>', array())
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(pht("Alternative URIs that can access Phabricator."))
 | 
			
		||||
        ->setSummary(pht('Alternative URIs that can access Phabricator.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "These alternative URIs will be able to access 'normal' pages ".
 | 
			
		||||
@@ -64,7 +64,7 @@ final class PhabricatorCoreConfigOptions
 | 
			
		||||
          pht('Valid Setting')),
 | 
			
		||||
      $this->newOption('phabricator.timezone', 'string', null)
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("The timezone Phabricator should use."))
 | 
			
		||||
          pht('The timezone Phabricator should use.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "PHP requires that you set a timezone in your php.ini before ".
 | 
			
		||||
@@ -78,13 +78,13 @@ final class PhabricatorCoreConfigOptions
 | 
			
		||||
        ->addExample('America/Los_Angeles', pht('US West (PDT)')),
 | 
			
		||||
      $this->newOption('phabricator.cookie-prefix', 'string', null)
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Set a string Phabricator should use to prefix ".
 | 
			
		||||
              "cookie names"))
 | 
			
		||||
          pht('Set a string Phabricator should use to prefix '.
 | 
			
		||||
              'cookie names'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Cookies set for x.com are also sent for y.x.com. Assuming ".
 | 
			
		||||
            "Phabricator instances are running on both domains, this will ".
 | 
			
		||||
            "create a collision preventing you from logging in."))
 | 
			
		||||
            'Cookies set for x.com are also sent for y.x.com. Assuming '.
 | 
			
		||||
            'Phabricator instances are running on both domains, this will '.
 | 
			
		||||
            'create a collision preventing you from logging in.'))
 | 
			
		||||
        ->addExample('dev', pht('Prefix cookie with "dev"')),
 | 
			
		||||
      $this->newOption('phabricator.show-beta-applications', 'bool', false)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
@@ -112,7 +112,7 @@ final class PhabricatorCoreConfigOptions
 | 
			
		||||
            pht('Shenanigans'), // That should be interesting to translate. :P
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Allows you to remove levity and jokes from the UI."))
 | 
			
		||||
          pht('Allows you to remove levity and jokes from the UI.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            'By default, Phabricator includes some flavor text in the UI, '.
 | 
			
		||||
@@ -122,7 +122,7 @@ final class PhabricatorCoreConfigOptions
 | 
			
		||||
            'extra flavor.')),
 | 
			
		||||
       $this->newOption('environment.append-paths', 'list<string>', $paths)
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("These paths get appended to your \$PATH envrionment variable."))
 | 
			
		||||
          pht('These paths get appended to your \$PATH envrionment variable.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Phabricator occasionally shells out to other binaries on the ".
 | 
			
		||||
 
 | 
			
		||||
@@ -4,11 +4,11 @@ final class PhabricatorDeveloperConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("Developer / Debugging");
 | 
			
		||||
    return pht('Developer / Debugging');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Options for Phabricator developers, including debugging.");
 | 
			
		||||
    return pht('Options for Phabricator developers, including debugging.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
@@ -16,8 +16,8 @@ final class PhabricatorDeveloperConfigOptions
 | 
			
		||||
      $this->newOption('darkconsole.enabled', 'bool', false)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht("Enable DarkConsole"),
 | 
			
		||||
            pht("Disable DarkConsole"),
 | 
			
		||||
            pht('Enable DarkConsole'),
 | 
			
		||||
            pht('Disable DarkConsole'),
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(pht("Enable Phabricator's debugging console."))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
@@ -34,10 +34,10 @@ final class PhabricatorDeveloperConfigOptions
 | 
			
		||||
      $this->newOption('darkconsole.always-on', 'bool', false)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht("Always Activate DarkConsole"),
 | 
			
		||||
            pht("Require DarkConsole Activation"),
 | 
			
		||||
            pht('Always Activate DarkConsole'),
 | 
			
		||||
            pht('Require DarkConsole Activation'),
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(pht("Activate DarkConsole on every page."))
 | 
			
		||||
        ->setSummary(pht('Activate DarkConsole on every page.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "This option allows you to enable DarkConsole on every page, ".
 | 
			
		||||
@@ -49,27 +49,27 @@ final class PhabricatorDeveloperConfigOptions
 | 
			
		||||
      $this->newOption('debug.stop-on-redirect', 'bool', false)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht("Stop Before HTTP Redirect"),
 | 
			
		||||
            pht("Use Normal HTTP Redirects"),
 | 
			
		||||
            pht('Stop Before HTTP Redirect'),
 | 
			
		||||
            pht('Use Normal HTTP Redirects'),
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Confirm before redirecting so DarkConsole can be examined."))
 | 
			
		||||
            'Confirm before redirecting so DarkConsole can be examined.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Normally, Phabricator issues HTTP redirects after a successful ".
 | 
			
		||||
            "POST. This can make it difficult to debug things which happen ".
 | 
			
		||||
            "while processing the POST, because service and profiling ".
 | 
			
		||||
            "information are lost. By setting this configuration option, ".
 | 
			
		||||
            "Phabricator will show a page instead of automatically ".
 | 
			
		||||
            "redirecting, allowing you to examine service and profiling ".
 | 
			
		||||
            "information. It also makes the UX awful, so you should only ".
 | 
			
		||||
            "enable it when debugging.")),
 | 
			
		||||
            'Normally, Phabricator issues HTTP redirects after a successful '.
 | 
			
		||||
            'POST. This can make it difficult to debug things which happen '.
 | 
			
		||||
            'while processing the POST, because service and profiling '.
 | 
			
		||||
            'information are lost. By setting this configuration option, '.
 | 
			
		||||
            'Phabricator will show a page instead of automatically '.
 | 
			
		||||
            'redirecting, allowing you to examine service and profiling '.
 | 
			
		||||
            'information. It also makes the UX awful, so you should only '.
 | 
			
		||||
            'enable it when debugging.')),
 | 
			
		||||
      $this->newOption('debug.profile-rate', 'int', 0)
 | 
			
		||||
        ->addExample(0,     pht('No profiling'))
 | 
			
		||||
        ->addExample(1,     pht('Profile every request (slow)'))
 | 
			
		||||
        ->addExample(1000,  pht('Profile 0.1%% of all requests'))
 | 
			
		||||
        ->setSummary(pht("Automatically profile some percentage of pages."))
 | 
			
		||||
        ->setSummary(pht('Automatically profile some percentage of pages.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Normally, Phabricator profiles pages only when explicitly ".
 | 
			
		||||
@@ -91,37 +91,37 @@ final class PhabricatorDeveloperConfigOptions
 | 
			
		||||
            pht('Enable developer mode'),
 | 
			
		||||
            pht('Disable developer mode'),
 | 
			
		||||
          ))
 | 
			
		||||
          ->setSummary(pht("Enable verbose error reporting and disk reads."))
 | 
			
		||||
          ->setSummary(pht('Enable verbose error reporting and disk reads.'))
 | 
			
		||||
          ->setDescription(
 | 
			
		||||
            pht(
 | 
			
		||||
              "This option enables verbose error reporting (stack traces, ".
 | 
			
		||||
              "error callouts) and forces disk reads of static assets on ".
 | 
			
		||||
              "every reload.")),
 | 
			
		||||
              'This option enables verbose error reporting (stack traces, '.
 | 
			
		||||
              'error callouts) and forces disk reads of static assets on '.
 | 
			
		||||
              'every reload.')),
 | 
			
		||||
      $this->newOption('celerity.minify', 'bool', true)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht('Minify static resources.'),
 | 
			
		||||
            pht("Don't minify static resources."),
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(pht("Minify static Celerity resources."))
 | 
			
		||||
        ->setSummary(pht('Minify static Celerity resources.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Minify static resources by removing whitespace and comments. You ".
 | 
			
		||||
            "should enable this in production, but disable it in ".
 | 
			
		||||
            "development.")),
 | 
			
		||||
            'Minify static resources by removing whitespace and comments. You '.
 | 
			
		||||
            'should enable this in production, but disable it in '.
 | 
			
		||||
            'development.')),
 | 
			
		||||
      $this->newOption('cache.enable-deflate', 'bool', true)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht("Enable deflate compression"),
 | 
			
		||||
            pht("Disable deflate compression"),
 | 
			
		||||
            pht('Enable deflate compression'),
 | 
			
		||||
            pht('Disable deflate compression'),
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Toggle gzdeflate()-based compression for some caches."))
 | 
			
		||||
          pht('Toggle gzdeflate()-based compression for some caches.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Set this to false to disable the use of gzdeflate()-based ".
 | 
			
		||||
            "compression in some caches. This may give you less performant ".
 | 
			
		||||
            "(but more debuggable) caching.")),
 | 
			
		||||
            'Set this to false to disable the use of gzdeflate()-based '.
 | 
			
		||||
            'compression in some caches. This may give you less performant '.
 | 
			
		||||
            '(but more debuggable) caching.')),
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -4,17 +4,17 @@ final class PhabricatorDisqusConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("Integration with Disqus");
 | 
			
		||||
    return pht('Integration with Disqus');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Disqus authentication and integration options.");
 | 
			
		||||
    return pht('Disqus authentication and integration options.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
    return array(
 | 
			
		||||
      $this->newOption('disqus.shortname', 'string', null)
 | 
			
		||||
        ->setSummary(pht("Shortname for Disqus comment widget."))
 | 
			
		||||
        ->setSummary(pht('Shortname for Disqus comment widget.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Website shortname to use for Disqus comment widget in Phame. ".
 | 
			
		||||
 
 | 
			
		||||
@@ -4,29 +4,29 @@ final class PhabricatorExtendingPhabricatorConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("Extending Phabricator");
 | 
			
		||||
    return pht('Extending Phabricator');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Make Phabricator even cooler!");
 | 
			
		||||
    return pht('Make Phabricator even cooler!');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
    return array(
 | 
			
		||||
      $this->newOption('load-libraries', 'list<string>', array())
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(pht("Paths to additional phutil libraries to load."))
 | 
			
		||||
        ->setSummary(pht('Paths to additional phutil libraries to load.'))
 | 
			
		||||
        ->addExample('/srv/our-libs/sekrit-phutil', pht('Valid Setting')),
 | 
			
		||||
      $this->newOption('events.listeners', 'list<string>', array())
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Listeners receive callbacks when interesting things occur."))
 | 
			
		||||
          pht('Listeners receive callbacks when interesting things occur.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "You can respond to various application events by installing ".
 | 
			
		||||
            "listeners, which will receive callbacks when interesting things ".
 | 
			
		||||
            "occur. Specify a list of classes which extend ".
 | 
			
		||||
            "PhabricatorEventListener here."))
 | 
			
		||||
            'You can respond to various application events by installing '.
 | 
			
		||||
            'listeners, which will receive callbacks when interesting things '.
 | 
			
		||||
            'occur. Specify a list of classes which extend '.
 | 
			
		||||
            'PhabricatorEventListener here.'))
 | 
			
		||||
        ->addExample('MyEventListener', pht('Valid Setting')),
 | 
			
		||||
       $this->newOption(
 | 
			
		||||
         'aphront.default-application-configuration-class',
 | 
			
		||||
@@ -35,7 +35,7 @@ final class PhabricatorExtendingPhabricatorConfigOptions
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setBaseClass('AphrontApplicationConfiguration')
 | 
			
		||||
        // TODO: This could probably use some better documentation.
 | 
			
		||||
        ->setDescription(pht("Application configuration class.")),
 | 
			
		||||
        ->setDescription(pht('Application configuration class.')),
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -4,11 +4,11 @@ final class PhabricatorGarbageCollectorConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("Garbage Collector");
 | 
			
		||||
    return pht('Garbage Collector');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Configure the GC for old logs, caches, etc.");
 | 
			
		||||
    return pht('Configure the GC for old logs, caches, etc.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
 
 | 
			
		||||
@@ -4,11 +4,11 @@ final class PhabricatorMailgunConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("Integration with Mailgun");
 | 
			
		||||
    return pht('Integration with Mailgun');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Configure Mailgun integration.");
 | 
			
		||||
    return pht('Configure Mailgun integration.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
 
 | 
			
		||||
@@ -4,11 +4,11 @@ final class PhabricatorMetaMTAConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("Mail");
 | 
			
		||||
    return pht('Mail');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Configure Mail.");
 | 
			
		||||
    return pht('Configure Mail.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
@@ -207,8 +207,8 @@ EODOC
 | 
			
		||||
        true)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht("Send Mail To Each Recipient"),
 | 
			
		||||
            pht("Send Mail To All Recipients"),
 | 
			
		||||
            pht('Send Mail To Each Recipient'),
 | 
			
		||||
            pht('Send Mail To All Recipients'),
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht(
 | 
			
		||||
@@ -219,8 +219,8 @@ EODOC
 | 
			
		||||
      $this->newOption('metamta.can-send-as-user', 'bool', false)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht("Send as User Taking Action"),
 | 
			
		||||
            pht("Send as Phabricator"),
 | 
			
		||||
            pht('Send as User Taking Action'),
 | 
			
		||||
            pht('Send as Phabricator'),
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht(
 | 
			
		||||
@@ -236,24 +236,24 @@ EODOC
 | 
			
		||||
      $this->newOption('metamta.reply.show-hints', 'bool', true)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht("Show Reply Handler Hints"),
 | 
			
		||||
            pht("No Reply Handler Hints"),
 | 
			
		||||
            pht('Show Reply Handler Hints'),
 | 
			
		||||
            pht('No Reply Handler Hints'),
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(pht('Show hints about reply handler actions in email.'))
 | 
			
		||||
        ->setDescription($reply_hints_description),
 | 
			
		||||
      $this->newOption('metamta.herald.show-hints', 'bool', true)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht("Show Herald Hints"),
 | 
			
		||||
            pht("No Herald Hints"),
 | 
			
		||||
            pht('Show Herald Hints'),
 | 
			
		||||
            pht('No Herald Hints'),
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(pht('Show hints about Herald rules in email.'))
 | 
			
		||||
        ->setDescription($herald_hints_description),
 | 
			
		||||
      $this->newOption('metamta.recipients.show-hints', 'bool', true)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht("Show Recipient Hints"),
 | 
			
		||||
            pht("No Recipient Hints"),
 | 
			
		||||
            pht('Show Recipient Hints'),
 | 
			
		||||
            pht('No Recipient Hints'),
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(pht('Show "To:" and "Cc:" footer hints in email.'))
 | 
			
		||||
        ->setDescription($recipient_hints_description),
 | 
			
		||||
 
 | 
			
		||||
@@ -4,11 +4,11 @@ final class PhabricatorMySQLConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("MySQL");
 | 
			
		||||
    return pht('MySQL');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Database configuration.");
 | 
			
		||||
    return pht('Database configuration.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
@@ -16,17 +16,17 @@ final class PhabricatorMySQLConfigOptions
 | 
			
		||||
      $this->newOption('mysql.host', 'string', 'localhost')
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht("MySQL database hostname."))
 | 
			
		||||
          pht('MySQL database hostname.'))
 | 
			
		||||
        ->addExample('localhost', pht('MySQL on this machine'))
 | 
			
		||||
        ->addExample('db.example.com:3300', pht('Nonstandard port')),
 | 
			
		||||
      $this->newOption('mysql.user', 'string', 'root')
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht("MySQL username to use when connecting to the database.")),
 | 
			
		||||
          pht('MySQL username to use when connecting to the database.')),
 | 
			
		||||
      $this->newOption('mysql.pass', 'string', null)
 | 
			
		||||
        ->setHidden(true)
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht("MySQL password to use when connecting to the database.")),
 | 
			
		||||
          pht('MySQL password to use when connecting to the database.')),
 | 
			
		||||
      $this->newOption(
 | 
			
		||||
        'mysql.configuration-provider',
 | 
			
		||||
        'class',
 | 
			
		||||
@@ -37,9 +37,9 @@ final class PhabricatorMySQLConfigOptions
 | 
			
		||||
          pht('Configure database configuration class.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Phabricator chooses which database to connect to through a ".
 | 
			
		||||
            "swappable configuration provider. You almost certainly do not ".
 | 
			
		||||
            "need to change this.")),
 | 
			
		||||
            'Phabricator chooses which database to connect to through a '.
 | 
			
		||||
            'swappable configuration provider. You almost certainly do not '.
 | 
			
		||||
            'need to change this.')),
 | 
			
		||||
      $this->newOption(
 | 
			
		||||
        'mysql.implementation',
 | 
			
		||||
        'class',
 | 
			
		||||
@@ -52,15 +52,15 @@ final class PhabricatorMySQLConfigOptions
 | 
			
		||||
          pht('Configure database connection class.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Phabricator connects to MySQL through a swappable abstraction ".
 | 
			
		||||
            "layer. You can choose an alternate implementation by setting ".
 | 
			
		||||
            "this option. To provide your own implementation, extend ".
 | 
			
		||||
            "`AphrontMySQLDatabaseConnectionBase`. It is very unlikely that ".
 | 
			
		||||
            "you need to change this.")),
 | 
			
		||||
            'Phabricator connects to MySQL through a swappable abstraction '.
 | 
			
		||||
            'layer. You can choose an alternate implementation by setting '.
 | 
			
		||||
            'this option. To provide your own implementation, extend '.
 | 
			
		||||
            '`AphrontMySQLDatabaseConnectionBase`. It is very unlikely that '.
 | 
			
		||||
            'you need to change this.')),
 | 
			
		||||
      $this->newOption('storage.default-namespace', 'string', 'phabricator')
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("The namespace that Phabricator databases should use."))
 | 
			
		||||
          pht('The namespace that Phabricator databases should use.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Phabricator puts databases in a namespace, which defaults to ".
 | 
			
		||||
@@ -72,7 +72,7 @@ final class PhabricatorMySQLConfigOptions
 | 
			
		||||
        $this->newOption('mysql.port', 'string', null)
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht("MySQL port to use when connecting to the database.")),
 | 
			
		||||
          pht('MySQL port to use when connecting to the database.')),
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -4,11 +4,11 @@ final class PhabricatorNotificationConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("Notifications");
 | 
			
		||||
    return pht('Notifications');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Configure real-time notifications.");
 | 
			
		||||
    return pht('Configure real-time notifications.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
@@ -16,8 +16,8 @@ final class PhabricatorNotificationConfigOptions
 | 
			
		||||
      $this->newOption('notification.enabled', 'bool', false)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht("Enable Real-Time Notifications"),
 | 
			
		||||
            pht("Disable Real-Time Notifications"),
 | 
			
		||||
            pht('Enable Real-Time Notifications'),
 | 
			
		||||
            pht('Disable Real-Time Notifications'),
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(pht('Enable real-time notifications.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
@@ -40,10 +40,10 @@ final class PhabricatorNotificationConfigOptions
 | 
			
		||||
        ->setSummary(pht('Drop permissions to a less-privileged user.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "The notifcation server must be started as root so it can bind ".
 | 
			
		||||
            "to privileged ports, but if you specify a system user here it ".
 | 
			
		||||
            "will drop permissions to that user after binding to the ports ".
 | 
			
		||||
            "it needs.")),
 | 
			
		||||
            'The notifcation server must be started as root so it can bind '.
 | 
			
		||||
            'to privileged ports, but if you specify a system user here it '.
 | 
			
		||||
            'will drop permissions to that user after binding to the ports '.
 | 
			
		||||
            'it needs.')),
 | 
			
		||||
      $this->newOption('notification.log', 'string', '/var/log/aphlict.log')
 | 
			
		||||
        ->setDescription(pht('Location of the server log file.')),
 | 
			
		||||
      $this->newOption(
 | 
			
		||||
 
 | 
			
		||||
@@ -4,11 +4,11 @@ final class PhabricatorPHDConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("Daemons");
 | 
			
		||||
    return pht('Daemons');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Options relating to PHD (daemons).");
 | 
			
		||||
    return pht('Options relating to PHD (daemons).');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
@@ -16,13 +16,13 @@ final class PhabricatorPHDConfigOptions
 | 
			
		||||
      $this->newOption('phd.pid-directory', 'string', '/var/tmp/phd/pid')
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Directory that phd should use to track running daemons.")),
 | 
			
		||||
            'Directory that phd should use to track running daemons.')),
 | 
			
		||||
      $this->newOption('phd.log-directory', 'string', '/var/tmp/phd/log')
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Directory that the daemons should use to store log files.")),
 | 
			
		||||
            'Directory that the daemons should use to store log files.')),
 | 
			
		||||
      $this->newOption('phd.start-taskmasters', 'int', 4)
 | 
			
		||||
        ->setSummary(pht("Number of TaskMaster daemons to start by default."))
 | 
			
		||||
        ->setSummary(pht('Number of TaskMaster daemons to start by default.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Number of 'TaskMaster' daemons that 'phd start' should start. ".
 | 
			
		||||
@@ -31,8 +31,8 @@ final class PhabricatorPHDConfigOptions
 | 
			
		||||
      $this->newOption('phd.verbose', 'bool', false)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht("Verbose mode"),
 | 
			
		||||
            pht("Normal mode"),
 | 
			
		||||
            pht('Verbose mode'),
 | 
			
		||||
            pht('Normal mode'),
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(pht("Launch daemons in 'verbose' mode by default."))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
@@ -43,18 +43,18 @@ final class PhabricatorPHDConfigOptions
 | 
			
		||||
            "also 'phd.trace'.")),
 | 
			
		||||
      $this->newOption('phd.user', 'string', null)
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(pht("System user to run daemons as."))
 | 
			
		||||
        ->setSummary(pht('System user to run daemons as.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Specify a system user to run the daemons as. Primarily, this ".
 | 
			
		||||
            "user will own the working copies of any repositories that ".
 | 
			
		||||
            "Phabricator imports or manages. This option is new and ".
 | 
			
		||||
            "experimental.")),
 | 
			
		||||
            'Specify a system user to run the daemons as. Primarily, this '.
 | 
			
		||||
            'user will own the working copies of any repositories that '.
 | 
			
		||||
            'Phabricator imports or manages. This option is new and '.
 | 
			
		||||
            'experimental.')),
 | 
			
		||||
      $this->newOption('phd.trace', 'bool', false)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht("Trace mode"),
 | 
			
		||||
            pht("Normal mode"),
 | 
			
		||||
            pht('Trace mode'),
 | 
			
		||||
            pht('Normal mode'),
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(pht("Launch daemons in 'trace' mode by default."))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
 
 | 
			
		||||
@@ -4,18 +4,18 @@ final class PhabricatorPHPMailerConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("PHPMailer");
 | 
			
		||||
    return pht('PHPMailer');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Configure PHPMailer.");
 | 
			
		||||
    return pht('Configure PHPMailer.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
    return array(
 | 
			
		||||
      $this->newOption('phpmailer.mailer', 'string', 'smtp')
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(pht("Configure mailer used by PHPMailer."))
 | 
			
		||||
        ->setSummary(pht('Configure mailer used by PHPMailer.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "If you're using PHPMailer to send email, provide the mailer and ".
 | 
			
		||||
 
 | 
			
		||||
@@ -4,11 +4,11 @@ final class PhabricatorRecaptchaConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("Integration with Recaptcha");
 | 
			
		||||
    return pht('Integration with Recaptcha');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Configure Recaptcha captchas.");
 | 
			
		||||
    return pht('Configure Recaptcha captchas.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
@@ -17,15 +17,15 @@ final class PhabricatorRecaptchaConfigOptions
 | 
			
		||||
      $this->newOption('recaptcha.enabled', 'bool', false)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht("Enable Recaptcha"),
 | 
			
		||||
            pht("Disable Recaptcha"),
 | 
			
		||||
            pht('Enable Recaptcha'),
 | 
			
		||||
            pht('Disable Recaptcha'),
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(pht('Enable captchas with Recaptcha.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Enable recaptcha to require users solve captchas after a few ".
 | 
			
		||||
            "failed login attempts. This hinders brute-force attacks against ".
 | 
			
		||||
            "user passwords. For more information, see http://recaptcha.net/")),
 | 
			
		||||
            'Enable recaptcha to require users solve captchas after a few '.
 | 
			
		||||
            'failed login attempts. This hinders brute-force attacks against '.
 | 
			
		||||
            'user passwords. For more information, see http://recaptcha.net/')),
 | 
			
		||||
      $this->newOption('recaptcha.public-key', 'string', null)
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht('Recaptcha public key, obtained by signing up for Recaptcha.')),
 | 
			
		||||
 
 | 
			
		||||
@@ -4,11 +4,11 @@ final class PhabricatorSecurityConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("Security");
 | 
			
		||||
    return pht('Security');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Security options.");
 | 
			
		||||
    return pht('Security options.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
@@ -17,7 +17,7 @@ final class PhabricatorSecurityConfigOptions
 | 
			
		||||
    return array(
 | 
			
		||||
      $this->newOption('security.alternate-file-domain', 'string', null)
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(pht("Alternate domain to serve files from."))
 | 
			
		||||
        ->setSummary(pht('Alternate domain to serve files from.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "IMPORTANT: By default, Phabricator serves files from the same ".
 | 
			
		||||
@@ -46,17 +46,17 @@ final class PhabricatorSecurityConfigOptions
 | 
			
		||||
        ->setMasked(true)
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Key for HMAC digests."))
 | 
			
		||||
          pht('Key for HMAC digests.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Default key for HMAC digests where the key is not important ".
 | 
			
		||||
            "(i.e., the hash itself is secret). You can change this if you ".
 | 
			
		||||
            "want (to any other string), but doing so will break existing ".
 | 
			
		||||
            "sessions and CSRF tokens.")),
 | 
			
		||||
            'Default key for HMAC digests where the key is not important '.
 | 
			
		||||
            '(i.e., the hash itself is secret). You can change this if you '.
 | 
			
		||||
            'want (to any other string), but doing so will break existing '.
 | 
			
		||||
            'sessions and CSRF tokens.')),
 | 
			
		||||
      $this->newOption('security.require-https', 'bool', false)
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Force users to connect via HTTPS instead of HTTP."))
 | 
			
		||||
          pht('Force users to connect via HTTPS instead of HTTP.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "If the web server responds to both HTTP and HTTPS requests but ".
 | 
			
		||||
@@ -105,15 +105,15 @@ final class PhabricatorSecurityConfigOptions
 | 
			
		||||
        ->setMasked(true)
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Hashed with other inputs to generate CSRF tokens."))
 | 
			
		||||
          pht('Hashed with other inputs to generate CSRF tokens.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "This is hashed with other inputs to generate CSRF tokens. If ".
 | 
			
		||||
            "you want, you can change it to some other string which is ".
 | 
			
		||||
            "unique to your install. This will make your install more secure ".
 | 
			
		||||
            "in a vague, mostly theoretical way. But it will take you like 3 ".
 | 
			
		||||
            "seconds of mashing on your keyboard to set it up so you might ".
 | 
			
		||||
            "as well.")),
 | 
			
		||||
            'This is hashed with other inputs to generate CSRF tokens. If '.
 | 
			
		||||
            'you want, you can change it to some other string which is '.
 | 
			
		||||
            'unique to your install. This will make your install more secure '.
 | 
			
		||||
            'in a vague, mostly theoretical way. But it will take you like 3 '.
 | 
			
		||||
            'seconds of mashing on your keyboard to set it up so you might '.
 | 
			
		||||
            'as well.')),
 | 
			
		||||
       $this->newOption(
 | 
			
		||||
         'phabricator.mail-key',
 | 
			
		||||
         'string',
 | 
			
		||||
@@ -121,7 +121,7 @@ final class PhabricatorSecurityConfigOptions
 | 
			
		||||
        ->setMasked(true)
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Hashed with other inputs to generate mail tokens."))
 | 
			
		||||
          pht('Hashed with other inputs to generate mail tokens.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "This is hashed with other inputs to generate mail tokens. If ".
 | 
			
		||||
@@ -138,7 +138,7 @@ final class PhabricatorSecurityConfigOptions
 | 
			
		||||
          'mailto' => true,
 | 
			
		||||
        ))
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Determines which URI protocols are auto-linked."))
 | 
			
		||||
          pht('Determines which URI protocols are auto-linked.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "When users write comments which have URIs, they'll be ".
 | 
			
		||||
@@ -187,24 +187,24 @@ final class PhabricatorSecurityConfigOptions
 | 
			
		||||
         'string',
 | 
			
		||||
         'd9455ea150622ee044f7931dabfa52aa')
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("An input to the hash function when building resource hashes."))
 | 
			
		||||
          pht('An input to the hash function when building resource hashes.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "This value is an input to the hash function when building ".
 | 
			
		||||
            "resource hashes. It has no security value, but if you ".
 | 
			
		||||
            "accidentally poison user caches (by pushing a bad patch or ".
 | 
			
		||||
            "having something go wrong with a CDN, e.g.) you can change this ".
 | 
			
		||||
            "to something else and rebuild the Celerity map to break user ".
 | 
			
		||||
            "caches. Unless you are doing Celerity development, it is ".
 | 
			
		||||
            "exceptionally unlikely that you need to modify this.")),
 | 
			
		||||
            'This value is an input to the hash function when building '.
 | 
			
		||||
            'resource hashes. It has no security value, but if you '.
 | 
			
		||||
            'accidentally poison user caches (by pushing a bad patch or '.
 | 
			
		||||
            'having something go wrong with a CDN, e.g.) you can change this '.
 | 
			
		||||
            'to something else and rebuild the Celerity map to break user '.
 | 
			
		||||
            'caches. Unless you are doing Celerity development, it is '.
 | 
			
		||||
            'exceptionally unlikely that you need to modify this.')),
 | 
			
		||||
       $this->newOption('remarkup.enable-embedded-youtube', 'bool', false)
 | 
			
		||||
        ->setBoolOptions(
 | 
			
		||||
          array(
 | 
			
		||||
            pht("Embed YouTube videos"),
 | 
			
		||||
            pht('Embed YouTube videos'),
 | 
			
		||||
            pht("Don't embed YouTube videos"),
 | 
			
		||||
          ))
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Determines whether or not YouTube videos get embedded."))
 | 
			
		||||
          pht('Determines whether or not YouTube videos get embedded.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "If you enable this, linked YouTube videos will be embeded ".
 | 
			
		||||
@@ -214,16 +214,16 @@ final class PhabricatorSecurityConfigOptions
 | 
			
		||||
        $this->newOption('security.allow-outbound-http', 'bool', true)
 | 
			
		||||
          ->setBoolOptions(
 | 
			
		||||
            array(
 | 
			
		||||
              pht("Allow"),
 | 
			
		||||
              pht("Disallow"),
 | 
			
		||||
              pht('Allow'),
 | 
			
		||||
              pht('Disallow'),
 | 
			
		||||
            ))
 | 
			
		||||
          ->setLocked(true)
 | 
			
		||||
          ->setSummary(
 | 
			
		||||
            pht("Allow outbound HTTP requests"))
 | 
			
		||||
            pht('Allow outbound HTTP requests'))
 | 
			
		||||
          ->setDescription(
 | 
			
		||||
            pht(
 | 
			
		||||
              "If you enable this, you are allowing Phabricator to ".
 | 
			
		||||
              "potentially make requests to external servers.")),
 | 
			
		||||
              'If you enable this, you are allowing Phabricator to '.
 | 
			
		||||
              'potentially make requests to external servers.')),
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -4,11 +4,11 @@ final class PhabricatorSendGridConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("Integration with SendGrid");
 | 
			
		||||
    return pht('Integration with SendGrid');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Configure SendGrid integration.");
 | 
			
		||||
    return pht('Configure SendGrid integration.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
 
 | 
			
		||||
@@ -4,11 +4,11 @@ final class PhabricatorSyntaxHighlightingConfigOptions
 | 
			
		||||
  extends PhabricatorApplicationConfigOptions {
 | 
			
		||||
 | 
			
		||||
  public function getName() {
 | 
			
		||||
    return pht("Syntax Highlighting");
 | 
			
		||||
    return pht('Syntax Highlighting');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getDescription() {
 | 
			
		||||
    return pht("Options relating to syntax highlighting source code.");
 | 
			
		||||
    return pht('Options relating to syntax highlighting source code.');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public function getOptions() {
 | 
			
		||||
@@ -18,16 +18,16 @@ final class PhabricatorSyntaxHighlightingConfigOptions
 | 
			
		||||
        'class',
 | 
			
		||||
        'PhutilDefaultSyntaxHighlighterEngine')
 | 
			
		||||
        ->setBaseClass('PhutilSyntaxHighlighterEngine')
 | 
			
		||||
        ->setSummary(pht("Default non-pygments syntax highlighter engine."))
 | 
			
		||||
        ->setSummary(pht('Default non-pygments syntax highlighter engine.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Phabricator can highlight PHP by default and use Pygments for ".
 | 
			
		||||
            "other languages if enabled. You can provide a custom ".
 | 
			
		||||
            "highlighter engine by extending class ".
 | 
			
		||||
            "PhutilSyntaxHighlighterEngine.")),
 | 
			
		||||
            'Phabricator can highlight PHP by default and use Pygments for '.
 | 
			
		||||
            'other languages if enabled. You can provide a custom '.
 | 
			
		||||
            'highlighter engine by extending class '.
 | 
			
		||||
            'PhutilSyntaxHighlighterEngine.')),
 | 
			
		||||
      $this->newOption('pygments.enabled', 'bool', false)
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Should Phabricator shell out to Pygments to highlight code?"))
 | 
			
		||||
          pht('Should Phabricator shell out to Pygments to highlight code?'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "If you want syntax highlighting for other languages than PHP ".
 | 
			
		||||
@@ -73,11 +73,11 @@ final class PhabricatorSyntaxHighlightingConfigOptions
 | 
			
		||||
          'yaml' => 'YAML',
 | 
			
		||||
        ))
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Set the language list which appears in dropdowns."))
 | 
			
		||||
          pht('Set the language list which appears in dropdowns.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "In places that we display a dropdown to syntax-highlight code, ".
 | 
			
		||||
            "this is where that list is defined.")),
 | 
			
		||||
            'In places that we display a dropdown to syntax-highlight code, '.
 | 
			
		||||
            'this is where that list is defined.')),
 | 
			
		||||
      $this->newOption(
 | 
			
		||||
        'syntax.filemap',
 | 
			
		||||
        'wild',
 | 
			
		||||
@@ -87,17 +87,17 @@ final class PhabricatorSyntaxHighlightingConfigOptions
 | 
			
		||||
          '@\.divinerconfig$@' => 'js',
 | 
			
		||||
        ))
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Override what language files (based on filename) highlight as."))
 | 
			
		||||
          pht('Override what language files (based on filename) highlight as.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "This is an override list of regular expressions which allows ".
 | 
			
		||||
            "you to choose what language files are highlighted as. If your ".
 | 
			
		||||
            "projects have certain rules about filenames or use unusual or ".
 | 
			
		||||
            "ambiguous language extensions, you can create a mapping here. ".
 | 
			
		||||
            "This is an ordered dictionary of regular expressions which will ".
 | 
			
		||||
            "be tested against the filename. They should map to either an ".
 | 
			
		||||
            "explicit language as a string value, or a numeric index into ".
 | 
			
		||||
            "the captured groups as an integer."))
 | 
			
		||||
            'This is an override list of regular expressions which allows '.
 | 
			
		||||
            'you to choose what language files are highlighted as. If your '.
 | 
			
		||||
            'projects have certain rules about filenames or use unusual or '.
 | 
			
		||||
            'ambiguous language extensions, you can create a mapping here. '.
 | 
			
		||||
            'This is an ordered dictionary of regular expressions which will '.
 | 
			
		||||
            'be tested against the filename. They should map to either an '.
 | 
			
		||||
            'explicit language as a string value, or a numeric index into '.
 | 
			
		||||
            'the captured groups as an integer.'))
 | 
			
		||||
      ->addExample('{"@\\.xyz$@": "php"}', pht('Highlight *.xyz as PHP.'))
 | 
			
		||||
      ->addExample(
 | 
			
		||||
        '{"@/httpd\\.conf@": "apacheconf"}',
 | 
			
		||||
@@ -113,7 +113,7 @@ final class PhabricatorSyntaxHighlightingConfigOptions
 | 
			
		||||
        '10px "Menlo", "Consolas", "Monaco", monospace')
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Default monospace font."))
 | 
			
		||||
          pht('Default monospace font.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Set the default monospaced font style for users who haven't set ".
 | 
			
		||||
@@ -124,7 +124,7 @@ final class PhabricatorSyntaxHighlightingConfigOptions
 | 
			
		||||
        '11px "Menlo", "Consolas", "Monaco", monospace')
 | 
			
		||||
        ->setLocked(true)
 | 
			
		||||
        ->setSummary(
 | 
			
		||||
          pht("Default monospace font for clients on Windows."))
 | 
			
		||||
          pht('Default monospace font for clients on Windows.'))
 | 
			
		||||
        ->setDescription(
 | 
			
		||||
          pht(
 | 
			
		||||
            "Set the default monospaced font style for users who haven't set ".
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user