minor fixes

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2016-05-10 19:20:01 +02:00
parent 407a7c01aa
commit b775c2f60e
2 changed files with 6 additions and 8 deletions

View File

@@ -221,11 +221,11 @@ if ($action == 'add_record' && ! empty($_POST)) {
// success message (inline)
$success_message = $lng['success']['dns_record_added'];
unset($record);
unset($type);
unset($prio);
unset($content);
unset($ttl);
$record = "";
$type = 'A';
$prio = "";
$content = "";
$ttl = "";
} else {
// show $errors
$errors = implode("<br>", $errors);

View File

@@ -95,7 +95,7 @@ function createDomainZone($domain_id)
// now generate all records and unset the required entries we have
foreach ($dom_entries as $entry) {
if (array_key_exists($entry['type'], $required_entries) && $required_entries[$entry['type']][md5($entry['record'])] == $entry['record']) {
if (array_key_exists($entry['type'], $required_entries) && array_key_exists(md5($entry['record']), $required_entries[$entry['type']])) {
unset($required_entries[$entry['type']][md5($entry['record'])]);
}
$zonefile .= formatEntry($entry['record'], $entry['type'], $entry['content'], $entry['prio'], $entry['ttl']);
@@ -181,8 +181,6 @@ function createDomainZone($domain_id)
}
}
var_dump($required_entries);
return $zonefile;
}