summaryrefslogtreecommitdiffstats
path: root/app/app.php
blob: 64c120a1f77d6ac22eb6a40cbc7644f792e2bd2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php

error_reporting(0);

require_once __DIR__.'/../vendor/autoload.php';

$savedConfig  = __DIR__.'/../custom/config.yml';
$moon_version = file_get_contents(__DIR__.'/../VERSION');

session_start();

if (is_installed()) {
    $conf = Spyc::YAMLLoad($savedConfig);

    // 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);
    }

}

$l10n = new Simplel10n($conf['locale']);