[BUGFIX] Implement EXT: usage in addModulePath 33/41733/3
authorMichael Oehlhof <typo3@oehlhof.de>
Sun, 19 Jul 2015 08:45:47 +0000 (10:45 +0200)
committerSusanne Moog <typo3@susannemoog.de>
Mon, 20 Jul 2015 15:34:51 +0000 (17:34 +0200)
Make it possible to use EXT: for resolving paths in addModulePath

Resolves: #68361
Releases: master, 6.2
Change-Id: I6e79a3e11c42530fadaa25e4dc64f05e6d6a0e32
Reviewed-on: http://review.typo3.org/41733
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php

index e588039..08ad5fa 100644 (file)
@@ -948,6 +948,10 @@ class ExtensionManagementUtility {
         * @return void
         */
        static public function addModulePath($name, $path) {
+               if (substr($path, 0, 4) === 'EXT:') {
+                       list($extensionKey, $relativePath) = explode('/', substr($path, 4), 2);
+                       $path = ExtensionManagementUtility::extPath($extensionKey) . $relativePath;
+               }
                $GLOBALS['TBE_MODULES']['_PATHS'][$name] = $path;
        }