Fixes for TIC processing and not identifying path/seenby correctly
This commit is contained in:
parent
7d82cbcf12
commit
85243d128e
@ -83,7 +83,6 @@ class File extends Model
|
|||||||
$seenby = collect();
|
$seenby = collect();
|
||||||
$path = collect();
|
$path = collect();
|
||||||
|
|
||||||
$so = Setup::findOrFail(config('app.id'));
|
|
||||||
$zone = $model->fftn->zone;
|
$zone = $model->fftn->zone;
|
||||||
|
|
||||||
// Parse PATH
|
// Parse PATH
|
||||||
@ -125,11 +124,11 @@ class File extends Model
|
|||||||
$model->set_seenby = $model->set_seenby->merge($path->pluck('address.ftn3d'))->unique()->filter();
|
$model->set_seenby = $model->set_seenby->merge($path->pluck('address.ftn3d'))->unique()->filter();
|
||||||
|
|
||||||
foreach ($model->set_seenby as $sb) {
|
foreach ($model->set_seenby as $sb) {
|
||||||
$ftn = Address::parseFTN($x);
|
$ftn = Address::parseFTN($sb);
|
||||||
|
|
||||||
$ao = ($zone->domain->flatten)
|
$ao = ($zone->domain->flatten)
|
||||||
? Address::findZone($zone->domain,$ftn['n'],$ftn['f'],0)
|
? Address::findZone($zone->domain,$ftn['n'],$ftn['f'],0)
|
||||||
: Address::findFTN($x);
|
: Address::findFTN($sb);
|
||||||
|
|
||||||
if ($ao)
|
if ($ao)
|
||||||
$seenby->push($ao->id);
|
$seenby->push($ao->id);
|
||||||
@ -149,7 +148,7 @@ class File extends Model
|
|||||||
->addresses
|
->addresses
|
||||||
->filter(function($item) use ($model) { return $item->security >= $model->filearea->sec_read; })
|
->filter(function($item) use ($model) { return $item->security >= $model->filearea->sec_read; })
|
||||||
->pluck('id')
|
->pluck('id')
|
||||||
->diff($model->set_seenby);
|
->diff($seenby);
|
||||||
|
|
||||||
if ($exportto->count()) {
|
if ($exportto->count()) {
|
||||||
if ($model->no_export) {
|
if ($model->no_export) {
|
||||||
|
Loading…
Reference in New Issue
Block a user