mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-06-07 00:47:00 +03:00
Resolve conflicts and create a converter for old values to the new ones. Also let the user know they should be changing their configuration
This commit is contained in:
commit
a2aba25712
4 changed files with 41 additions and 52 deletions
21
zones.php
21
zones.php
|
@ -452,11 +452,10 @@ case "create":
|
|||
);
|
||||
|
||||
$nameservers = array();
|
||||
if (isset($_POST['nameserver1']) && $_POST['nameserver1'] != null) {
|
||||
array_push($nameservers, $_POST['nameserver1']);
|
||||
}
|
||||
if (isset($_POST['nameserver2']) && $_POST['nameserver2'] != null) {
|
||||
array_push($nameservers, $_POST['nameserver2']);
|
||||
foreach($_POST['nameserver'] as $ns) {
|
||||
if (isset($ns) && !empty($ns)) {
|
||||
array_push($nameservers, $ns);
|
||||
}
|
||||
}
|
||||
|
||||
if ($zonekind != "Slave") {
|
||||
|
@ -655,6 +654,18 @@ case "gettemplatenameservers":
|
|||
echo "";
|
||||
}
|
||||
break;
|
||||
case "getformnameservers":
|
||||
$inputs = array();
|
||||
foreach (user_template_list() as $template) {
|
||||
if ($template['name'] !== $_GET['template']) continue;
|
||||
foreach ($template['records'] as $record) {
|
||||
if ($record['type'] == "NS" and array_search($record['content'], $inputs) === false) {
|
||||
array_push($inputs, $record['content']);
|
||||
echo '<input type="text" name="nameserver[]" value="'.$record['content'].'" readonly /><br />';
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
jtable_respond(null, 'error', 'No such action');
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue