Skip to content

Commit

Permalink
apply contrib prefix to modules and themes from vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
winmillwill committed Sep 18, 2014
1 parent cedbfee commit 9d3d489
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/Mapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9d3d489

Please sign in to comment.