Use PhabricatorEnv::newObjectFromConfig() wherever possible

Test Plan:
/mail/send/
scripts/aphront/aphrontpath.php /

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1983
This commit is contained in:
vrana
2012-03-21 14:48:58 -07:00
parent 74cc558ed8
commit 4fba549a99
16 changed files with 23 additions and 35 deletions

View File

@@ -30,8 +30,7 @@ $url = parse_url($argv[1]);
$path = '/'.(isset($url['path']) ? ltrim($url['path'], '/') : '');
$config_key = 'aphront.default-application-configuration-class';
$config_class = PhabricatorEnv::getEnvConfig($config_key);
$application = newv($config_class, array());
$application = PhabricatorEnv::newObjectFromConfig($config_key);
$mapper = new AphrontURIMapper($application->getURIMap());
list($controller) = $mapper->mapPath($path);