More work to decommission rogue_path

This commit is contained in:
2023-09-15 22:57:32 +10:00
parent c1d6d48a3c
commit 708d9a9f67
12 changed files with 218 additions and 231 deletions

View File

@@ -10,7 +10,7 @@ use Illuminate\Support\Facades\Storage;
use League\Flysystem\UnableToWriteFile;
use App\Classes\FTN as FTNBase;
use App\Models\{Address,File,Filearea,Setup};
use App\Models\{Address,File,Filearea,Setup,System};
use App\Traits\EncodeUTF8;
/**
@@ -67,7 +67,6 @@ class Tic extends FTNBase
$this->fo->kludges = collect();
$this->fo->set_path = collect();
$this->fo->set_seenby = collect();
$this->fo->rogue_path = collect();
$this->fo->rogue_seenby = collect();
$this->values = collect();
@@ -240,22 +239,23 @@ class Tic extends FTNBase
preg_match(sprintf('#^[Pp]ath (%s)\ ?([0-9]+)\ ?(.*)$#',Address::ftn_regex),$line,$x);
$ao = Address::findFTN($x[1]);
if (! $ao) {
$this->fo->rogue_path->push($matches[2]);
} else {
$this->fo->set_path->push(['address'=>$ao,'datetime'=>Carbon::createFromTimestamp($x[8]),'extra'=>$x[9]]);
}
if (! $ao)
$ao = Address::createFTN($x[1],System::createUnknownSystem());
$this->fo->set_path->push(['address'=>$ao,'datetime'=>Carbon::createFromTimestamp($x[8]),'extra'=>$x[9]]);
break;
case 'seenby':
$ao = Address::findFTN($matches[2]);
if (! $ao) {
if (! $ao)
$ao = Address::createFTN($x[1],System::createUnknownSystem());
if (! $ao)
$this->fo->rogue_seenby->push($matches[2]);
} else {
else
$this->fo->set_seenby->push($ao->id);
}
break;
}