Fix packet:info command when using system, fix adding clrghouz to path for echomail
This commit is contained in:
parent
b1b86ca04a
commit
0eca20ebdd
@ -3,7 +3,6 @@
|
|||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Support\Arr;
|
|
||||||
|
|
||||||
use App\Classes\File;
|
use App\Classes\File;
|
||||||
use App\Classes\FTN\Packet;
|
use App\Classes\FTN\Packet;
|
||||||
@ -18,7 +17,7 @@ class PacketInfo extends Command
|
|||||||
*/
|
*/
|
||||||
protected $signature = 'packet:info'
|
protected $signature = 'packet:info'
|
||||||
.' {file : Packet to process}'
|
.' {file : Packet to process}'
|
||||||
.' {system? : Zone the packet is from}';
|
.' {system? : System the packet is from}';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The console command description.
|
* The console command description.
|
||||||
@ -36,7 +35,7 @@ class PacketInfo extends Command
|
|||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
$f = new File($this->argument('file'));
|
$f = new File($this->argument('file'));
|
||||||
$s = $this->argument('system') ? System::where('name',$this->argument('zone'))->singleOrFail() : NULL;
|
$s = $this->argument('system') ? System::where('name',$this->argument('system'))->singleOrFail() : NULL;
|
||||||
|
|
||||||
foreach ($f as $packet) {
|
foreach ($f as $packet) {
|
||||||
$pkt = Packet::process($packet,$x=$f->itemName(),$f->itemSize(),$s);
|
$pkt = Packet::process($packet,$x=$f->itemName(),$f->itemSize(),$s);
|
||||||
|
@ -75,7 +75,7 @@ final class Echomail extends Model implements Packet
|
|||||||
// Our address
|
// Our address
|
||||||
$ftns = Setup::findOrFail(config('app.id'))
|
$ftns = Setup::findOrFail(config('app.id'))
|
||||||
->system
|
->system
|
||||||
->match($model->fftn->zone,Address::NODE_ACTIVE|Address::NODE_PVT|Address::NODE_HOLD);
|
->match($model->fftn->zone);
|
||||||
|
|
||||||
// Add our address to the seenby;
|
// Add our address to the seenby;
|
||||||
$model->set_seenby = $model->set_seenby->merge($ftns->pluck('id'))->unique();
|
$model->set_seenby = $model->set_seenby->merge($ftns->pluck('id'))->unique();
|
||||||
|
@ -170,7 +170,7 @@ class System extends Model
|
|||||||
* @param int $type
|
* @param int $type
|
||||||
* @return Collection
|
* @return Collection
|
||||||
*/
|
*/
|
||||||
public function match(Zone $o,int $type=(Address::NODE_HC|Address::NODE_ACTIVE|Address::NODE_PVT|Address::NODE_POINT)): Collection
|
public function match(Zone $o,int $type=(Address::NODE_NC|Address::NODE_HC|Address::NODE_ACTIVE|Address::NODE_PVT|Address::NODE_POINT)): Collection
|
||||||
{
|
{
|
||||||
return $this->addresses
|
return $this->addresses
|
||||||
->where('zone_id',$o->id)
|
->where('zone_id',$o->id)
|
||||||
|
Loading…
Reference in New Issue
Block a user