Add domain to path/seenby for 4D addresses in tic files
This commit is contained in:
parent
bf4c282282
commit
733f4621a1
@ -88,6 +88,10 @@ class File extends Model
|
||||
$matches = [];
|
||||
preg_match(sprintf('#^(%s)\ ((@?)(\d+)(\ ([A-Z]{3}([\+\-][0-9]+)))?)\ ?(.*)$#',Address::ftn_regex),$line,$matches);
|
||||
|
||||
// If our domain is blank, get the model's domain
|
||||
if (! Arr::get($matches,6))
|
||||
$matches[1] .= '@'.$model->filearea->domain->name;
|
||||
|
||||
if ($x=Arr::get($matches,1)) {
|
||||
$ftn = Address::parseFTN($x);
|
||||
|
||||
@ -126,6 +130,9 @@ class File extends Model
|
||||
$model->set_seenby = $model->set_seenby->merge($path->pluck('address.ftn3d'))->unique()->filter();
|
||||
|
||||
foreach ($model->set_seenby as $sb) {
|
||||
if (! preg_match('/@([a-zA-Z0-9\-_~]{0,8})/',$sb))
|
||||
$sb .= '@'.$model->filearea->domain->name;
|
||||
|
||||
$ftn = Address::parseFTN($sb);
|
||||
|
||||
$ao = ($zone->domain->flatten)
|
||||
|
Loading…
Reference in New Issue
Block a user