Remove static id field

This commit is contained in:
danwin1210 committed 2026-10-12 13:40:55 +02:00
1 parent 7e6192d7a9
commit ccb58b35f4
1 file changed
-2
-2
View File
@@ -27,7 +27,6 @@ while ( $mailbox = $stmt->fetch( PDO::FETCH_ASSOC ) ) {
$settings = []; $settings = [];
foreach ( $recipients_by_policy as $policy => $recipients ) { foreach ( $recipients_by_policy as $policy => $recipients ) {
$setting = [ $setting = [
'id' => 'mailbox_' . $policy,
'priority' => 'low', 'priority' => 'low',
'rcpt' => $recipients, 'rcpt' => $recipients,
]; ];
@@ -46,7 +45,6 @@ foreach ( $recipients_by_policy as $policy => $recipients ) {
$output = [ 'settings {' ]; $output = [ 'settings {' ];
foreach ( $settings as $name => $setting ) { foreach ( $settings as $name => $setting ) {
$output[] = "\t" . $name . ' {'; $output[] = "\t" . $name . ' {';
$output[] = "\t\tid = " . json_encode( $setting[ 'id' ], JSON_THROW_ON_ERROR | JSON_UNESCAPED_SLASHES ) . ';';
$output[] = "\t\tpriority = " . $setting[ 'priority' ] . ';'; $output[] = "\t\tpriority = " . $setting[ 'priority' ] . ';';
$recipients = array_map( $recipients = array_map(
static fn( string $recipient ): string => json_encode( $recipient, JSON_THROW_ON_ERROR | JSON_UNESCAPED_SLASHES ), static fn( string $recipient ): string => json_encode( $recipient, JSON_THROW_ON_ERROR | JSON_UNESCAPED_SLASHES ),