blob: 4ae1947b0d2a93af6c84c74353765af0043cbf5a (
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
|
<?php
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);
// 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']);
$csrf = new CSRF();
|