* Add function setFielAndRealPaths to file model.

This commit is contained in:
wangjianhua
2022-11-09 23:28:37 +08:00
parent fc4302e603
commit cd5749835e
8 changed files with 91 additions and 44 deletions
+2 -6
View File
@@ -643,9 +643,7 @@ class docModel extends model
{
foreach($files as $file)
{
$pathName = $this->file->getRealPathName($file->pathname);
$file->webPath = $this->file->webPath . $pathName;
$file->realPath = $this->file->savePath . $pathName;
$this->loadModel('file')->setFileWebAndRealPaths($file);
if(strpos(",{$docContent->files},", ",{$file->id},") !== false) $docFiles[$file->id] = $file;
}
}
@@ -1748,9 +1746,7 @@ class docModel extends model
foreach($files as $fileID => $file)
{
$pathName = $this->file->getRealPathName($file->pathname);
$file->realPath = $this->file->savePath . $pathName;
$file->webPath = $this->file->webPath . $pathName;
$this->file->setFileWebAndRealPaths($file);
}
return $files;