[BUGFIX] Fix loading order for extensions
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Package / DependencyResolver.php
index 77e496e..b23a779 100644 (file)
@@ -281,15 +281,9 @@ class DependencyResolver {
        protected function getPackageKeysInBasePath(array $packageStateConfiguration, $basePath, array $excludedPaths = array()) {
                $packageKeys = array();
                foreach ($packageStateConfiguration as $packageKey => $package) {
-                       if (($basePath === '' || strpos($package['packagePath'], $basePath) === 0)) {
-                               $isExcluded = FALSE;
-                               foreach ($excludedPaths as $excludedPath) {
-                                       if (strpos($package['packagePath'], $excludedPath) === 0) {
-                                               $isExcluded = TRUE;
-                                               break;
-                                       }
-                               }
-                               if (!$isExcluded) {
+                       if ($basePath === '' || in_array($basePath, $package['packagePathStack'], TRUE)) {
+                               $containedExcludedPaths = array_intersect($package['packagePathStack'], $excludedPaths);
+                               if (empty($containedExcludedPaths)) {
                                        $packageKeys[] = $packageKey;
                                }
                        }