Skip to content

Commit

Permalink
[mms] Fix generating the install path for composer packages installed…
Browse files Browse the repository at this point in the history
… within a Horde component.
  • Loading branch information
slusarz committed Jan 13, 2015
1 parent 9ef67bc commit f60821c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Expand Up @@ -42,14 +42,24 @@ public function getInstallAs($file, $package)
{
$elements = explode('/', substr($file, 1));
$basedir = array_shift($elements);

switch ($basedir) {
case 'COPYING':
case 'examples':
case 'js':
case 'locale':
return substr($file, 1);

case 'bundle':
// Composer packages
foreach (array_reverse(explode('_', $package)) as $dir) {
array_unshift($elements, $dir);
}
return join('/', $elements);

case 'migration':
return $basedir . '/' . basename($file);

case 'doc':
foreach (explode('_', $package) as $dir) {
if ($elements[0] == $dir) {
Expand All @@ -63,4 +73,4 @@ public function getInstallAs($file, $package)
return join('/', $elements);
}
}
}
}
2 changes: 2 additions & 0 deletions framework/Pear/package.xml
Expand Up @@ -21,6 +21,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Fix generating the install path for composer packages installed within a Horde component.
* [mms] Ignore .git directories in composer bundle directories when creating package.xml file.
</notes>
<contents>
Expand Down Expand Up @@ -540,6 +541,7 @@
<date>2015-01-13</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Fix generating the install path for composer packages installed within a Horde component.
* [mms] Ignore .git directories in composer bundle directories when creating package.xml file.
</notes>
</release>
Expand Down

0 comments on commit f60821c

Please sign in to comment.