Sync global-autoresponder current state

This commit is contained in:
Marek Miklewicz
2026-07-04 15:16:50 +02:00
parent 196ee224fe
commit af775ce976
47 changed files with 1165 additions and 1037 deletions
+3 -3
View File
@@ -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');