Merge pull request #10647 from josephzidell/2.next-custom-config-dir-loc

Add constant specifying the location of the Config dir
This commit is contained in:
Mark Story 2017-05-14 21:41:09 -04:00 committed by GitHub
commit 57ddc24b35
31 changed files with 72 additions and 51 deletions

View file

@ -58,11 +58,11 @@ endif;
$settings = Cache::settings(); $settings = Cache::settings();
if (!empty($settings)): if (!empty($settings)):
echo '<span class="notice success">'; echo '<span class="notice success">';
echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit %s', '<em>' . $settings['engine'] . 'Engine</em>', 'APP/Config/core.php'); echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit %s', '<em>' . $settings['engine'] . 'Engine</em>', CONFIG . 'core.php');
echo '</span>'; echo '</span>';
else: else:
echo '<span class="notice">'; echo '<span class="notice">';
echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in %s', 'APP/Config/core.php'); echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in %s', CONFIG . 'core.php');
echo '</span>'; echo '</span>';
endif; endif;
?> ?>
@ -70,7 +70,7 @@ endif;
<p> <p>
<?php <?php
$filePresent = null; $filePresent = null;
if (file_exists(APP . 'Config' . DS . 'database.php')): if (file_exists(CONFIG . 'database.php')):
echo '<span class="notice success">'; echo '<span class="notice success">';
echo __d('cake_dev', 'Your database configuration file is present.'); echo __d('cake_dev', 'Your database configuration file is present.');
$filePresent = true; $filePresent = true;
@ -79,7 +79,7 @@ endif;
echo '<span class="notice">'; echo '<span class="notice">';
echo __d('cake_dev', 'Your database configuration file is NOT present.'); echo __d('cake_dev', 'Your database configuration file is NOT present.');
echo '<br/>'; echo '<br/>';
echo __d('cake_dev', 'Rename %s to %s', 'APP/Config/database.php.default', 'APP/Config/database.php'); echo __d('cake_dev', 'Rename %s to %s', CONFIG . 'database.php.default', CONFIG . 'database.php');
echo '</span>'; echo '</span>';
endif; endif;
?> ?>

View file

@ -43,6 +43,13 @@ if (!defined('APP_DIR')) {
define('APP_DIR', basename(dirname(dirname(__FILE__)))); define('APP_DIR', basename(dirname(dirname(__FILE__))));
} }
/**
* Config Directory
*/
if (!defined('CONFIG')) {
define('CONFIG', ROOT . DS . APP_DIR . DS . 'Config' . DS);
}
/** /**
* The absolute path to the "cake" directory, WITHOUT a trailing DS. * The absolute path to the "cake" directory, WITHOUT a trailing DS.
* *

View file

@ -46,6 +46,13 @@ if (!defined('APP_DIR')) {
define('APP_DIR', basename(dirname(dirname(__FILE__)))); define('APP_DIR', basename(dirname(dirname(__FILE__))));
} }
/**
* Config Directory
*/
if (!defined('CONFIG')) {
define('CONFIG', ROOT . DS . APP_DIR . DS . 'Config' . DS);
}
/** /**
* The absolute path to the "Cake" directory, WITHOUT a trailing DS. * The absolute path to the "Cake" directory, WITHOUT a trailing DS.
* *

View file

@ -38,7 +38,7 @@
* - `/:controller' * - `/:controller'
* - `/:controller/:action/*' * - `/:controller/:action/*'
* *
* You can disable the connection of default routes by deleting the require inside APP/Config/routes.php. * You can disable the connection of default routes by deleting the require inside CONFIG/routes.php.
*/ */
$prefixes = Router::prefixes(); $prefixes = Router::prefixes();

View file

