Skip to content

Commit

Permalink
Remove spf support and use implemented_record_types variable instead …
Browse files Browse the repository at this point in the history
…of list
  • Loading branch information
hannob committed Jul 9, 2024
1 parent a839d8f commit afe8281
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/dns/dns_domain.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
}
$ttl = ($rec['ttl'] ? $rec['ttl'] : 3600);
$link = $rec['fqdn'];
if (!in_array($rec['type'], ['a', 'aaaa', 'mx', 'cname', 'ns', 'txt', 'spf', 'ptr', 'sshfp', 'srv', 'caa'])) {
if (!in_array($rec['type'], $implemented_record_types)) {
$editable = false;
}
$delete = internal_link('dns_record_save', icon_delete('Record löschen'), "id={$rec['id']}&action=delete");
Expand Down
2 changes: 1 addition & 1 deletion modules/dns/dns_record_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
';
}

if ($type == 'spf' || $type == 'txt') {
if ($type == 'txt') {
$form .= '
<tr><td><label for="data">Inhalt:</label></td><td><input type="text" name="data" id="data" value="' . filter_output_html($data['data']) . '" /></td></tr>
';
Expand Down
4 changes: 2 additions & 2 deletions modules/dns/include/dnsinclude.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function get_dyndns_records($id)
return $data;
}

$valid_record_types = ['a', 'aaaa', 'mx', 'ns', 'spf', 'txt', 'cname', 'ptr', 'srv', 'raw', 'sshfp', 'caa', 'srv'];
$valid_record_types = ['a', 'aaaa', 'mx', 'ns', 'txt', 'cname', 'ptr', 'srv', 'sshfp', 'caa', 'raw'];


function blank_dns_record($type)
Expand Down Expand Up @@ -229,7 +229,7 @@ function warn_autorecord_collission($hostname, $domain, $type, $data)
}


$implemented_record_types = ['a', 'aaaa', 'mx', 'spf', 'txt', 'cname', 'ptr', 'srv', 'ns', 'sshfp', 'caa'];
$implemented_record_types = ['a', 'aaaa', 'mx', 'ns', 'txt', 'cname', 'ptr', 'srv', 'sshfp', 'caa'];

function save_dns_record($id, $record)
{
Expand Down

0 comments on commit afe8281

Please sign in to comment.