[BUGFIX] Implement EXT: usage in addModulePath 95/41695/3
authorMichael Oehlhof <typo3@oehlhof.de>
Sun, 19 Jul 2015 08:45:47 +0000 (10:45 +0200)
committerSusanne Moog <typo3@susannemoog.de>
Sun, 19 Jul 2015 10:18:37 +0000 (12:18 +0200)
Make it possible to use EXT: for resolving paths in addModulePath

Resolves: #68361
Releases: master
Change-Id: I6e79a3e11c42530fadaa25e4dc64f05e6d6a0e32
Reviewed-on: http://review.typo3.org/41695
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php

index d4068c8..16619ec 100644 (file)
@@ -17,6 +17,7 @@ namespace TYPO3\CMS\Core\Utility;
 use TYPO3\CMS\Core\Category\CategoryRegistry;
 use TYPO3\CMS\Core\Package\PackageManager;
 use TYPO3\CMS\Core\Migrations\TcaMigration;
+use TYPO3\CMS\Core\Utility\StringUtility;
 
 /**
  * Extension Management functions
@@ -972,6 +973,10 @@ class ExtensionManagementUtility {
         * @return void
         */
        static public function addModulePath($name, $path) {
+               if (StringUtility::beginsWith($path, 'EXT:')) {
+                       list($extensionKey, $relativePath) = explode('/', substr($path, 4), 2);
+                       $path = ExtensionManagementUtility::extPath($extensionKey) . $relativePath;
+               }
                $GLOBALS['TBE_MODULES']['_PATHS'][$name] = $path;
        }