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