From 9d3d489107dd7a532ef8f88da57eae7e7c9d360e Mon Sep 17 00:00:00 2001 From: Will Milton Date: Thu, 18 Sep 2014 08:54:57 -0500 Subject: [PATCH] apply contrib prefix to modules and themes from vendor --- src/Mapper.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Mapper.php b/src/Mapper.php index 820d708..5623fa6 100644 --- a/src/Mapper.php +++ b/src/Mapper.php @@ -65,11 +65,17 @@ public function mapContrib(InstallationManager $im, RepositoryManager $rm) ); } $name = explode('/', $package->getPrettyName())[1]; - $typeInstallMap[$drupalType][rtrim($installPath, '/')] = sprintf( - $typePathMap[$drupalType] . '/%s', - 'contrib', - $name - ); + $mapRef =& $typeInstallMap[$drupalType][rtrim($installPath, '/')] ; + if (in_array($drupalType, ['module', 'theme'])) { + $mapRef = sprintf( + $typePathMap[$drupalType] . '/%s', + 'contrib', + $name + ); + } + else { + $mapRef = $typePathMap[$drupalType]; + } } } return array_intersect_key($typeInstallMap, $typePathMap);