Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ONA so that a third level dns domain can add a DNS server. #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion www/config/config.inc.php
Original file line number Diff line number Diff line change
@@ -217,7 +217,7 @@
}

// Include functions that replace the default session handler with one that uses MySQL as a backend
require_once($conf['inc_db_sessions']);
// require_once($conf['inc_db_sessions']);

// Include the GUI functions
require_once($conf['inc_functions_gui']);
4 changes: 2 additions & 2 deletions www/include/functions_gui.inc.php
Original file line number Diff line number Diff line change
@@ -141,7 +141,7 @@ function workspace_plugin_loader($modulename, $record=array(), $extravars=array(
global $conf, $self, $base, $images, $color, $style, $onadb;
$modhtml = '';
$modjs = '';
$modwsmenu = '';
$modwsmenu = array();
$modbodyhtml = '';
$ws_plugin_dir = "{$base}/workspace_plugins";

@@ -350,7 +350,7 @@ function get_host_suggestions($q, $max_results=10) {
list($status, $rows, $view) = db_get_record($onadb, 'dns_views', array('id' => $record['dns_view_id']));
$viewname = $view['name'].'/';
}
$results[] = $viewname.$record[$field].".".$domain['name'];
$results[] = $viewname.$record[$field].".".ona_build_domain_name ( $record['domain_id'] );
}
}

2 changes: 1 addition & 1 deletion www/modules/ona/dns_record.inc.php
Original file line number Diff line number Diff line change
@@ -951,7 +951,7 @@ function dns_record_modify($options="") {
$options['set_name'] = preg_replace("/^\./", '', $options['set_name']);

// Find the DNS record from $options['name']
list($status, $rows, $dns) = ona_find_dns_record($options['name']);
list($status, $rows, $dns) = ona_find_dns_record($options['server'] . "." . $domain['fqdn']);
printmsg("DEBUG => dns_record_modify() DNS record: {$dns['fqdn']}", 3);
if ($rows > 1) {
printmsg("DEBUG => Found more than one DNS record for: {$options['name']}",3);
4 changes: 2 additions & 2 deletions www/modules/ona/domain_server.inc.php
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ function domain_server_add($options="") {
printmsg("DEBUG => domain_server_add(): Found domain, {$domain['name']}", 3);

// Determine the server is valid
list($status, $rows, $ns_dns) = ona_find_dns_record($options['server']);
list($status, $rows, $ns_dns) = ona_find_dns_record($options['server'] . "." . $domain['fqdn']);
list($status, $rows, $interface) = ona_find_interface($ns_dns['interface_id']);

$host['id'] = $interface['host_id'];
@@ -169,7 +169,7 @@ function domain_server_add($options="") {
if (!$dnsrows) {
printmsg("DEBUG => Auto adding a NS record for {$options['server']}.", 0);
// Run dns_record_add as a NS type
list($status, $output) = run_module('dns_record_add', array('name' => $domain['fqdn'],'pointsto' => $options['server'], 'type' => 'NS'));
list($status, $output) = run_module('dns_record_add', array('name' => $domain['fqdn'],'pointsto' => $options['server'] . "." . $domain['fqdn'], 'type' => 'NS'));
if ($status)
return(array($status, $output));
$add_to_error .= $output;