1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-25 08:12:40 +01:00

Use libphutil __init_script__.php to initialize Arcanist

Summary:
See D1950, same patch for arc/.

NOTE: I'm moving the ob_get_level() stuff to libphuil.

Test Plan: Ran "arc".

Reviewers: btrahan, killermonk

Reviewed By: btrahan

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1951
This commit is contained in:
epriestley 2012-03-19 19:17:03 -07:00
parent cdcb5cc25d
commit b076b1c02a

View file

@ -1,7 +1,7 @@
<?php <?php
/* /*
* Copyright 2011 Facebook, Inc. * Copyright 2012 Facebook, Inc.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -21,7 +21,7 @@ $include_path = ini_get('include_path');
$parent_dir = dirname(dirname(dirname(__FILE__))); $parent_dir = dirname(dirname(dirname(__FILE__)));
ini_set('include_path', $include_path.PATH_SEPARATOR.$parent_dir); ini_set('include_path', $include_path.PATH_SEPARATOR.$parent_dir);
@include_once 'libphutil/src/__phutil_library_init__.php'; @include_once 'libphutil/scripts/__init_script__.php';
if (!@constant('__LIBPHUTIL__')) { if (!@constant('__LIBPHUTIL__')) {
echo "ERROR: Unable to load libphutil. Update your PHP 'include_path' to ". echo "ERROR: Unable to load libphutil. Update your PHP 'include_path' to ".
"include the parent directory of libphutil/.\n"; "include the parent directory of libphutil/.\n";
@ -29,9 +29,3 @@ if (!@constant('__LIBPHUTIL__')) {
} }
phutil_load_library(dirname(dirname(__FILE__)).'/src/'); phutil_load_library(dirname(dirname(__FILE__)).'/src/');
// There may be some kind of auto-prepend script configured which starts an
// output buffer. Discard any such output buffers.
while (ob_get_level() > 0) {
ob_end_clean();
}