Skip to content

Commit 57b898a

Browse files
author
epriestley
committedJun 10, 2015
Merge branch 'master' into redesign-2015
2 parents cbf1b1a + c075f7f commit 57b898a

File tree

452 files changed

+10717
-5209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

452 files changed

+10717
-5209
lines changed
 

‎conf/__init_conf__.php

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
<?php
22

33
function phabricator_read_config_file($original_config) {
4-
54
$root = dirname(dirname(__FILE__));
65

76
// Accept either "myconfig" (preferred) or "myconfig.conf.php".
87
$config = preg_replace('/\.conf\.php$/', '', $original_config);
98
$full_config_path = $root.'/conf/'.$config.'.conf.php';
109

1110
if (!Filesystem::pathExists($full_config_path)) {
12-
1311
// These are very old configuration files which we used to ship with
1412
// by default. File based configuration was de-emphasized once web-based
1513
// configuration was built. The actual files were removed to reduce
@@ -37,12 +35,14 @@ function phabricator_read_config_file($original_config) {
3735
$file = trim($file, './');
3836
$files[$key] = preg_replace('/\.conf\.php$/', '', $file);
3937
}
40-
$files = " ".implode("\n ", $files);
38+
$files = ' '.implode("\n ", $files);
4139

4240
throw new Exception(
43-
"CONFIGURATION ERROR\n".
44-
"Config file '{$original_config}' does not exist. Valid config files ".
45-
"are:\n\n".$files);
41+
pht(
42+
"CONFIGURATION ERROR\n".
43+
"Config file '%s' does not exist. Valid config files are:\n\n%s",
44+
$original_config,
45+
$files));
4646
}
4747

4848
// Make sure config file errors are reported.
@@ -58,7 +58,11 @@ function phabricator_read_config_file($original_config) {
5858
ini_set('display_errors', $old_display_errors);
5959

6060
if ($conf === false) {
61-
throw new Exception("Failed to read config file '{$config}': {$errors}");
61+
throw new Exception(
62+
pht(
63+
"Failed to read config file '%s': %s",
64+
$config,
65+
$errors));
6266
}
6367

6468
return $conf;
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
<?php
22

3-
$projects = id(new PhabricatorRepositoryArcanistProjectQuery())
4-
->setViewer(PhabricatorUser::getOmnipotentUser())
5-
->needRepositories(true)
6-
->execute();
7-
83
$table = new PhabricatorRepositorySymbol();
94
$conn_w = $table->establishConnection('w');
105

6+
$projects = queryfx_all(
7+
$conn_w,
8+
'SELECT * FROM %T',
9+
'repository_arcanistproject');
10+
1111
foreach ($projects as $project) {
12-
$repo = $project->getRepository();
12+
$repo = id(new PhabricatorRepositoryQuery())
13+
->setViewer(PhabricatorUser::getOmnipotentUser())
14+
->withIDs(array($project['repositoryID']))
15+
->executeOne();
1316

1417
if (!$repo) {
1518
continue;
1619
}
1720

18-
echo pht("Migrating symbols for '%s' project...\n", $project->getName());
21+
echo pht("Migrating symbols for '%s' project...\n", $project['name']);
1922

2023
queryfx(
2124
$conn_w,
2225
'UPDATE %T SET repositoryPHID = %s WHERE arcanistProjectID = %d',
2326
$table->getTableName(),
2427
$repo->getPHID(),
25-
$project->getID());
28+
$project['id']);
2629
}

0 commit comments

Comments
 (0)
Failed to load comments.