Merge branch 'master' into blender-tweaks
Conflicts: resources/celerity/map.php src/applications/home/controller/PhabricatorHomeMainController.php src/applications/maniphest/controller/ManiphestTaskEditController.php src/applications/maniphest/query/ManiphestTaskQuery.php src/infrastructure/customfield/standard/PhabricatorStandardCustomField.php
This commit is contained in:
@@ -22,5 +22,5 @@ if (!$controller && substr($path, -1) !== '/') {
|
||||
list($controller) = $application->buildControllerForPath($path.'/');
|
||||
}
|
||||
if ($controller) {
|
||||
echo get_class($controller) . "\n";
|
||||
echo get_class($controller)."\n";
|
||||
}
|
||||
|
||||
9
scripts/cache/manage_cache.php
vendored
9
scripts/cache/manage_cache.php
vendored
@@ -14,9 +14,8 @@ EOSYNOPSIS
|
||||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = array(
|
||||
new PhabricatorCacheManagementPurgeWorkflow(),
|
||||
new PhutilHelpArgumentWorkflow(),
|
||||
);
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
->setAncestorClass('PhabricatorCacheManagementWorkflow')
|
||||
->loadObjects();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
||||
@@ -7,45 +7,45 @@ require_once $root.'/scripts/__init_script__.php';
|
||||
// http://www.opm.gov/operating_status_schedules/fedhol/
|
||||
$holidays = array(
|
||||
'2014-01-01' => "New Year's Day",
|
||||
'2014-01-20' => "Birthday of Martin Luther King, Jr.",
|
||||
'2014-01-20' => 'Birthday of Martin Luther King, Jr.',
|
||||
'2014-02-17' => "Washington's Birthday",
|
||||
'2014-05-26' => "Memorial Day",
|
||||
'2014-07-04' => "Independence Day",
|
||||
'2014-09-01' => "Labor Day",
|
||||
'2014-10-13' => "Columbus Day",
|
||||
'2014-11-11' => "Veterans Day",
|
||||
'2014-11-27' => "Thanksgiving Day",
|
||||
'2014-12-25' => "Christmas Day",
|
||||
'2014-05-26' => 'Memorial Day',
|
||||
'2014-07-04' => 'Independence Day',
|
||||
'2014-09-01' => 'Labor Day',
|
||||
'2014-10-13' => 'Columbus Day',
|
||||
'2014-11-11' => 'Veterans Day',
|
||||
'2014-11-27' => 'Thanksgiving Day',
|
||||
'2014-12-25' => 'Christmas Day',
|
||||
'2015-01-01' => "New Year's Day",
|
||||
'2015-01-19' => "Birthday of Martin Luther King, Jr.",
|
||||
'2015-01-19' => 'Birthday of Martin Luther King, Jr.',
|
||||
'2015-02-16' => "Washington's Birthday",
|
||||
'2015-05-25' => "Memorial Day",
|
||||
'2015-07-03' => "Independence Day",
|
||||
'2015-09-07' => "Labor Day",
|
||||
'2015-10-12' => "Columbus Day",
|
||||
'2015-11-11' => "Veterans Day",
|
||||
'2015-11-26' => "Thanksgiving Day",
|
||||
'2015-12-25' => "Christmas Day",
|
||||
'2015-05-25' => 'Memorial Day',
|
||||
'2015-07-03' => 'Independence Day',
|
||||
'2015-09-07' => 'Labor Day',
|
||||
'2015-10-12' => 'Columbus Day',
|
||||
'2015-11-11' => 'Veterans Day',
|
||||
'2015-11-26' => 'Thanksgiving Day',
|
||||
'2015-12-25' => 'Christmas Day',
|
||||
'2016-01-01' => "New Year's Day",
|
||||
'2016-01-18' => "Birthday of Martin Luther King, Jr.",
|
||||
'2016-01-18' => 'Birthday of Martin Luther King, Jr.',
|
||||
'2016-02-15' => "Washington's Birthday",
|
||||
'2016-05-30' => "Memorial Day",
|
||||
'2016-07-04' => "Independence Day",
|
||||
'2016-09-05' => "Labor Day",
|
||||
'2016-10-10' => "Columbus Day",
|
||||
'2016-11-11' => "Veterans Day",
|
||||
'2016-11-24' => "Thanksgiving Day",
|
||||
'2016-12-26' => "Christmas Day",
|
||||
'2016-05-30' => 'Memorial Day',
|
||||
'2016-07-04' => 'Independence Day',
|
||||
'2016-09-05' => 'Labor Day',
|
||||
'2016-10-10' => 'Columbus Day',
|
||||
'2016-11-11' => 'Veterans Day',
|
||||
'2016-11-24' => 'Thanksgiving Day',
|
||||
'2016-12-26' => 'Christmas Day',
|
||||
'2017-01-02' => "New Year's Day",
|
||||
'2017-01-16' => "Birthday of Martin Luther King, Jr.",
|
||||
'2017-01-16' => 'Birthday of Martin Luther King, Jr.',
|
||||
'2017-02-10' => "Washington's Birthday",
|
||||
'2017-05-29' => "Memorial Day",
|
||||
'2017-07-04' => "Independence Day",
|
||||
'2017-09-04' => "Labor Day",
|
||||
'2017-10-09' => "Columbus Day",
|
||||
'2017-11-10' => "Veterans Day",
|
||||
'2017-11-23' => "Thanksgiving Day",
|
||||
'2017-12-25' => "Christmas Day",
|
||||
'2017-05-29' => 'Memorial Day',
|
||||
'2017-07-04' => 'Independence Day',
|
||||
'2017-09-04' => 'Labor Day',
|
||||
'2017-10-09' => 'Columbus Day',
|
||||
'2017-11-10' => 'Veterans Day',
|
||||
'2017-11-23' => 'Thanksgiving Day',
|
||||
'2017-12-25' => 'Christmas Day',
|
||||
);
|
||||
|
||||
$table = new PhabricatorCalendarHoliday();
|
||||
|
||||
@@ -27,7 +27,6 @@ $webroot = Filesystem::readablePath($webroot);
|
||||
$generator = new CeleritySpriteGenerator();
|
||||
|
||||
$sheets = array(
|
||||
'remarkup' => $generator->buildRemarkupSheet(),
|
||||
'menu' => $generator->buildMenuSheet(),
|
||||
'apps' => $generator->buildAppsSheet(),
|
||||
'minicons' => $generator->buildMiniconsSheet(),
|
||||
|
||||
@@ -15,16 +15,9 @@ $args->setSynopsis(<<<EOSYNOPSIS
|
||||
EOSYNOPSIS
|
||||
);
|
||||
$args->parseStandardArguments();
|
||||
$workflows = array(
|
||||
new PhabricatorDaemonManagementListWorkflow(),
|
||||
new PhabricatorDaemonManagementStatusWorkflow(),
|
||||
new PhabricatorDaemonManagementStartWorkflow(),
|
||||
new PhabricatorDaemonManagementStopWorkflow(),
|
||||
new PhabricatorDaemonManagementRestartWorkflow(),
|
||||
new PhabricatorDaemonManagementLaunchWorkflow(),
|
||||
new PhabricatorDaemonManagementDebugWorkflow(),
|
||||
new PhabricatorDaemonManagementLogWorkflow(),
|
||||
new PhutilHelpArgumentWorkflow(),
|
||||
);
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
->setAncestorClass('PhabricatorDaemonManagementWorkflow')
|
||||
->loadObjects();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
||||
@@ -30,6 +30,9 @@ git pull
|
||||
# Stop daemons.
|
||||
$ROOT/phabricator/bin/phd stop
|
||||
|
||||
# If running the notification server, stop it.
|
||||
# $ROOT/phabricator/bin/aphlict stop
|
||||
|
||||
# Stop the webserver (apache, nginx, lighttpd, etc). This command will differ
|
||||
# depending on which system and webserver you are running: replace it with an
|
||||
# appropriate command for your system.
|
||||
@@ -48,3 +51,6 @@ sudo /etc/init.d/httpd start
|
||||
|
||||
# Restart daemons.
|
||||
$ROOT/phabricator/bin/phd start
|
||||
|
||||
# If running the notification server, start it.
|
||||
# $ROOT/phabricator/bin/aphlict start
|
||||
|
||||
@@ -44,12 +44,12 @@ if (
|
||||
(preg_match('/charset="(.*?)"/', $content_type, $matches) ||
|
||||
preg_match('/charset=(\S+)/', $content_type, $matches))
|
||||
) {
|
||||
$text_body = phutil_utf8_convert($text_body, "UTF-8", $matches[1]);
|
||||
$text_body = phutil_utf8_convert($text_body, 'UTF-8', $matches[1]);
|
||||
}
|
||||
|
||||
$headers = $parser->getHeaders();
|
||||
$headers['subject'] = iconv_mime_decode($headers['subject'], 0, "UTF-8");
|
||||
$headers['from'] = iconv_mime_decode($headers['from'], 0, "UTF-8");
|
||||
$headers['subject'] = iconv_mime_decode($headers['subject'], 0, 'UTF-8');
|
||||
$headers['from'] = iconv_mime_decode($headers['from'], 0, 'UTF-8');
|
||||
|
||||
if ($args->getArg('process-duplicates')) {
|
||||
$headers['message-id'] = Filesystem::readRandomCharacters(64);
|
||||
|
||||
@@ -22,7 +22,7 @@ $maxes = ipull($maxes, 'maxEpoch', 'repositoryID');
|
||||
|
||||
$repository_ids = array_keys($sizes + $maxes);
|
||||
|
||||
echo "Updating ".count($repository_ids)." repositories";
|
||||
echo 'Updating '.count($repository_ids).' repositories';
|
||||
|
||||
foreach ($repository_ids as $repository_id) {
|
||||
$last_commit = queryfx_one(
|
||||
@@ -48,6 +48,6 @@ foreach ($repository_ids as $repository_id) {
|
||||
$last_commit,
|
||||
idx($sizes, $repository_id, 0),
|
||||
idx($maxes, $repository_id, 0));
|
||||
echo ".";
|
||||
echo '.';
|
||||
}
|
||||
echo "\ndone.\n";
|
||||
|
||||
@@ -103,7 +103,7 @@ $force_local = $args->getArg('force-local');
|
||||
$min_date = $args->getArg('min-date');
|
||||
|
||||
if (!$all_from_repo && !$reparse_what) {
|
||||
usage("Specify a commit or repository to reparse.");
|
||||
usage('Specify a commit or repository to reparse.');
|
||||
}
|
||||
|
||||
if ($all_from_repo && $reparse_what) {
|
||||
@@ -116,8 +116,8 @@ if ($all_from_repo && $reparse_what) {
|
||||
|
||||
if (!$reparse_message && !$reparse_change && !$reparse_herald &&
|
||||
!$reparse_owners && !$reparse_harbormaster) {
|
||||
usage("Specify what information to reparse with --message, --change, ".
|
||||
"--herald, --harbormaster, and/or --owners");
|
||||
usage('Specify what information to reparse with --message, --change, '.
|
||||
'--herald, --harbormaster, and/or --owners');
|
||||
}
|
||||
|
||||
$min_timestamp = false;
|
||||
@@ -142,9 +142,9 @@ if ($min_date) {
|
||||
|
||||
if ($reparse_owners && !$force) {
|
||||
echo phutil_console_wrap(
|
||||
"You are about to recreate the relationship entries between the commits ".
|
||||
"and the packages they touch. This might delete some existing ".
|
||||
"relationship entries for some old commits.");
|
||||
'You are about to recreate the relationship entries between the commits '.
|
||||
'and the packages they touch. This might delete some existing '.
|
||||
'relationship entries for some old commits.');
|
||||
|
||||
if (!phutil_console_confirm('Are you ready to continue?')) {
|
||||
echo "Cancelled.\n";
|
||||
@@ -267,7 +267,10 @@ foreach ($commits as $commit) {
|
||||
|
||||
if ($all_from_repo && !$force_local) {
|
||||
foreach ($classes as $class) {
|
||||
PhabricatorWorker::scheduleTask($class, $spec);
|
||||
PhabricatorWorker::scheduleTask(
|
||||
$class,
|
||||
$spec,
|
||||
PhabricatorWorker::PRIORITY_IMPORT);
|
||||
|
||||
$commit_name = 'r'.$callsign.$commit->getCommitIdentifier();
|
||||
echo " Queued '{$class}' for commit '{$commit_name}'.\n";
|
||||
|
||||
@@ -18,30 +18,30 @@ $args = id(new PhutilArgumentParser($argv))
|
||||
array(
|
||||
'name' => 'all',
|
||||
'help' =>
|
||||
"Discover problems in the whole repository instead of just changes ".
|
||||
"since the last run.",
|
||||
'Discover problems in the whole repository instead of just changes '.
|
||||
'since the last run.',
|
||||
),
|
||||
array(
|
||||
'name' => 'arc',
|
||||
'param' => 'path',
|
||||
'default' => 'arc',
|
||||
'help' => "Path to Arcanist executable.",
|
||||
'help' => 'Path to Arcanist executable.',
|
||||
),
|
||||
array(
|
||||
'name' => 'severity',
|
||||
'param' => 'string',
|
||||
'default' => ArcanistLintSeverity::SEVERITY_ADVICE,
|
||||
'help' => "Minimum severity, one of ArcanistLintSeverity constants.",
|
||||
'help' => 'Minimum severity, one of ArcanistLintSeverity constants.',
|
||||
),
|
||||
array(
|
||||
'name' => 'chunk-size',
|
||||
'param' => 'number',
|
||||
'default' => 256,
|
||||
'help' => "Number of paths passed to `arc` at once.",
|
||||
'help' => 'Number of paths passed to `arc` at once.',
|
||||
),
|
||||
array(
|
||||
'name' => 'blame',
|
||||
'help' => "Assign lint errors to authors who last modified the line.",
|
||||
'help' => 'Assign lint errors to authors who last modified the line.',
|
||||
),
|
||||
));
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ $rows = queryfx_all(
|
||||
$ssh_dao->getTableName());
|
||||
|
||||
if (!$rows) {
|
||||
echo pht("No keys found.")."\n";
|
||||
echo pht('No keys found.')."\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,14 +32,14 @@ $args->parse(
|
||||
try {
|
||||
$user_name = $args->getArg('phabricator-ssh-user');
|
||||
if (!strlen($user_name)) {
|
||||
throw new Exception("No username.");
|
||||
throw new Exception('No username.');
|
||||
}
|
||||
|
||||
$user = id(new PhabricatorUser())->loadOneWhere(
|
||||
'userName = %s',
|
||||
$user_name);
|
||||
if (!$user) {
|
||||
throw new Exception("Invalid username.");
|
||||
throw new Exception('Invalid username.');
|
||||
}
|
||||
|
||||
$ssh_log->setData(
|
||||
@@ -49,7 +49,7 @@ try {
|
||||
));
|
||||
|
||||
if (!$user->isUserActivated()) {
|
||||
throw new Exception(pht("Your account is not activated."));
|
||||
throw new Exception(pht('Your account is not activated.'));
|
||||
}
|
||||
|
||||
if ($args->getArg('ssh-command')) {
|
||||
@@ -96,7 +96,7 @@ try {
|
||||
$original_args = new PhutilArgumentParser($original_argv);
|
||||
|
||||
if (empty($workflow_names[$command])) {
|
||||
throw new Exception("Invalid command.");
|
||||
throw new Exception('Invalid command.');
|
||||
}
|
||||
|
||||
$workflow = $original_args->parseWorkflows($workflows);
|
||||
@@ -104,17 +104,17 @@ try {
|
||||
|
||||
$sock_stdin = fopen('php://stdin', 'r');
|
||||
if (!$sock_stdin) {
|
||||
throw new Exception("Unable to open stdin.");
|
||||
throw new Exception('Unable to open stdin.');
|
||||
}
|
||||
|
||||
$sock_stdout = fopen('php://stdout', 'w');
|
||||
if (!$sock_stdout) {
|
||||
throw new Exception("Unable to open stdout.");
|
||||
throw new Exception('Unable to open stdout.');
|
||||
}
|
||||
|
||||
$sock_stderr = fopen('php://stderr', 'w');
|
||||
if (!$sock_stderr) {
|
||||
throw new Exception("Unable to open stderr.");
|
||||
throw new Exception('Unable to open stderr.');
|
||||
}
|
||||
|
||||
$socket_channel = new PhutilSocketChannel(
|
||||
|
||||
@@ -35,7 +35,7 @@ foreach (Futures($futures)->limit(8) as $file => $future) {
|
||||
$tags = explode("\n", $tags[1]);
|
||||
|
||||
foreach ($tags as $tag) {
|
||||
$parts = explode(";", $tag);
|
||||
$parts = explode(';', $tag);
|
||||
// skip lines that we can not parse
|
||||
if (count($parts) < 2) {
|
||||
continue;
|
||||
@@ -67,11 +67,11 @@ foreach (Futures($futures)->limit(8) as $file => $future) {
|
||||
|
||||
// To keep consistent with "Separate with commas, for example: php, py"
|
||||
// in Arcanist Project edit form.
|
||||
$language = str_ireplace("python", "py", $language);
|
||||
$language = str_ireplace('python', 'py', $language);
|
||||
|
||||
// also, "normalize" c++ and c#
|
||||
$language = str_ireplace("c++", "cpp", $language);
|
||||
$language = str_ireplace("c#", "cs", $language);
|
||||
$language = str_ireplace('c++', 'cpp', $language);
|
||||
$language = str_ireplace('c#', 'cs', $language);
|
||||
|
||||
// Ruby has "singleton method", for example
|
||||
$type = substr(str_replace(' ', '_', $type), 0, 12);
|
||||
@@ -107,10 +107,10 @@ function ctags_check_executable() {
|
||||
function print_symbol($file, $line_num, $type, $token, $context, $language) {
|
||||
// get rid of relative path
|
||||
$file = explode('/', $file);
|
||||
if ($file[0] == '.' || $file[0] == "..") {
|
||||
if ($file[0] == '.' || $file[0] == '..') {
|
||||
array_shift($file);
|
||||
}
|
||||
$file = '/' . implode('/', $file);
|
||||
$file = '/'.implode('/', $file);
|
||||
|
||||
$parts = array(
|
||||
$context,
|
||||
|
||||
@@ -21,15 +21,15 @@ if ($is_first_user) {
|
||||
"which gives you more help setting up your install. If you create an ".
|
||||
"account with this script instead, you will skip the setup help and you ".
|
||||
"will not be able to access it later.");
|
||||
if (!phutil_console_confirm(pht("Skip easy setup and create account?"))) {
|
||||
echo pht("Cancelled.")."\n";
|
||||
if (!phutil_console_confirm(pht('Skip easy setup and create account?'))) {
|
||||
echo pht('Cancelled.')."\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
echo "Enter a username to create a new account or edit an existing account.";
|
||||
echo 'Enter a username to create a new account or edit an existing account.';
|
||||
|
||||
$username = phutil_console_prompt("Enter a username:");
|
||||
$username = phutil_console_prompt('Enter a username:');
|
||||
if (!strlen($username)) {
|
||||
echo "Cancelled.\n";
|
||||
exit(1);
|
||||
@@ -95,7 +95,7 @@ $user->setRealName($realname);
|
||||
$create_email = null;
|
||||
if ($is_new) {
|
||||
do {
|
||||
$email = phutil_console_prompt("Enter user email address:");
|
||||
$email = phutil_console_prompt('Enter user email address:');
|
||||
$duplicate = id(new PhabricatorUserEmail())->loadOneWhere(
|
||||
'address = %s',
|
||||
$email);
|
||||
@@ -115,7 +115,7 @@ $changed_pass = false;
|
||||
// it.
|
||||
phutil_passthru('stty -echo');
|
||||
$password = phutil_console_prompt(
|
||||
"Enter a password for this user [blank to leave unchanged]:");
|
||||
'Enter a password for this user [blank to leave unchanged]:');
|
||||
phutil_passthru('stty echo');
|
||||
if (strlen($password)) {
|
||||
$changed_pass = $password;
|
||||
@@ -183,7 +183,7 @@ printf(
|
||||
|
||||
echo "\n";
|
||||
|
||||
if (!phutil_console_confirm("Save these changes?", $default_no = false)) {
|
||||
if (!phutil_console_confirm('Save these changes?', $default_no = false)) {
|
||||
echo "Cancelled.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ $admin = id(new PhabricatorUser())->loadOneWhere(
|
||||
$argv[4]);
|
||||
if (!$admin) {
|
||||
throw new Exception(
|
||||
"Admin user must be the username of a valid Phabricator account, used ".
|
||||
"to send the new user a welcome email.");
|
||||
'Admin user must be the username of a valid Phabricator account, used '.
|
||||
'to send the new user a welcome email.');
|
||||
}
|
||||
|
||||
$existing_user = id(new PhabricatorUser())->loadOneWhere(
|
||||
|
||||
Reference in New Issue
Block a user