[WIP] Some work on settings

Add hidden settings
New method: parse, to parse settings from array
Move base html to twig template
Remove vocation loading from .xml, instead use predefined voc names
This commit is contained in:
slawkens
2023-05-15 00:22:27 +02:00
parent 44d5d7ae64
commit 1fa6788310
10 changed files with 748 additions and 665 deletions

View File

@@ -18,8 +18,30 @@ $deprecatedConfig = [
'views_counter',
'outfit_images_url',
'item_images_url',
'account_country',
'team_display_outfit',
'team_display_status',
'team_display_world',
'team_display_lastlogin',
'multiworld',
];
foreach ($deprecatedConfig as $value) {
$config[$value] = $settings['core.'.$value]['value'];
config(
[
$value,
$settings['core.'.$value]['value']
]
);
//var_dump($settings['core.'.$value]['value']);
}
$vocationsParsed = array_map(
function(string $value): string {
return trim($value);
},
explode(',', $settings['core.vocations']['value'])
);
config(['vocations', $vocationsParsed]);