Navigation Menu

Skip to content

Commit

Permalink
Removing check that prevents bootstrapping paths that do not contain the
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dogmatic69 authored and markstory committed Jan 7, 2010
1 parent 683be26 commit 467ae1f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cake/libs/configure.php
Expand Up @@ -217,7 +217,7 @@ function delete($var = null) {
* Loads a file from app/config/configure_file.php.
* Config file variables should be formated like:
* `$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()
*
* - To load config files from app/config use `Configure::load('configure_file');`.
Expand All @@ -236,7 +236,7 @@ function load($fileName) {
$pluginPath = App::pluginPath($plugin);
}
$pos = strpos($fileName, '..');

if ($pos === false) {
if ($pluginPath && file_exists($pluginPath . 'config' . DS . $fileName . '.php')) {
include($pluginPath . 'config' . DS . $fileName . '.php');
Expand Down Expand Up @@ -822,10 +822,8 @@ function objects($type, $path = null, $cache = true) {
$items = array();

foreach ((array)$path as $dir) {
if ($type === 'file' || $type === 'class' || strpos($dir, $type) !== false) {
$items = $_this->__list($dir, $types[$type]['suffix'], $extension);
$objects = array_merge($items, array_diff($objects, $items));
}
}

if ($type !== 'file') {
Expand Down

0 comments on commit 467ae1f

Please sign in to comment.