mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-19 20:09:14 +03:00
If we're adding a TXT-record, add double quotes around the content
This commit is contained in:
parent
d28f2b095c
commit
92e9f8c6af
1 changed files with 2 additions and 1 deletions
|
@ -44,13 +44,14 @@ function _do_curl($method, $opts = null, $type = 'post') {
|
||||||
function _create_record($name, $records, $input, $zoneurl) {
|
function _create_record($name, $records, $input, $zoneurl) {
|
||||||
global $defaults;
|
global $defaults;
|
||||||
|
|
||||||
|
$content = ($input['type'] == "TXT") ? '"'.$input['content'].'"' : $input['content'];
|
||||||
array_push($records, array(
|
array_push($records, array(
|
||||||
'disabled' => false,
|
'disabled' => false,
|
||||||
'type' => $input['type'],
|
'type' => $input['type'],
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'ttl' => $input['ttl'] ? $input['ttl'] : $defaults['ttl'],
|
'ttl' => $input['ttl'] ? $input['ttl'] : $defaults['ttl'],
|
||||||
'priority' => $input['priority'] ? $input['priority'] : $defaults['priority'],
|
'priority' => $input['priority'] ? $input['priority'] : $defaults['priority'],
|
||||||
'content' => $input['content']));
|
'content' => $content));
|
||||||
|
|
||||||
$patch = array();
|
$patch = array();
|
||||||
$patch['rrsets'] = array();
|
$patch['rrsets'] = array();
|
||||||
|
|
Loading…
Add table
Reference in a new issue