Move fido configuation items into fido namespace. If keeping packets move them into a date aligned subdir
This commit is contained in:
@@ -92,6 +92,7 @@ class Address extends Model
|
||||
|
||||
/**
|
||||
* Find children dependent on this record
|
||||
* @todo If bosses are defined here, and points, then mail to a point goes to it's boss
|
||||
*/
|
||||
public function children()
|
||||
{
|
||||
@@ -232,6 +233,7 @@ class Address extends Model
|
||||
*
|
||||
* @return Address|null
|
||||
* @throws \Exception
|
||||
* @todo Dont include points in this
|
||||
*/
|
||||
public function parent(): ?Address
|
||||
{
|
||||
@@ -386,7 +388,7 @@ class Address extends Model
|
||||
*
|
||||
* @param string $address
|
||||
* @param System $so
|
||||
* @return self
|
||||
* @return Address|null
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function createFTN(string $address,System $so): ?self
|
||||
@@ -478,8 +480,6 @@ class Address extends Model
|
||||
* Find a record in the DB for a node string, eg: 10:1/1.0
|
||||
*
|
||||
* @param string $address
|
||||
* @param bool $create
|
||||
* @param System|null $so
|
||||
* @param bool $trashed
|
||||
* @return Address|null
|
||||
* @throws \Exception
|
||||
@@ -554,6 +554,7 @@ class Address extends Model
|
||||
* @param Domain $do
|
||||
* @param int $host
|
||||
* @param int $node
|
||||
* @param int $point
|
||||
* @param bool $trashed
|
||||
* @return self|null
|
||||
* @throws \Exception
|
||||
@@ -770,7 +771,7 @@ class Address extends Model
|
||||
return NULL;
|
||||
|
||||
// Get packet type
|
||||
$type = collect(Packet::PACKET_TYPES)->get($this->system->pkt_type ?: config('app.default_pkt'));
|
||||
$type = collect(Packet::PACKET_TYPES)->get($this->system->pkt_type ?: config('fido.packet_default'));
|
||||
$o = new $type;
|
||||
$o->addressHeader($ao,$this,$passwd);
|
||||
|
||||
|
@@ -19,6 +19,8 @@ class File extends Model
|
||||
|
||||
private const LOGKEY = 'MF-';
|
||||
private bool $no_export = FALSE;
|
||||
public string $prefix = '';
|
||||
public string $replaces = '';
|
||||
|
||||
protected $casts = [
|
||||
'kludges' => CollectionOrNull::class,
|
||||
@@ -162,11 +164,31 @@ class File extends Model
|
||||
|
||||
/* ATTRIBUTES */
|
||||
|
||||
/**
|
||||
* Return the relative path to Storage::disk() in the store
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFullStoragePathAttribute(): string
|
||||
{
|
||||
return sprintf('%04X/%s',$this->filearea_id,$this->name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the relative path to Storage::disk() in the inbound;
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getRelNameAttribute(): string
|
||||
{
|
||||
return sprintf('%s/%s',config('fido.dir'),$this->prefix_name);
|
||||
}
|
||||
|
||||
public function getPrefixNameAttribute(): string
|
||||
{
|
||||
return sprintf('%s%s',$this->prefix ? $this->prefix.'-' : '',$this->name);
|
||||
}
|
||||
|
||||
/* METHODS */
|
||||
|
||||
public function jsonSerialize(): array
|
||||
|
Reference in New Issue
Block a user