From afb8ad9d1786d0810b15eb52d6a13c5289c403f7 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 24 Oct 2024 11:31:20 +1100 Subject: [PATCH] Fix some UTF8 output when doing a search. Convert filename desc to CP437 when displaying files in a file area --- app/Http/Controllers/HomeController.php | 4 ++-- resources/views/filearea/addedit.blade.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 66a8601..1a29542 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -10,7 +10,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Gate; use App\Classes\File; -use App\Classes\FTN\Packet; +use App\Classes\FTN\{Message,Packet}; use App\Http\Requests\SetupRequest; use App\Models\File as FileModel; use App\Models\{Address,Echomail,Netmail,Setup,System}; @@ -169,7 +169,7 @@ class HomeController extends Controller ->orWhere('replyid','like','%'.$request->query('term').'%') ->get() as $o) { - $result->push(['id'=>$o->id,'name'=>sprintf('%s (%s)',$o->from,$o->fftn->ftn3d),'value'=>url('echomail/view',[$o->id]),'category'=>'Echomail']); + $result->push(['id'=>$o->id,'name'=>sprintf('%s (%s)',Message::tr($o->from),$o->fftn->ftn3d),'value'=>url('echomail/view',[$o->id]),'category'=>'Echomail']); } // Look for Netmail diff --git a/resources/views/filearea/addedit.blade.php b/resources/views/filearea/addedit.blade.php index 301ed47..31050a3 100644 --- a/resources/views/filearea/addedit.blade.php +++ b/resources/views/filearea/addedit.blade.php @@ -1,5 +1,6 @@ @use(App\Models\Domain) +@use(App\Classes\FTN\Message) @extends('layouts.app') @section('htmlheader_title') @@ -177,7 +178,7 @@ {{ $oo->name }} {{ number_format($oo->size) }} {{ $oo->datetime->format('Y-m-d H:i:s') }} - {{ $oo->desc }} + {!! Message::tr($oo->desc) !!} @endforeach