FIX: fix module installator to skip Database directory in subdmodules

This commit is contained in:
Michal Kváček
2016-09-07 00:06:44 +02:00
parent 51d6850cd6
commit 68d37e87f6
+6 -2
View File
@@ -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';