From 85243d128e05e0cda67da8418487abfdedff902c Mon Sep 17 00:00:00 2001 From: Deon George Date: Sun, 29 Oct 2023 21:26:57 +1100 Subject: [PATCH] Fixes for TIC processing and not identifying path/seenby correctly --- app/Models/File.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Models/File.php b/app/Models/File.php index e573925..e1317e5 100644 --- a/app/Models/File.php +++ b/app/Models/File.php @@ -83,7 +83,6 @@ class File extends Model $seenby = collect(); $path = collect(); - $so = Setup::findOrFail(config('app.id')); $zone = $model->fftn->zone; // Parse PATH @@ -125,11 +124,11 @@ class File extends Model $model->set_seenby = $model->set_seenby->merge($path->pluck('address.ftn3d'))->unique()->filter(); foreach ($model->set_seenby as $sb) { - $ftn = Address::parseFTN($x); + $ftn = Address::parseFTN($sb); $ao = ($zone->domain->flatten) ? Address::findZone($zone->domain,$ftn['n'],$ftn['f'],0) - : Address::findFTN($x); + : Address::findFTN($sb); if ($ao) $seenby->push($ao->id); @@ -149,7 +148,7 @@ class File extends Model ->addresses ->filter(function($item) use ($model) { return $item->security >= $model->filearea->sec_read; }) ->pluck('id') - ->diff($model->set_seenby); + ->diff($seenby); if ($exportto->count()) { if ($model->no_export) { @@ -229,4 +228,4 @@ class File extends Model { return $this->encode(); } -} +} \ No newline at end of file