Removing check that prevents bootstrapping paths that do not contain the

type of object contained.  Example plugins would not be found in the
following path /var/www/common/  as it does not contain 'plugins'

Signed-off-by: Mark Story <mark@mark-story.com>
This commit is contained in:
dogmatic 2010-01-05 01:23:06 +02:00 committed by Mark Story
parent 683be26bcb
commit 467ae1f4fd

View file

@ -217,7 +217,7 @@ class Configure extends Object {
* Loads a file from app/config/configure_file.php. * Loads a file from app/config/configure_file.php.
* Config file variables should be formated like: * Config file variables should be formated like:
* `$config['name'] = 'value';` * `$config['name'] = 'value';`
* These will be used to create dynamic Configure vars. load() is also used to * These will be used to create dynamic Configure vars. load() is also used to
* load stored config files created with Configure::store() * load stored config files created with Configure::store()
* *
* - To load config files from app/config use `Configure::load('configure_file');`. * - To load config files from app/config use `Configure::load('configure_file');`.
@ -236,7 +236,7 @@ class Configure extends Object {
$pluginPath = App::pluginPath($plugin); $pluginPath = App::pluginPath($plugin);
} }
$pos = strpos($fileName, '..'); $pos = strpos($fileName, '..');
if ($pos === false) { if ($pos === false) {
if ($pluginPath && file_exists($pluginPath . 'config' . DS . $fileName . '.php')) { if ($pluginPath && file_exists($pluginPath . 'config' . DS . $fileName . '.php')) {
include($pluginPath . 'config' . DS . $fileName . '.php'); include($pluginPath . 'config' . DS . $fileName . '.php');
@ -822,10 +822,8 @@ class App extends Object {
$items = array(); $items = array();
foreach ((array)$path as $dir) { foreach ((array)$path as $dir) {
if ($type === 'file' || $type === 'class' || strpos($dir, $type) !== false) {
$items = $_this->__list($dir, $types[$type]['suffix'], $extension); $items = $_this->__list($dir, $types[$type]['suffix'], $extension);
$objects = array_merge($items, array_diff($objects, $items)); $objects = array_merge($items, array_diff($objects, $items));
}
} }
if ($type !== 'file') { if ($type !== 'file') {