Skip to content

Commit

Permalink
Merge pull request #11 from midahp/FRAMEWORK_6_0
Browse files Browse the repository at this point in the history
appName in RegistrySnippetFileWriter
  • Loading branch information
ralflang committed Aug 9, 2022
2 parents b307e6e + 2b15d4a commit ae189fb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/RegistrySnippetFileWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
declare(strict_types=1);

namespace Horde\Composer;

use Composer\Util\Filesystem;

class RegistrySnippetFileWriter
Expand Down Expand Up @@ -61,8 +62,7 @@ public function run(): void
}

// Ensure we have a base
foreach ($this->apps as $app)
{
foreach ($this->apps as $app) {
list($appVendor, $appName) = explode('/', $app);
if ($app == 'horde/horde') {
$registryAppFilename = $this->configRegistryDir . '/01-location-' . $appName . '.php';
Expand All @@ -80,13 +80,13 @@ public function run(): void
$registryAppFilename = $this->configRegistryDir . '/02-location-' . $appName . '.php';
$registryAppSnippet = '<?php' . PHP_EOL .
'$this->applications[\'' . $appName . '\'][\'fileroot\'] = "$deployment_fileroot/' . $appName . '";' . PHP_EOL .
'$this->applications[\'' . $appName . '\'][\'webroot\'] = $this->applications[\'horde\'][\'webroot\'] . \'/../' . $app . "';" . PHP_EOL .
'$this->applications[\'' . $appName . '\'][\'themesfs\'] = $this->applications[\'horde\'][\'fileroot\'] . \'/../themes/' . $app . '/\';' . PHP_EOL .
'$this->applications[\'' . $appName . '\'][\'themesuri\'] = $this->applications[\'horde\'][\'webroot\'] . \'/../themes/' . $app . '/\';';
'$this->applications[\'' . $appName . '\'][\'webroot\'] = $this->applications[\'horde\'][\'webroot\'] . \'/../' . $appName . "';" . PHP_EOL .
'$this->applications[\'' . $appName . '\'][\'themesfs\'] = $this->applications[\'horde\'][\'fileroot\'] . \'/../themes/' . $appName . '/\';' . PHP_EOL .
'$this->applications[\'' . $appName . '\'][\'themesuri\'] = $this->applications[\'horde\'][\'webroot\'] . \'/../themes/' . $appName . '/\';';
}
if (!file_exists($registryAppFilename)) {
file_put_contents($registryAppFilename, $registryAppSnippet);
}
}
}
}
}

0 comments on commit ae189fb

Please sign in to comment.