Mail routing parent/children, domain name validation, nodelist import changes and other fixes
This commit is contained in:
@@ -89,7 +89,6 @@ class NodelistImport implements ShouldQueue
|
||||
|
||||
switch ($fields[0]) {
|
||||
case 'Zone': $zone = $fields[1];
|
||||
// We ignore the Zone entries, since they are dynamically created.
|
||||
Zone::unguard();
|
||||
$zo = Zone::firstOrNew([
|
||||
'zone_id'=>$zone,
|
||||
@@ -99,7 +98,7 @@ class NodelistImport implements ShouldQueue
|
||||
Zone::reguard();
|
||||
|
||||
$region = 0;
|
||||
$host = $fields[1];
|
||||
$host = 0;
|
||||
$hub_id = NULL;
|
||||
$role = DomainController::NODE_ZC;
|
||||
|
||||
@@ -118,8 +117,7 @@ class NodelistImport implements ShouldQueue
|
||||
$hub_id = NULL;
|
||||
$role = DomainController::NODE_NC;
|
||||
|
||||
// We ignore the Host entries, since they are dynamically created.
|
||||
continue 2;
|
||||
break;
|
||||
|
||||
case 'Hub':
|
||||
$node = $fields[1];
|
||||
@@ -243,10 +241,10 @@ class NodelistImport implements ShouldQueue
|
||||
|
||||
try {
|
||||
$so->addresses()->save($ao);
|
||||
if ($role == DomainController::NODE_HC)
|
||||
if ($ao->role == DomainController::NODE_HC)
|
||||
$hub_id = $ao->id;
|
||||
|
||||
$this->no->addresses()->attach($ao,['role'=>$role]);
|
||||
$this->no->addresses()->attach($ao,['role'=>$ao->role]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
Log::error(sprintf('%s:Error with line [%s] (%s)',self::LOGKEY,$line,$e->getMessage()),['fields'=>$fields]);
|
||||
|
Reference in New Issue
Block a user