From a5e9a286739fb61064b74577f19d77d58e810ac3 Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 22 May 2024 15:25:39 +1000 Subject: [PATCH] Added PRODUCT_NAME_SHORT and updated PID/TID kludge to include git hash --- app/Classes/FTN/Message.php | 10 ++++------ app/Models/Setup.php | 1 + resources/views/layouts/partials/footer.blade.php | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/Classes/FTN/Message.php b/app/Classes/FTN/Message.php index c5675a0..2c287b3 100644 --- a/app/Classes/FTN/Message.php +++ b/app/Classes/FTN/Message.php @@ -539,10 +539,8 @@ class Message extends FTNBase $this->mo->kludges->put('TOPT',$this->mo->tftn->point_id); } - if ($this->mo->isFlagSet(self::FLAG_LOCAL)) - $this->mo->kludges->put('PID',sprintf('clrghouz %s',$s->version)); - else - $this->mo->kludges->put('TID',sprintf('clrghouz %s',$s->version)); + $this->mo->kludges->put($this->mo->isFlagSet(self::FLAG_LOCAL) ? 'PID:' : 'TID:',sprintf('%s %s',Setup::PRODUCT_NAME_SHORT,$s->version)); + $this->mo->kludges->put('DBID:',$this->mo->id); if ($this->mo instanceof Echomail) $return .= sprintf("AREA:%s\r",strtoupper($this->mo->echoarea->name)); @@ -565,10 +563,10 @@ class Message extends FTNBase $return .= sprintf("\x01Via %s\r",$this->mo->via($ao)); // Add our address - $return .= sprintf("\x01Via %s @%s.UTC %s (%04X)\r", + $return .= sprintf("\x01Via %s @%s.UTC %s %s\r", $this->us->ftn3d, Carbon::now()->format('Ymd.His'), - Setup::PRODUCT_NAME,Setup::PRODUCT_ID); + Setup::PRODUCT_NAME_SHORT,$s->version); } else { // FTS-0004.001/FSC-0068.001 The message SEEN-BY lines diff --git a/app/Models/Setup.php b/app/Models/Setup.php index 27695ed..508106b 100644 --- a/app/Models/Setup.php +++ b/app/Models/Setup.php @@ -20,6 +20,7 @@ use App\Classes\Protocol\{Binkp,DNS,EMSI}; class Setup extends Model { public const PRODUCT_NAME = 'Clearing Houz'; + public const PRODUCT_NAME_SHORT = 'clrghouz'; public const PRODUCT_ID = 0xAB8D; public const PRODUCT_VERSION_MAJ = 0; public const PRODUCT_VERSION_MIN = 0; diff --git a/resources/views/layouts/partials/footer.blade.php b/resources/views/layouts/partials/footer.blade.php index 852c6a1..bc89d79 100644 --- a/resources/views/layouts/partials/footer.blade.php +++ b/resources/views/layouts/partials/footer.blade.php @@ -1,6 +1,6 @@ {{ request()->getHost() }} © {{ \Carbon\Carbon::now()->year }} Deon George - clrghouz [{{ gethostname() }}@if (File::exists('../VERSION')) @ {{ chop(File::get('../VERSION')) }}@endif] + {{ \App\Models\Setup::PRODUCT_NAME_SHORT }} [{{ gethostname() }}@if (File::exists('../VERSION')) @ {{ chop(File::get('../VERSION')) }}@endif] \ No newline at end of file