1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-06 22:26:32 +02:00

version 1.0.4 changed settings and fixed bug

This commit is contained in:
Sebastian
2017-11-19 17:44:42 +01:00
parent 53aaba7a57
commit e0f4c884ea
6 changed files with 88 additions and 46 deletions

View File

@@ -10,23 +10,7 @@ session_start();
* LOAD SETTINGS *
************************/
$settings = require_once( __DIR__ . '/settings.php');
if(file_exists($settings['settingsPath'] . DIRECTORY_SEPARATOR . 'settings.yaml'))
{
$yaml = new \Symfony\Component\Yaml\Parser();
try {
$userSettings = $yaml->parse( file_get_contents($settings['settingsPath'] . DIRECTORY_SEPARATOR . 'settings.yaml' ) );
} catch (ParseException $e) {
printf("Unable to parse the YAML string: %s", $e->getMessage());
}
$settings = array_merge($settings, $userSettings);
$settings['themePath'] = $settings['themeBasePath'] . $settings['themeFolder'] . DIRECTORY_SEPARATOR . $settings['theme'];
}
$settings['settings'] = $settings;
$settings = Typemill\Settings::loadSettings();
/************************
* INITIATE SLIM *