mirror of
https://github.com/slawkens/myaac.git
synced 2025-11-06 18:56:23 +01:00
Add new possibility: to deny saving setting if condition is not met
This commit is contained in:
@@ -25,4 +25,10 @@ $settings = Settings::getInstance();
|
||||
|
||||
$settings->save($_REQUEST['plugin'], $_POST['settings']);
|
||||
|
||||
$errors = $settings->getErrors();
|
||||
if (count($errors) > 0) {
|
||||
http_response_code(500);
|
||||
die(implode('<br/>', $errors));
|
||||
}
|
||||
|
||||
echo 'Saved at ' . date('H:i');
|
||||
|
||||
Reference in New Issue
Block a user