From 68d37e87f6fc41be3bcda4037ce303abbdbf84d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Wed, 7 Sep 2016 00:06:44 +0200 Subject: [PATCH] FIX: fix module installator to skip Database directory in subdmodules --- app/Console/Commands/InstallModule.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/InstallModule.php b/app/Console/Commands/InstallModule.php index 2a9a0c7c..ad5fffc5 100644 --- a/app/Console/Commands/InstallModule.php +++ b/app/Console/Commands/InstallModule.php @@ -40,8 +40,6 @@ class InstallModule extends Command /** * Execute the console command. - * - * @return mixed */ public function handle() { @@ -56,6 +54,9 @@ class InstallModule extends Command // get config $config = $this->loadConfig(); + if (empty($config)) + return; + // check if it is valid $this->checkMandatoryFields($config); @@ -78,6 +79,9 @@ class InstallModule extends Command $basePath = $this->modulesPath . DIRECTORY_SEPARATOR . $this->moduleName . DIRECTORY_SEPARATOR; $path = $basePath . 'Config' . DIRECTORY_SEPARATOR . 'config.php'; + if (basename($basePath) == 'Database') + return []; + // check if module has Config/config.php file if (!file_exists($path)) { $path = $basePath . 'info.php';