summaryrefslogtreecommitdiffstats
path: root/app/app.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/app.php')
-rwxr-xr-xapp/app.php22
1 files changed, 5 insertions, 17 deletions
diff --git a/app/app.php b/app/app.php
index 4ae1947..3d69292 100755
--- a/app/app.php
+++ b/app/app.php
@@ -4,28 +4,16 @@ error_reporting(0);
require_once __DIR__.'/../vendor/autoload.php';
-$savedConfig = __DIR__.'/../custom/config.yml';
$moon_version = trim(file_get_contents(__DIR__.'/../VERSION'));
session_start();
-if (is_installed()) {
- $conf = Spyc::YAMLLoad($savedConfig);
+$PlanetConfig = PlanetConfig::load(__DIR__);
+$Planet = new Planet($PlanetConfig);
- // this is a check to upgrade older config file without l10n
- if (!isset($conf['locale'])) {
- $resetPlanetConfig = new PlanetConfig($conf);
- file_put_contents($savedConfig, $resetPlanetConfig->toYaml());
- $conf = Spyc::YAMLLoad($savedConfig);
- }
-
- $PlanetConfig = new PlanetConfig($conf);
- $Planet = new Planet($PlanetConfig);
-
- if ($conf['debug']) {
- error_reporting(E_ALL);
- }
+if ($PlanetConfig->getDebug()) {
+ error_reporting(E_ALL);
}
-$l10n = new Simplel10n($conf['locale']);
+$l10n = new Simplel10n($PlanetConfig->getLocale());
$csrf = new CSRF();