@ -73,13 +73,13 @@ class IniReader implements ConfigReaderInterface {
* Build and construct a new ini file parser. The parser can be used to read * Build and construct a new ini file parser. The parser can be used to read
* ini files that are on the filesystem. * ini files that are on the filesystem.
* *
* @param string $path Path to load ini config files from. Defaults to APP . 'Config' . DS * @param string $path Path to load ini config files from. Defaults to CONFIG
* @param string $section Only get one section, leave null to parse and fetch * @param string $section Only get one section, leave null to parse and fetch
* all sections in the ini file. * all sections in the ini file.
*/ */
public function __construct($path = null, $section = null) { public function __construct($path = null, $section = null) {
if (!$path) { if (!$path) {
$path = APP . 'Config' . DS; $path = CONFIG;
} }
$this->_path = $path; $this->_path = $path;
$this->_section = $section; $this->_section = $section;

View file

@ -38,11 +38,11 @@ class PhpReader implements ConfigReaderInterface {
/** /**
* Constructor for PHP Config file reading. * Constructor for PHP Config file reading.
* *
* @param string $path The path to read config files from. Defaults to APP . 'Config' . DS * @param string $path The path to read config files from. Defaults to CONFIG
*/ */
public function __construct($path = null) { public function __construct($path = null) {
if (!$path) { if (!$path) {
$path = APP . 'Config' . DS; $path = CONFIG;
} }
$this->_path = $path; $this->_path = $path;
} }

View file

@ -89,7 +89,7 @@ class AclShell extends AppShell {
$this->args = null; $this->args = null;
return $this->DbConfig->execute(); return $this->DbConfig->execute();
} }
require_once APP . 'Config' . DS . 'database.php'; require_once CONFIG . 'database.php';
if (!in_array($this->command, array('initdb'))) { if (!in_array($this->command, array('initdb'))) {
$collection = new ComponentCollection(); $collection = new ComponentCollection();

View file

@ -501,7 +501,7 @@ class ConsoleShell extends AppShell {
extract(Router::getNamedExpressions()); extract(Router::getNamedExpressions());
//@codingStandardsIgnoreStart //@codingStandardsIgnoreStart
if (!@include APP . 'Config' . DS . 'routes.php') { if (!@include CONFIG . 'routes.php') {
//@codingStandardsIgnoreEnd //@codingStandardsIgnoreEnd
return false; return false;
} }

View file

@ -476,7 +476,7 @@ class SchemaShell extends AppShell {
); );
$path = array( $path = array(
'help' => __d('cake_console', 'Path to read and write schema.php'), 'help' => __d('cake_console', 'Path to read and write schema.php'),
'default' => APP . 'Config' . DS . 'Schema' 'default' => CONFIG . 'Schema'
); );
$file = array( $file = array(
'help' => __d('cake_console', 'File name to read and write.'), 'help' => __d('cake_console', 'File name to read and write.'),

View file

@ -64,7 +64,7 @@ class DbConfigTask extends AppShell {
* @return void * @return void
*/ */
public function initialize() { public function initialize() {
$this->path = APP . 'Config' . DS; $this->path = CONFIG;
} }
/** /**

View file

@ -45,7 +45,7 @@ class PluginTask extends AppShell {
*/ */
public function initialize() { public function initialize() {
$this->path = current(App::path('plugins')); $this->path = current(App::path('plugins'));
$this->bootstrap = APP . 'Config' . DS . 'bootstrap.php'; $this->bootstrap = CONFIG . 'bootstrap.php';
} }
/** /**

View file

@ -79,14 +79,14 @@ class ProjectTask extends AppShell {
if ($this->securitySalt($path) === true) { if ($this->securitySalt($path) === true) {
$this->out(__d('cake_console', ' * Random hash key created for \'Security.salt\'')); $this->out(__d('cake_console', ' * Random hash key created for \'Security.salt\''));
} else { } else {
$this->err(__d('cake_console', 'Unable to generate random hash for \'Security.salt\', you should change it in %s', APP . 'Config' . DS . 'core.php')); $this->err(__d('cake_console', 'Unable to generate random hash for \'Security.salt\', you should change it in %s', CONFIG . 'core.php'));
$success = false; $success = false;
} }
if ($this->securityCipherSeed($path) === true) { if ($this->securityCipherSeed($path) === true) {
$this->out(__d('cake_console', ' * Random seed created for \'Security.cipherSeed\'')); $this->out(__d('cake_console', ' * Random seed created for \'Security.cipherSeed\''));
} else { } else {
$this->err(__d('cake_console', 'Unable to generate random seed for \'Security.cipherSeed\', you should change it in %s', APP . 'Config' . DS . 'core.php')); $this->err(__d('cake_console', 'Unable to generate random seed for \'Security.cipherSeed\', you should change it in %s', CONFIG . 'core.php'));
$success = false; $success = false;
} }
@ -362,7 +362,7 @@ class ProjectTask extends AppShell {
* @return bool Success * @return bool Success
*/ */
public function cakeAdmin($name) { public function cakeAdmin($name) {
$path = (empty($this->configPath)) ? APP . 'Config' . DS : $this->configPath; $path = (empty($this->configPath)) ? CONFIG : $this->configPath;
$File = new File($path . 'core.php'); $File = new File($path . 'core.php');
$contents = $File->read(); $contents = $File->read();
if (preg_match('%(\s*[/]*Configure::write\(\'Routing.prefixes\',[\s\'a-z,\)\(]*\);)%', $contents, $match)) { if (preg_match('%(\s*[/]*Configure::write\(\'Routing.prefixes\',[\s\'a-z,\)\(]*\);)%', $contents, $match)) {

View file

@ -144,7 +144,7 @@ class ShellDispatcher {
$boot = file_exists(ROOT . DS . APP_DIR . DS . 'Config' . DS . 'bootstrap.php'); $boot = file_exists(ROOT . DS . APP_DIR . DS . 'Config' . DS . 'bootstrap.php');
require CORE_PATH . 'Cake' . DS . 'bootstrap.php'; require CORE_PATH . 'Cake' . DS . 'bootstrap.php';
if (!file_exists(APP . 'Config' . DS . 'core.php')) { if (!file_exists(CONFIG . 'core.php')) {
include_once CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'Templates' . DS . 'skel' . DS . 'Config' . DS . 'core.php'; include_once CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'Templates' . DS . 'skel' . DS . 'Config' . DS . 'core.php';
App::build(); App::build();
} }

View file

@ -62,11 +62,11 @@ endif;
$settings = Cache::settings(); $settings = Cache::settings();
if (!empty($settings)): if (!empty($settings)):
echo '<span class="notice success">'; echo '<span class="notice success">';
echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit %s', '<em>' . $settings['engine'] . 'Engine</em>', 'APP/Config/core.php'); echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit %s', '<em>' . $settings['engine'] . 'Engine</em>', CONFIG . 'core.php');
echo '</span>'; echo '</span>';
else: else:
echo '<span class="notice">'; echo '<span class="notice">';
echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in %s', 'APP/Config/core.php'); echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in %s', CONFIG . 'core.php');
echo '</span>'; echo '</span>';
endif; endif;
?> ?>
@ -74,7 +74,7 @@ endif;
<p> <p>
<?php <?php
$filePresent = null; $filePresent = null;
if (file_exists(APP . 'Config' . DS . 'database.php')): if (file_exists(CONFIG . 'database.php')):
echo '<span class="notice success">'; echo '<span class="notice success">';
echo __d('cake_dev', 'Your database configuration file is present.'); echo __d('cake_dev', 'Your database configuration file is present.');
$filePresent = true; $filePresent = true;
@ -83,7 +83,7 @@ endif;
echo '<span class="notice">'; echo '<span class="notice">';
echo __d('cake_dev', 'Your database configuration file is NOT present.'); echo __d('cake_dev', 'Your database configuration file is NOT present.');
echo '<br/>'; echo '<br/>';
echo __d('cake_dev', 'Rename %s to %s', 'APP/Config/database.php.default', 'APP/Config/database.php'); echo __d('cake_dev', 'Rename %s to %s', CONFIG . 'database.php.default', CONFIG . 'database.php');
echo '</span>'; echo '</span>';
endif; endif;
?> ?>

View file

@ -94,7 +94,7 @@ class IniAcl extends CakeObject implements AclInterface {
*/ */
public function check($aro, $aco, $action = null) { public function check($aro, $aco, $action = null) {
if (!$this->config) { if (!$this->config) {
$this->config = $this->readConfigFile(APP . 'Config' . DS . 'acl.ini.php'); $this->config = $this->readConfigFile(CONFIG . 'acl.ini.php');
} }
$aclConfig = $this->config; $aclConfig = $this->config;

View file

@ -69,7 +69,7 @@ class PhpAcl extends CakeObject implements AclInterface {
public function __construct() { public function __construct() {
$this->options = array( $this->options = array(
'policy' => static::DENY, 'policy' => static::DENY,
'config' => APP . 'Config' . DS . 'acl.php', 'config' => CONFIG . 'acl.php',
); );
} }

View file

@ -69,10 +69,10 @@ class Configure {
if ($boot) { if ($boot) {
static::_appDefaults(); static::_appDefaults();
if (!include APP . 'Config' . DS . 'core.php') { if (!include CONFIG . 'core.php') {
trigger_error(__d('cake_dev', trigger_error(__d('cake_dev',
"Can't find application core file. Please create %s, and make sure it is readable by PHP.", "Can't find application core file. Please create %s, and make sure it is readable by PHP.",
APP . 'Config' . DS . 'core.php'), CONFIG . 'core.php'),
E_USER_ERROR E_USER_ERROR
); );
} }
@ -95,10 +95,10 @@ class Configure {
} }
static::_setErrorHandlers($error, $exception); static::_setErrorHandlers($error, $exception);
if (!include APP . 'Config' . DS . 'bootstrap.php') { if (!include CONFIG . 'bootstrap.php') {
trigger_error(__d('cake_dev', trigger_error(__d('cake_dev',
"Can't find application bootstrap file. Please create %s, and make sure it is readable by PHP.", "Can't find application bootstrap file. Please create %s, and make sure it is readable by PHP.",
APP . 'Config' . DS . 'bootstrap.php'), CONFIG . 'bootstrap.php'),
E_USER_ERROR E_USER_ERROR
); );
} }

View file

@ -90,7 +90,7 @@ class CakeSchema extends CakeObject {
} }
if (empty($options['path'])) { if (empty($options['path'])) {
$this->path = APP . 'Config' . DS . 'Schema'; $this->path = CONFIG . 'Schema';
} }
$options = array_merge(get_object_vars($this), $options); $options = array_merge(get_object_vars($this), $options);

View file

@ -64,7 +64,7 @@ class ConnectionManager {
* @return void * @return void
*/ */
protected static function _init() { protected static function _init() {
include_once APP . 'Config' . DS . 'database.php'; include_once CONFIG . 'database.php';
if (class_exists('DATABASE_CONFIG')) { if (class_exists('DATABASE_CONFIG')) {
static::$config = new DATABASE_CONFIG(); static::$config = new DATABASE_CONFIG();
} }

View file

@ -1241,7 +1241,7 @@ class CakeEmail {
if (is_string($config)) { if (is_string($config)) {
if (!$this->_configInstance) { if (!$this->_configInstance) {
if (!class_exists($this->_configClass) && !config('email')) { if (!class_exists($this->_configClass) && !config('email')) {
throw new ConfigureException(__d('cake_dev', '%s not found.', APP . 'Config' . DS . 'email.php')); throw new ConfigureException(__d('cake_dev', '%s not found.', CONFIG . 'email.php'));
} }
$this->_configInstance = new $this->_configClass(); $this->_configInstance = new $this->_configClass();
} }

View file

@ -1281,7 +1281,7 @@ class Router {
*/ */
protected static function _loadRoutes() { protected static function _loadRoutes() {
static::$initialized = true; static::$initialized = true;
include APP . 'Config' . DS . 'routes.php'; include CONFIG . 'routes.php';
} }
} }

View file

@ -147,7 +147,7 @@ class SchemaShellTest extends CakeTestCase {
$this->assertEquals('TestSchema', $this->Shell->Schema->name); $this->assertEquals('TestSchema', $this->Shell->Schema->name);
$this->assertEquals('test_schema.php', $this->Shell->Schema->file); $this->assertEquals('test_schema.php', $this->Shell->Schema->file);
$this->assertEquals('default', $this->Shell->Schema->connection); $this->assertEquals('default', $this->Shell->Schema->connection);
$this->assertEquals(APP . 'Config' . DS . 'Schema', $this->Shell->Schema->path); $this->assertEquals(CONFIG . 'Schema', $this->Shell->Schema->path);
$this->Shell->Schema = null; $this->Shell->Schema = null;
$this->Shell->params = array( $this->Shell->params = array(
@ -169,7 +169,7 @@ class SchemaShellTest extends CakeTestCase {
*/ */
public function testView() { public function testView() {
$this->Shell->startup(); $this->Shell->startup();
$this->Shell->Schema->path = APP . 'Config' . DS . 'Schema'; $this->Shell->Schema->path = CONFIG . 'Schema';
$this->Shell->params['file'] = 'i18n.php'; $this->Shell->params['file'] = 'i18n.php';
$this->Shell->expects($this->once())->method('_stop'); $this->Shell->expects($this->once())->method('_stop');
$this->Shell->expects($this->once())->method('out'); $this->Shell->expects($this->once())->method('out');
@ -485,7 +485,7 @@ class SchemaShellTest extends CakeTestCase {
$this->Shell->params = array( $this->Shell->params = array(
'connection' => 'test', 'connection' => 'test',
'name' => 'I18n', 'name' => 'I18n',
'path' => APP . 'Config' . DS . 'Schema' 'path' => CONFIG . 'Schema'
); );
$this->Shell->args = array('I18n', 'i18n'); $this->Shell->args = array('I18n', 'i18n');
$this->Shell->startup(); $this->Shell->startup();

View file

@ -44,7 +44,7 @@ class DbConfigTaskTest extends CakeTestCase {
array($out, $out, $in) array($out, $out, $in)
); );
$this->Task->path = APP . 'Config' . DS; $this->Task->path = CONFIG;
} }
/** /**
@ -79,7 +79,7 @@ class DbConfigTaskTest extends CakeTestCase {
public function testInitialize() { public function testInitialize() {
$this->Task->initialize(); $this->Task->initialize();
$this->assertFalse(empty($this->Task->path)); $this->assertFalse(empty($this->Task->path));
$this->assertEquals(APP . 'Config' . DS, $this->Task->path); $this->assertEquals(CONFIG, $this->Task->path);
} }
/** /**

View file

@ -312,7 +312,7 @@ class ProjectTaskTest extends CakeTestCase {
* @return void * @return void
*/ */
public function testCakeAdmin() { public function testCakeAdmin() {
$File = new File(APP . 'Config' . DS . 'core.php'); $File = new File(CONFIG . 'core.php');
$contents = $File->read(); $contents = $File->read();
$File = new File(TMP . 'tests' . DS . 'core.php'); $File = new File(TMP . 'tests' . DS . 'core.php');
$File->write($contents); $File->write($contents);

View file

@ -153,7 +153,7 @@ class CakeEmailTest extends CakeTestCase {
parent::setUp(); parent::setUp();
$this->_configFileExists = true; $this->_configFileExists = true;
$emailConfig = new File(APP . 'Config' . DS . 'email.php'); $emailConfig = new File(CONFIG . 'email.php');
if (!$emailConfig->exists()) { if (!$emailConfig->exists()) {
$this->_configFileExists = false; $this->_configFileExists = false;
$emailConfig->create(); $emailConfig->create();
@ -176,7 +176,7 @@ class CakeEmailTest extends CakeTestCase {
App::build(); App::build();
if (!$this->_configFileExists) { if (!$this->_configFileExists) {
unlink(APP . 'Config' . DS . 'email.php'); unlink(CONFIG . 'email.php');
} }
} }

View file

@ -16,11 +16,11 @@
$settings = Cache::settings(); $settings = Cache::settings();
if (!empty($settings)): if (!empty($settings)):
echo '<span class="notice success">'; echo '<span class="notice success">';
echo __d('cake_dev', 'The %s is being used for caching. To change the config edit APP/config/core.php ', '<em>'. $settings['engine'] . 'Engine</em>'); echo __d('cake_dev', 'The %s is being used for caching. To change the config edit %s/core.php ', '<em>'. $settings['engine'] . 'Engine</em>', CONFIG);
echo '</span>'; echo '</span>';
else: else:
echo '<span class="notice">'; echo '<span class="notice">';
echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in APP/config/core.php'); echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in %s/core.php', CONFIG);
echo '</span>'; echo '</span>';
endif; endif;
?> ?>
@ -28,7 +28,7 @@
<p> <p>
<?php <?php
$filePresent = null; $filePresent = null;
if (file_exists(APP . 'Config' . DS . 'database.php')): if (file_exists(CONFIG . 'database.php')):
echo '<span class="notice success">'; echo '<span class="notice success">';
echo __d('cake_dev', 'Your database configuration file is present.'); echo __d('cake_dev', 'Your database configuration file is present.');
$filePresent = true; $filePresent = true;

View file

@ -47,7 +47,7 @@
<?php <?php
echo __d('cake', 'Your database configuration file is '); echo __d('cake', 'Your database configuration file is ');
$filePresent = null; $filePresent = null;
if (file_exists(APP . 'Config' . 'database.php')): if (file_exists(CONFIG . 'database.php')):
echo __d('cake', 'present.'); echo __d('cake', 'present.');
$filePresent = true; $filePresent = true;
else: else:

View file

@ -837,11 +837,11 @@ class Debugger {
*/ */
public static function checkSecurityKeys() { public static function checkSecurityKeys() {
if (Configure::read('Security.salt') === 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi') { if (Configure::read('Security.salt') === 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi') {
trigger_error(__d('cake_dev', 'Please change the value of %s in %s to a salt value specific to your application.', '\'Security.salt\'', 'APP/Config/core.php'), E_USER_NOTICE); trigger_error(__d('cake_dev', 'Please change the value of %s in %s to a salt value specific to your application.', '\'Security.salt\'', CONFIG . 'core.php'), E_USER_NOTICE);
} }
if (Configure::read('Security.cipherSeed') === '76859309657453542496749683645') { if (Configure::read('Security.cipherSeed') === '76859309657453542496749683645') {
trigger_error(__d('cake_dev', 'Please change the value of %s in %s to a numeric (digits only) seed value specific to your application.', '\'Security.cipherSeed\'', 'APP/Config/core.php'), E_USER_NOTICE); trigger_error(__d('cake_dev', 'Please change the value of %s in %s to a numeric (digits only) seed value specific to your application.', '\'Security.cipherSeed\'', CONFIG . 'core.php'), E_USER_NOTICE);
} }
} }

View file

@ -1217,7 +1217,7 @@ class HtmlHelper extends AppHelper {
/** /**
* Load Html tag configuration. * Load Html tag configuration.
* *
* Loads a file from APP/Config that contains tag data. By default the file is expected * Loads a file from CONFIG that contains tag data. By default the file is expected
* to be compatible with PhpReader: * to be compatible with PhpReader:
* *
* `$this->Html->loadConfig('tags.php');` * `$this->Html->loadConfig('tags.php');`
@ -1236,7 +1236,7 @@ class HtmlHelper extends AppHelper {
* `$this->Html->loadConfig(array('tags.ini', 'ini'));` * `$this->Html->loadConfig(array('tags.ini', 'ini'));`
* *
* Its expected that the `tags` index will exist from any configuration file that is read. * Its expected that the `tags` index will exist from any configuration file that is read.
* You can also specify the path to read the configuration file from, if APP/Config is not * You can also specify the path to read the configuration file from, if CONFIG is not
* where the file is. * where the file is.
* *
* `$this->Html->loadConfig('tags.php', APP . 'Lib' . DS);` * `$this->Html->loadConfig('tags.php', APP . 'Lib' . DS);`
@ -1257,7 +1257,7 @@ class HtmlHelper extends AppHelper {
*/ */
public function loadConfig($configFile, $path = null) { public function loadConfig($configFile, $path = null) {
if (!$path) { if (!$path) {
$path = APP . 'Config' . DS; $path = CONFIG;
} }
$file = null; $file = null;
$reader = 'php'; $reader = 'php';

View file

@ -46,8 +46,8 @@ if (!function_exists('config')) {
$count = count($args); $count = count($args);
$included = 0; $included = 0;
foreach ($args as $arg) { foreach ($args as $arg) {
if (file_exists(APP . 'Config' . DS . $arg . '.php')) { if (file_exists(CONFIG . $arg . '.php')) {
include_once APP . 'Config' . DS . $arg . '.php'; include_once CONFIG . $arg . '.php';
$included++; $included++;
} }
} }

View file

@ -53,6 +53,13 @@ if (!defined('APP')) {
define('APP', ROOT . DS . APP_DIR . DS); define('APP', ROOT . DS . APP_DIR . DS);
} }
/**
* Config Directory
*/
if (!defined('CONFIG')) {
define('CONFIG', ROOT . DS . APP_DIR . DS . 'Config' . DS);
}
/** /**
* Path to the application's libs directory. * Path to the application's libs directory.
*/ */