asdasd
This commit is contained in:
@@ -25,7 +25,21 @@ final class App
|
||||
$this->flash = new Flash($this->session);
|
||||
$this->pdo = Database::createPdo($config);
|
||||
$this->basePdo = Database::createBasePdo($config);
|
||||
$this->modules = new ModuleManager($this->basePdo, __DIR__ . '/../../modules');
|
||||
$modulesPath = $this->config->modulesPath;
|
||||
if ($modulesPath === '' || !is_dir($modulesPath)) {
|
||||
$candidates = [
|
||||
__DIR__ . '/../../modules',
|
||||
__DIR__ . '/../modules',
|
||||
dirname(__DIR__, 3) . '/modules',
|
||||
];
|
||||
foreach ($candidates as $candidate) {
|
||||
if (is_dir($candidate)) {
|
||||
$modulesPath = $candidate;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->modules = new ModuleManager($this->basePdo, $modulesPath);
|
||||
$this->modules->bootEnabled();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user