diff --git a/Core/Manifest/ConfigManifest.php b/Core/Manifest/ConfigManifest.php index be612e181..1f97ace0f 100644 --- a/Core/Manifest/ConfigManifest.php +++ b/Core/Manifest/ConfigManifest.php @@ -226,6 +226,7 @@ class ConfigManifest { $finder = new ManifestFileFinder(); $finder->setOptions(array( + 'min_depth' => 0, 'name_regex' => '/(^|[\/\\\\])_config.php$/', 'ignore_tests' => !$includeTests, 'file_callback' => array($this, 'addSourceConfigFile') diff --git a/Core/Manifest/ManifestFileFinder.php b/Core/Manifest/ManifestFileFinder.php index f081a6240..f5f3b4c71 100644 --- a/Core/Manifest/ManifestFileFinder.php +++ b/Core/Manifest/ManifestFileFinder.php @@ -39,6 +39,11 @@ class ManifestFileFinder extends FileFinder { return false; } + // Skip over the vendor directories + if (($depth == 1 || $depth == 2) && $basename == 'vendor') { + return false; + } + // If we're not in testing mode, then skip over any tests directories. if ($this->getOption('ignore_tests') && $basename == self::TESTS_DIR) { return false; @@ -57,6 +62,8 @@ class ManifestFileFinder extends FileFinder { && !($this->getOption('include_themes') && $basename == THEMES_DIR) && !file_exists($pathname . '/' . self::CONFIG_FILE) && !file_exists($pathname . '/' . self::CONFIG_DIR) + && $basename !== self::CONFIG_DIR // include a root config dir + && !file_exists("$pathname/../" . self::CONFIG_DIR) // include all paths if a root config dir exists ); if ($lackingConfig) { diff --git a/View/ThemeManifest.php b/View/ThemeManifest.php index ea2e9f36f..4f73011ed 100644 --- a/View/ThemeManifest.php +++ b/View/ThemeManifest.php @@ -154,7 +154,7 @@ class ThemeManifest implements ThemeList { $path = '/'.implode('/', $themeParts); // If this is in the project, add to beginning of list. Else add to end. - if ($themeParts[0] == $this->project) { + if ($themeParts && $themeParts[0] == $this->project) { array_unshift($this->themes, $path); } else {