mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-26 23:40:57 +01:00
9e6d59829c
Summary: We have a bunch of code duplication now between __init_script__.php and webroot/index.php. Consoldiate these methods and move them into PhabricatorEnv. Merge PhabricatorRequestOverseer into PhabricatorStartup. Test Plan: Loaded page, ran script. Wiped PHABRICATOR_ENV; loaded page, ran script; got errors. Reviewers: btrahan, vrana Reviewed By: btrahan CC: aran Maniphest Tasks: T2223 Differential Revision: https://secure.phabricator.com/D4283
24 lines
673 B
PHP
24 lines
673 B
PHP
<?php
|
|
|
|
function init_phabricator_script() {
|
|
error_reporting(E_ALL | E_STRICT);
|
|
ini_set('display_errors', 1);
|
|
|
|
$include_path = ini_get('include_path');
|
|
ini_set(
|
|
'include_path',
|
|
$include_path.PATH_SEPARATOR.dirname(__FILE__).'/../../');
|
|
@include_once 'libphutil/scripts/__init_script__.php';
|
|
if (!@constant('__LIBPHUTIL__')) {
|
|
echo "ERROR: Unable to load libphutil. Update your PHP 'include_path' to ".
|
|
"include the parent directory of libphutil/.\n";
|
|
exit(1);
|
|
}
|
|
|
|
phutil_load_library('arcanist/src');
|
|
phutil_load_library(dirname(__FILE__).'/../src/');
|
|
|
|
PhabricatorEnv::initializeScriptEnvironment();
|
|
}
|
|
|
|
init_phabricator_script();
|