Minor debug packet cosmetic changes, Remove database/ items in docker build, Node address validation changes
This commit is contained in:
@@ -249,10 +249,11 @@ class Message extends FTNBase
|
||||
|
||||
case 'date':
|
||||
return Carbon::createFromFormat('d M y H:i:s O',
|
||||
sprintf('%s %s',chop(Arr::get($this->header,$key)),(is_null($x=$this->kludge->get('tzutc')) || ($x < 0)) ? $x : '+'.$x));
|
||||
sprintf('%s %s',chop(Arr::get($this->header,$key)),(! is_null($x=$this->kludge->get('tzutc')) && ($x < 0)) ? $x : '+'.($x ?: '0000')));
|
||||
|
||||
case 'flags':
|
||||
case 'cost': return Arr::get($this->header,$key);
|
||||
case 'cost':
|
||||
return Arr::get($this->header,$key);
|
||||
|
||||
case 'message':
|
||||
case 'subject':
|
||||
@@ -461,24 +462,32 @@ class Message extends FTNBase
|
||||
* s - this bit is supported by SEAdog only
|
||||
* + - this bit is not zeroed before packeting
|
||||
*/
|
||||
/*
|
||||
public function flags(int $flags): array
|
||||
public function flags(): Collection
|
||||
{
|
||||
return [
|
||||
'private' => $this->isFlagSet($flags,self::FLAG_PRIVATE),
|
||||
'crash' => $this->isFlagSet($flags,self::FLAG_CRASH),
|
||||
'recd' => $this->isFlagSet($flags,self::FLAG_RECD),
|
||||
'sent' => $this->isFlagSet($flags,self::FLAG_SENT),
|
||||
'killsent' => $this->isFlagSet($flags,self::FLAG_KILLSENT),
|
||||
'local' => $this->isFlagSet($flags,self::FLAG_LOCAL),
|
||||
];
|
||||
return collect([
|
||||
'private' => $this->isFlagSet(self::FLAG_PRIVATE),
|
||||
'crash' => $this->isFlagSet(self::FLAG_CRASH),
|
||||
'recd' => $this->isFlagSet(self::FLAG_RECD),
|
||||
'sent' => $this->isFlagSet(self::FLAG_SENT),
|
||||
'fileattach' => $this->isFlagSet(self::FLAG_FILEATTACH),
|
||||
'intransit' => $this->isFlagSet(self::FLAG_INTRANSIT),
|
||||
'orphan' => $this->isFlagSet(self::FLAG_ORPHAN),
|
||||
'killsent' => $this->isFlagSet(self::FLAG_KILLSENT),
|
||||
'local' => $this->isFlagSet(self::FLAG_LOCAL),
|
||||
'hold' => $this->isFlagSet(self::FLAG_HOLD),
|
||||
'unused-10' => $this->isFlagSet(self::FLAG_UNUSED_10),
|
||||
'filereq' => $this->isFlagSet(self::FLAG_FREQ),
|
||||
'receipt-req' => $this->isFlagSet(self::FLAG_RETRECEIPT),
|
||||
'receipt' => $this->isFlagSet(self::FLAG_ISRETRECEIPT),
|
||||
'audit' => $this->isFlagSet(self::FLAG_AUDITREQ),
|
||||
'fileupdate' => $this->isFlagSet(self::FLAG_FILEUPDATEREQ),
|
||||
]);
|
||||
}
|
||||
|
||||
private function isFlagSet($value,$flag): bool
|
||||
private function isFlagSet($flag): bool
|
||||
{
|
||||
return (($value & $flag) == $flag);
|
||||
return ($this->flags & $flag);
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Process the data after the ORIGIN
|
||||
|
@@ -87,11 +87,11 @@ class HomeController extends Controller
|
||||
->rightjoin('systems',['systems.id'=>'addresses.system_id'])
|
||||
->when($zone_id || $host_id || $node_id,function($query) use ($zone_id,$host_id,$node_id) {
|
||||
return $query
|
||||
->when($zone_id,function($q,$zone_id) { return $q->where('zones.zone_id','ilike','%'.$zone_id.'%'); })
|
||||
->when($zone_id,function($q,$zone_id) { return $q->where('zones.zone_id',$zone_id); })
|
||||
->where(function($q) use ($host_id) {
|
||||
return $q
|
||||
->when($host_id,function($q,$host_id) { return $q->where('region_id','ilike','%'.$host_id.'%'); })
|
||||
->when($host_id,function($q,$host_id) { return $q->orWhere('host_id','ilike','%'.$host_id.'%'); });
|
||||
->when($host_id,function($q,$host_id) { return $q->where('region_id',$host_id); })
|
||||
->when($host_id,function($q,$host_id) { return $q->orWhere('host_id',$host_id); });
|
||||
})
|
||||
->when($node_id,function($q,$node_id) { return $q->where('node_id','ilike','%'.$node_id.'%'); });
|
||||
})
|
||||
|
@@ -144,8 +144,7 @@ class SystemController extends Controller
|
||||
return $query
|
||||
->where('host_id',$request->post('host_id'))
|
||||
->where('node_id',$value)
|
||||
->where('point_id',0)
|
||||
->where('role',DomainController::NODE_RC);
|
||||
->where('point_id',0);
|
||||
});
|
||||
|
||||
if ($o->count()) {
|
||||
|
Reference in New Issue
Block a user