|
@@ -164,6 +164,16 @@ class Factory
|
|
|
'data-dir' => self::getDataDir($home),
|
|
|
)));
|
|
|
|
|
|
+ // load global config
|
|
|
+ $file = new JsonFile($config->get('home').'/config.json');
|
|
|
+ if ($file->exists()) {
|
|
|
+ if ($io && $io->isDebug()) {
|
|
|
+ $io->writeError('Loading config file ' . $file->getPath());
|
|
|
+ }
|
|
|
+ $config->merge($file->read());
|
|
|
+ }
|
|
|
+ $config->setConfigSource(new JsonConfigSource($file));
|
|
|
+
|
|
|
$htaccessProtect = (bool) $config->get('htaccess-protect');
|
|
|
if ($htaccessProtect) {
|
|
|
// Protect directory against web access. Since HOME could be
|
|
@@ -180,16 +190,6 @@ class Factory
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // load global config
|
|
|
- $file = new JsonFile($config->get('home').'/config.json');
|
|
|
- if ($file->exists()) {
|
|
|
- if ($io && $io->isDebug()) {
|
|
|
- $io->writeError('Loading config file ' . $file->getPath());
|
|
|
- }
|
|
|
- $config->merge($file->read());
|
|
|
- }
|
|
|
- $config->setConfigSource(new JsonConfigSource($file));
|
|
|
-
|
|
|
// load global auth file
|
|
|
$file = new JsonFile($config->get('home').'/auth.json');
|
|
|
if ($file->exists()) {
|