Make filename unique for each area, rename column to name/lname for files

This commit is contained in:
2023-06-23 17:33:47 +10:00
parent 0eca20ebdd
commit b8534d8598
4 changed files with 42 additions and 8 deletions

View File

@@ -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':