Make filename unique for each area, rename column to name/lname for files
This commit is contained in:
@@ -81,7 +81,7 @@ class Tic extends FTNBase
|
||||
public function isNodelist(): bool
|
||||
{
|
||||
return (($this->fo->nodelist_filearea_id === $this->fo->filearea->domain->filearea_id)
|
||||
&& (preg_match(str_replace(['.','?'],['\.','.'],'#^'.$this->fo->filearea->domain->nodelist_filename.'$#i'),$this->fo->file)));
|
||||
&& (preg_match(str_replace(['.','?'],['\.','.'],'#^'.$this->fo->filearea->domain->nodelist_filename.'$#i'),$this->fo->name)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -101,7 +101,7 @@ class Tic extends FTNBase
|
||||
$result->put('ORIGIN',$fo->path->first()->ftn3d);
|
||||
$result->put('FROM',$sysaddress->ftn3d);
|
||||
$result->put('TO',$ao->ftn3d);
|
||||
$result->put('FILE',$fo->file);
|
||||
$result->put('FILE',$fo->name);
|
||||
$result->put('SIZE',$fo->size);
|
||||
if ($fo->description)
|
||||
$result->put('DESC',$fo->description);
|
||||
@@ -176,7 +176,7 @@ class Tic extends FTNBase
|
||||
if (! Storage::disk('local')->exists($x=sprintf('%s/%s-%s',config('app.fido'),$hex,$matches[2])))
|
||||
throw new FileNotFoundException(sprintf('File not found? [%s]',$x));
|
||||
|
||||
$this->fo->{$k} = $matches[2];
|
||||
$this->fo->name = $matches[2];
|
||||
$this->fo->fullname = $x;
|
||||
break;
|
||||
|
||||
@@ -191,8 +191,10 @@ class Tic extends FTNBase
|
||||
case 'pw':
|
||||
$pw = $matches[2];
|
||||
|
||||
case 'desc':
|
||||
case 'lfile':
|
||||
$this->fo->lname = $matches[2];
|
||||
|
||||
case 'desc':
|
||||
case 'magic':
|
||||
case 'replaces':
|
||||
case 'size':
|
||||
|
@@ -116,7 +116,7 @@ class Item
|
||||
return $this->file_name;
|
||||
|
||||
case 'sendas':
|
||||
return $this->file_name ? basename($this->file_name) : $this->filemodel->file;
|
||||
return $this->file_name ? basename($this->file_name) : $this->filemodel->name;
|
||||
|
||||
default:
|
||||
throw new Exception('Unknown key: '.$key);
|
||||
|
Reference in New Issue
Block a user