Update nodelist parsing now that we have mailer_system
This commit is contained in:
@@ -36,12 +36,11 @@ trait Import
|
||||
return $c;
|
||||
}
|
||||
|
||||
// @todo Consider merging this with File::openZipFile
|
||||
private function openFile(string $file,&$f): \ZipArchive
|
||||
{
|
||||
$z = new \ZipArchive;
|
||||
|
||||
if ($z->open($file)) {
|
||||
if ($z->open($file,\ZipArchive::RDONLY) === TRUE) {
|
||||
if ($z->count() !== 1)
|
||||
throw new \Exception(sprintf('%s:File [%s] has more than 1 file (%d)', self::LOGKEY, $file, $z->count()));
|
||||
|
||||
@@ -82,12 +81,17 @@ trait Import
|
||||
return ($x=$this->_columns->search(strtoupper($this->columns->get($key)))) !== FALSE ? $x : NULL;
|
||||
}
|
||||
|
||||
private function getFileFromHost(string $key,File $file): string
|
||||
private function getFileFromHost(string $key,mixed $file): string
|
||||
{
|
||||
$path = sprintf('import/%s.%d',$key,$file->id);
|
||||
if ($file instanceof File) {
|
||||
$path = sprintf('import/%s.%d',$key,$file->id);
|
||||
|
||||
Storage::disk('local')->put($path,Storage::get($file->full_storage_path));
|
||||
Storage::disk('local')->put($path,Storage::get($file->full_storage_path));
|
||||
|
||||
return Storage::disk('local')->path($path);
|
||||
return Storage::disk('local')->path($path);
|
||||
|
||||
} else {
|
||||
return Storage::disk('local')->path($file);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user