Holy cleanup, batman.
This commit is contained in:
parent
4cbfc06022
commit
77fae9a56d
58 changed files with 967 additions and 847 deletions
|
|
@ -27,20 +27,22 @@ $autoload = function ($class) {
|
|||
|
||||
spl_autoload_register($autoload, true, true);
|
||||
|
||||
// Define our APPLICATION_PATH, if not already defined:
|
||||
if (!defined('APPLICATION_PATH')) {
|
||||
define('APPLICATION_PATH', dirname(__FILE__) . '/');
|
||||
}
|
||||
|
||||
|
||||
if (!file_exists(APPLICATION_PATH . 'PHPCI/config.yml')) {
|
||||
header('Location: install.php');
|
||||
die;
|
||||
|
||||
if (!file_exists(dirname(__FILE__) . '/PHPCI/config.yml')) {
|
||||
if (defined('PHPCI_IS_CONSOLE') && PHPCI_IS_CONSOLE) {
|
||||
file_put_contents('php://stderr', 'Please install PHPCI with "composer install" before using console');
|
||||
exit(1);
|
||||
} else {
|
||||
header('Location: install.php');
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Load Composer autoloader:
|
||||
require_once(APPLICATION_PATH . 'vendor/autoload.php');
|
||||
require_once(dirname(__FILE__) . '/vendor/autoload.php');
|
||||
|
||||
// Load configuration if present:
|
||||
$conf = array();
|
||||
|
|
@ -49,9 +51,6 @@ $conf['b8']['app']['default_controller'] = 'Home';
|
|||
$conf['b8']['view']['path'] = dirname(__FILE__) . '/PHPCI/View/';
|
||||
|
||||
$config = new b8\Config($conf);
|
||||
$config->loadYaml(APPLICATION_PATH . 'PHPCI/config.yml');
|
||||
$config->loadYaml(dirname(__FILE__) . '/PHPCI/config.yml');
|
||||
|
||||
// Define our PHPCI_URL, if not already defined:
|
||||
if (!defined('PHPCI_URL')) {
|
||||
define('PHPCI_URL', $config->get('phpci.url', '') . '/');
|
||||
}
|
||||
require_once(dirname(__FILE__) . '/vars.php');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue