Sync global-autoresponder current state
This commit is contained in:
@@ -13,10 +13,10 @@ return static function (AppContext $ctx): void {
|
||||
try {
|
||||
$ctx->requireCsrf('update:' . $id);
|
||||
$input = normalize_rule_post($_POST);
|
||||
$patch = attach_rule_scope($ctx, RuleValidator::validate($input, $ctx->settings));
|
||||
enforce_rule_backend_constraints($ctx, $id, $patch);
|
||||
$patch = attach_rule_scope($ctx, RuleValidator::validate($input, $ctx->settings, true));
|
||||
enforce_rule_directadmin_constraints($ctx, $id, $patch);
|
||||
$ctx->rules->update($ctx->daUser->username(), $id, $patch);
|
||||
$ctx->syncActiveBackend();
|
||||
$ctx->syncDirectAdminVacations();
|
||||
Http::redirect($ctx->url('index.html', ['status' => 'updated']));
|
||||
} catch (Throwable $e) {
|
||||
PluginLogger::exception($e, 'UPDATE');
|
||||
|
||||
Reference in New Issue
Block a user