If we're adding a TXT-record, add double quotes around the content

This commit is contained in:
Mark Schouten 2014-05-22 09:57:25 +02:00
parent d28f2b095c
commit 92e9f8c6af

View file

@ -44,13 +44,14 @@ function _do_curl($method, $opts = null, $type = 'post') {
function _create_record($name, $records, $input, $zoneurl) {
global $defaults;
$content = ($input['type'] == "TXT") ? '"'.$input['content'].'"' : $input['content'];
array_push($records, array(
'disabled' => false,
'type' => $input['type'],
'name' => $name,
'ttl' => $input['ttl'] ? $input['ttl'] : $defaults['ttl'],
'priority' => $input['priority'] ? $input['priority'] : $defaults['priority'],
'content' => $input['content']));
'content' => $content));
$patch = array();
$patch['rrsets'] = array();