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