add y to with-aspect naming schema
This commit is contained in:
parent
5357c91520
commit
3157d307f7
1 changed files with 13 additions and 7 deletions
|
@ -322,7 +322,7 @@ class Preview {
|
||||||
if($fileInfo !== null && $fileInfo !== false) {
|
if($fileInfo !== null && $fileInfo !== false) {
|
||||||
$fileId = $fileInfo->getId();
|
$fileId = $fileInfo->getId();
|
||||||
|
|
||||||
$previewPath = $this->getThumbnailsFolder() . '/' . $fileId . '/';
|
$previewPath = $this->getPreviewPath($fileId);
|
||||||
$this->userView->deleteAll($previewPath);
|
$this->userView->deleteAll($previewPath);
|
||||||
return $this->userView->rmdir($previewPath);
|
return $this->userView->rmdir($previewPath);
|
||||||
}
|
}
|
||||||
|
@ -392,7 +392,7 @@ class Preview {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
$previewPath = $this->getThumbnailsFolder() . '/' . $fileId . '/';
|
$previewPath = $this->getPreviewPath($fileId);
|
||||||
|
|
||||||
$wantedAspectRatio = (float) ($this->getMaxX() / $this->getMaxY());
|
$wantedAspectRatio = (float) ($this->getMaxX() / $this->getMaxY());
|
||||||
|
|
||||||
|
@ -509,7 +509,7 @@ class Preview {
|
||||||
$this->preview = $preview;
|
$this->preview = $preview;
|
||||||
$this->resizeAndCrop();
|
$this->resizeAndCrop();
|
||||||
|
|
||||||
$previewPath = $this->getThumbnailsFolder() . '/' . $fileId . '/';
|
$previewPath = $this->getPreviewPath($fileId);
|
||||||
$cachePath = $this->buildCachePath($fileId);
|
$cachePath = $this->buildCachePath($fileId);
|
||||||
|
|
||||||
if ($this->userView->is_dir($this->getThumbnailsFolder() . '/') === false) {
|
if ($this->userView->is_dir($this->getThumbnailsFolder() . '/') === false) {
|
||||||
|
@ -797,12 +797,18 @@ class Preview {
|
||||||
$maxX = $this->getMaxX();
|
$maxX = $this->getMaxX();
|
||||||
$maxY = $this->getMaxY();
|
$maxY = $this->getMaxY();
|
||||||
|
|
||||||
$previewPath = $this->getThumbnailsFolder() . '/' . $fileId . '/';
|
$previewPath = $this->getPreviewPath($fileId);
|
||||||
$preview = $previewPath . $maxX . '-' . $maxY . '.png';
|
$preview = $previewPath . strval($maxX) . '-' . strval($maxY);
|
||||||
if ($this->keepAspect) {
|
if ($this->keepAspect) {
|
||||||
$preview = $previewPath . $maxX . '-with-aspect.png';
|
$preview .= '-with-aspect';
|
||||||
return $preview;
|
|
||||||
}
|
}
|
||||||
|
$preview .= '.png';
|
||||||
|
|
||||||
return $preview;
|
return $preview;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private function getPreviewPath($fileId) {
|
||||||
|
return $this->getThumbnailsFolder() . '/' . $fileId . '/';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue