"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Froxlor/Dns/Dns.php" between
froxlor-0.10.26.tar.gz and froxlor-0.10.27.tar.gz

About: Froxlor is a web-based server management panel. It’s a fork of SysCP and has its main focus on simplicity and usability.

Dns.php  (froxlor-0.10.26):Dns.php  (froxlor-0.10.27)
skipping to change at line 56 skipping to change at line 56
if (! $froxlorhostname) { if (! $froxlorhostname) {
// get domain-name // get domain-name
$dom_stmt = Database::prepare("SELECT * FROM `" . TABLE_P ANEL_DOMAINS . "` WHERE id = :did"); $dom_stmt = Database::prepare("SELECT * FROM `" . TABLE_P ANEL_DOMAINS . "` WHERE id = :did");
$domain = Database::pexecute_first($dom_stmt, array( $domain = Database::pexecute_first($dom_stmt, array(
'did' => $domain_id 'did' => $domain_id
)); ));
} else { } else {
$domain = $domain_id; $domain = $domain_id;
} }
if ($domain['isbinddomain'] != '1') { if (!isset($domain['isbinddomain']) || $domain['isbinddomain'] != '1') {
return; return;
} }
$dom_entries = array(); $dom_entries = array();
if (! $froxlorhostname) { if (! $froxlorhostname) {
// select all entries // select all entries
$sel_stmt = Database::prepare("SELECT * FROM `" . TABLE_D OMAIN_DNS . "` WHERE domain_id = :did ORDER BY id ASC"); $sel_stmt = Database::prepare("SELECT * FROM `" . TABLE_D OMAIN_DNS . "` WHERE domain_id = :did ORDER BY id ASC");
Database::pexecute($sel_stmt, array( Database::pexecute($sel_stmt, array(
'did' => $domain_id 'did' => $domain_id
)); ));
skipping to change at line 193 skipping to change at line 193
} }
if (empty($primary_ns) && $entry['record'] == '@' && $ent ry['type'] == 'NS') { if (empty($primary_ns) && $entry['record'] == '@' && $ent ry['type'] == 'NS') {
// use the first NS entry pertaining to the curre nt domain as primary ns // use the first NS entry pertaining to the curre nt domain as primary ns
$primary_ns = $entry['content']; $primary_ns = $entry['content'];
} }
// check for CNAME on @, www- or wildcard-Alias and remov e A/AAAA record accordingly // check for CNAME on @, www- or wildcard-Alias and remov e A/AAAA record accordingly
foreach ([ foreach ([
'@', '@',
'www', 'www',
'*' '*'
] as $crceord) { ] as $crecord) {
if ($entry['type'] == 'CNAME' && $entry['record'] if ($entry['type'] == 'CNAME' && $entry['record']
== '@' && (array_key_exists(md5($crceord), $required_entries['A']) || array_key == '@' && (array_key_exists(md5($crecord), $required_entries['A']) || array_key
_exists(md5($crceord), $required_entries['AAAA']))) { _exists(md5($crecord), $required_entries['AAAA']))) {
unset($required_entries['A'][md5($crceord unset($required_entries['A'][md5($crecord
)]); )]);
unset($required_entries['AAAA'][md5($crce unset($required_entries['AAAA'][md5($crec
ord)]); ord)]);
} }
} }
// also allow overriding of auto-generated values (imap,p
op3,mail,smtp) if enabled in the settings
if (Settings::Get('system.dns_createmailentry')) {
foreach (array(
'imap',
'pop3',
'mail',
'smtp'
) as $crecord) {
if ($entry['type'] == 'CNAME' && $entry['record']
== $crecord && (array_key_exists(md5($crecord), $required_entries['A']) || arra
y_key_exists(md5($crecord), $required_entries['AAAA']))) {
unset($required_entries['A'][md5($crecord)]);
unset($required_entries['AAAA'][md5($crecord)
]);
}
}
}
$zonerecords[] = new DnsEntry($entry['record'], $entry['t ype'], $entry['content'], $entry['prio'], $entry['ttl']); $zonerecords[] = new DnsEntry($entry['record'], $entry['t ype'], $entry['content'], $entry['prio'], $entry['ttl']);
} }
// add missing required entries // add missing required entries
if (! empty($required_entries)) { if (! empty($required_entries)) {
// A / AAAA records // A / AAAA records
if (array_key_exists("A", $required_entries) || array_key _exists("AAAA", $required_entries)) { if (array_key_exists("A", $required_entries) || array_key _exists("AAAA", $required_entries)) {
if ($froxlorhostname) { if ($froxlorhostname) {
// use all available IP's for the froxlor -hostname // use all available IP's for the froxlor -hostname
 End of changes. 3 change blocks. 
9 lines changed or deleted 27 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)