Skip to content
Snippets Groups Projects
Commit 3a9e54a7 authored by Fabian Erni's avatar Fabian Erni Committed by Demian Katz
Browse files

Update config/application.config.php

Prevent adding a module if it's already in the list.
Because on some systems it's not possible to define environment variables, you should be able to add the module to the normal module list (defined at the top of this file). Problem occures when you work with different systems for dev/test/prod etc. and want to share the same code base.
parent 56fea3a8
No related merge requests found
...@@ -3,7 +3,7 @@ $config = array( ...@@ -3,7 +3,7 @@ $config = array(
'modules' => array( 'modules' => array(
'VuFindHttp', 'VuFindTheme', 'VuFind', 'VuFindHttp', 'VuFindTheme', 'VuFind',
), ),
'module_listener_options' => array( 'module_listener_options' => array(
'config_glob_paths' => array( 'config_glob_paths' => array(
'config/autoload/{,*.}{global,local}.php', 'config/autoload/{,*.}{global,local}.php',
), ),
...@@ -29,7 +29,7 @@ if (APPLICATION_ENV == 'development') { ...@@ -29,7 +29,7 @@ if (APPLICATION_ENV == 'development') {
if ($localModules = getenv('VUFIND_LOCAL_MODULES')) { if ($localModules = getenv('VUFIND_LOCAL_MODULES')) {
$localModules = array_map('trim', explode(',', $localModules)); $localModules = array_map('trim', explode(',', $localModules));
foreach ($localModules as $current) { foreach ($localModules as $current) {
if (!empty($current)) { if (!empty($current) && !in_array($current, $config['modules'])) {
$config['modules'][] = $current; $config['modules'][] = $current;
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment