From 606377f1d96d9ba8a40b84e9959cccb926f67d08 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Wed, 5 Feb 2025 13:57:00 +0100 Subject: [PATCH] fix 'show necessary dns entries for mail/antispan also in admin-view of domain' if bind is enabled but domain is not using nameserver Signed-off-by: Michael Kaufmann --- lib/formfields/admin/domains/formfield.domains_edit.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/formfields/admin/domains/formfield.domains_edit.php b/lib/formfields/admin/domains/formfield.domains_edit.php index c4b884e1..db89fe4b 100644 --- a/lib/formfields/admin/domains/formfield.domains_edit.php +++ b/lib/formfields/admin/domains/formfield.domains_edit.php @@ -454,19 +454,19 @@ return [ 'value' => $result['zonefile'] ], 'spf_entry' => [ - 'visible' => (Settings::Get('system.bind_enable') == '0' && Settings::Get('spf.use_spf') == '1' && $result['isemaildomain'] == '1'), + 'visible' => ($result['isbinddomain'] == '0' && Settings::Get('spf.use_spf') == '1' && $result['isemaildomain'] == '1'), 'label' => lng('antispam.required_spf_dns'), 'type' => 'longtext', 'value' => (string)(new \Froxlor\Dns\DnsEntry('@', 'TXT', \Froxlor\Dns\Dns::encloseTXTContent(Settings::Get('spf.spf_entry')))) ], 'dmarc_entry' => [ - 'visible' => (Settings::Get('system.bind_enable') == '0' && Settings::Get('dmarc.use_dmarc') == '1' && $result['isemaildomain'] == '1'), + 'visible' => ($result['isbinddomain'] == '0' && Settings::Get('dmarc.use_dmarc') == '1' && $result['isemaildomain'] == '1'), 'label' => lng('antispam.required_dmarc_dns'), 'type' => 'longtext', 'value' => (string)(new \Froxlor\Dns\DnsEntry('_dmarc', 'TXT', \Froxlor\Dns\Dns::encloseTXTContent(Settings::Get('dmarc.dmarc_entry')))) ], 'dkim_entry' => [ - 'visible' => (Settings::Get('system.bind_enable') == '0' && Settings::Get('antispam.activated') == '1' && $result['dkim'] == '1' && $result['dkim_pubkey'] != ''), + 'visible' => ($result['isbinddomain'] == '0' && Settings::Get('antispam.activated') == '1' && $result['dkim'] == '1' && $result['dkim_pubkey'] != ''), 'label' => lng('antispam.required_dkim_dns'), 'type' => 'longtext', 'value' => (string)(new \Froxlor\Dns\DnsEntry('dkim' . $result['dkim_id'] . '._domainkey', 'TXT', \Froxlor\Dns\Dns::encloseTXTContent('v=DKIM1; k=rsa; p='.trim($result['dkim_pubkey']))))