handle unknown distribution if there's a now unsupported distribution selected for the config-templates

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann 2023-12-10 19:23:58 +01:00
parent 5615decd96
commit 83de3dd719
No known key found for this signature in database
GPG Key ID: C121F97338D7A352

View File

@ -60,7 +60,9 @@ if ($userinfo['change_serversettings'] == '1') {
if (!empty($distribution)) {
if (!file_exists($config_dir . '/' . $distribution . ".xml")) {
Response::dynamicError("Unknown distribution");
// unknown distribution -> redirect to select a valid distribution for config-templates
Settings::Set('system.distribution', '');
Response::redirectTo('admin_configfiles.php', ['reselect' => 1]);
}
// update setting if different