1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-12 16:14:16 +02:00

Admin Panel: Settings Manager - code cleanup and refactoring.

This commit is contained in:
Awilum
2019-02-20 18:17:33 +03:00
parent c53ed2aa43
commit 390ac52ed3

View File

@@ -46,8 +46,11 @@ class SettingsManager
if (Filesystem::write(PATH['config']['site'] . '/settings.yaml', YamlParser::encode(array_merge(Registry::get('settings'), $settings)))) {
Notification::set('success', __('admin_message_settings_saved'));
Http::redirect(Http::getBaseUrl() . '/admin/settings');
} else {
Notification::set('error', __('admin_message_settings_was_not_saved'));
}
Http::redirect(Http::getBaseUrl() . '/admin/settings');
} else {
throw new \RuntimeException("Request was denied because it contained an invalid security token. Please refresh the page and try again.");
}