ApplicationBootstrap: Process `ICINGAWEB_MODULES_DIR` by default
This commit is contained in:
parent
db9888b1f1
commit
e7adc06497
|
@ -452,10 +452,15 @@ abstract class ApplicationBootstrap
|
||||||
|
|
||||||
protected function getAvailableModulePaths()
|
protected function getAvailableModulePaths()
|
||||||
{
|
{
|
||||||
$paths = array();
|
$paths = [];
|
||||||
$configured = $this->config->get('global', 'module_path', $this->baseDir . '/modules');
|
|
||||||
|
$configured = getenv('ICINGAWEB_MODULES_DIR');
|
||||||
|
if (! $configured) {
|
||||||
|
$configured = $this->config->get('global', 'module_path', $this->baseDir . '/modules');
|
||||||
|
}
|
||||||
|
|
||||||
$nextIsPhar = false;
|
$nextIsPhar = false;
|
||||||
foreach (explode(':', $configured) as $path) {
|
foreach (explode(PATH_SEPARATOR, $configured) as $path) {
|
||||||
if ($path === 'phar') {
|
if ($path === 'phar') {
|
||||||
$nextIsPhar = true;
|
$nextIsPhar = true;
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -197,10 +197,10 @@ class PhpCommand extends Command
|
||||||
$vars[] = sprintf('ICINGAWEB_MODULE_DIRS=%s', implode(':', $modulePaths));
|
$vars[] = sprintf('ICINGAWEB_MODULE_DIRS=%s', implode(':', $modulePaths));
|
||||||
|
|
||||||
// Disabled as the bootstrap.php for PHPUnit and class BaseTestCase can't handle multiple paths yet
|
// Disabled as the bootstrap.php for PHPUnit and class BaseTestCase can't handle multiple paths yet
|
||||||
/*$vars[] = sprintf(
|
$vars[] = sprintf(
|
||||||
'ICINGAWEB_MODULES_DIR=%s',
|
'ICINGAWEB_MODULES_DIR=%s',
|
||||||
implode(PATH_SEPARATOR, $this->app->getModuleManager()->getModuleDirs())
|
implode(PATH_SEPARATOR, $this->app->getModuleManager()->getModuleDirs())
|
||||||
);*/
|
);
|
||||||
|
|
||||||
return join(' ', $vars) . ' ';
|
return join(' ', $vars) . ' ';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue