From 33a97ce5b394d80a6062f375adc66c40cf82a418 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 30 Nov 2024 14:28:28 +1100 Subject: [PATCH] Fix showing 'View Packet' when the to zone is not in the same domain as the from domain --- app/Classes/FTN/Packet.php | 2 +- resources/views/pkt.blade.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Classes/FTN/Packet.php b/app/Classes/FTN/Packet.php index eea9254..a730208 100644 --- a/app/Classes/FTN/Packet.php +++ b/app/Classes/FTN/Packet.php @@ -462,7 +462,7 @@ abstract class Packet extends FTNBase implements \Iterator, \Countable } // @todo If the message from domain (eg: $msg->fftn->zone->domain) is different to the packet address domain ($pkt->fftn->zone->domain), we'll skip this message - Log::debug(sprintf('%s:^ Message [%s] - Packet from domain [%d], Message domain [%d]',self::LOGKEY,$msg->msgid,$this->fftn->zone->domain_id,$msg->fftn->zone->domain_id)); + //Log::debug(sprintf('%s:^ Message [%s] - Packet from domain [%d], Message domain [%d]',self::LOGKEY,$msg->msgid,$this->fftn->zone->domain_id,$msg->fftn->zone->domain_id)); $this->messages->push($msg); } diff --git a/resources/views/pkt.blade.php b/resources/views/pkt.blade.php index 5f2087c..a89a101 100644 --- a/resources/views/pkt.blade.php +++ b/resources/views/pkt.blade.php @@ -71,7 +71,7 @@
-

Packet {{ $file }} (type {{ $result->type }}) is from {{ $result->fftn->ftn }} to {{ $result->tftn->ftn }}, dated {{ $result->date }}.

+

Packet {{ $file }} (type {{ $result->type }}) is from {{ $result->fftn ? $result->fftn->ftn : $result->fftn_t }} to {{ $result->tftn ? $result->tftn->ftn : $result->tftn_t }}, dated {{ $result->date }}.

This packet has {{ $result->messages->count() }} messages and {{ $result->password ? 'DOES' : 'does NOT' }} have a password.

Tosser: {{ $result->software->code }} ({{ $result->software->name }}), version {{ $result->software_ver }}. Capabilities: {{ $result->capability }}.

@if ($result->messages->count() > 1) @@ -112,10 +112,10 @@
- FROM: {!! Message::tr($msg->from) !!} ({{ $msg->fftn->ftn }}) + FROM: {!! Message::tr($msg->from) !!} ({{ $msg->fftn ? $msg->fftn->ftn : $msg->fftn_t}})
- TO: {!! Message::tr($msg->to) !!}@if($msg instanceof Netmail) ({{ $msg->tftn->ftn }}) @endif + TO: {!! Message::tr($msg->to) !!}@if($msg instanceof Netmail) ({{ $msg->tftn ? $msg->tftn->ftn : $msg->tftn_t }}) @endif