From 3a9e54a7ed06a84d2f3abd32717a3ee58f0f195a Mon Sep 17 00:00:00 2001 From: Fabian Erni <ferni@snowflake.ch> Date: Tue, 26 Feb 2013 10:58:22 +0100 Subject: [PATCH] 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. --- config/application.config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/application.config.php b/config/application.config.php index e7273758228..af4551da1b3 100644 --- a/config/application.config.php +++ b/config/application.config.php @@ -3,7 +3,7 @@ $config = array( 'modules' => array( 'VuFindHttp', 'VuFindTheme', 'VuFind', ), - 'module_listener_options' => array( + 'module_listener_options' => array( 'config_glob_paths' => array( 'config/autoload/{,*.}{global,local}.php', ), @@ -29,7 +29,7 @@ if (APPLICATION_ENV == 'development') { if ($localModules = getenv('VUFIND_LOCAL_MODULES')) { $localModules = array_map('trim', explode(',', $localModules)); foreach ($localModules as $current) { - if (!empty($current)) { + if (!empty($current) && !in_array($current, $config['modules'])) { $config['modules'][] = $current; } } -- GitLab