Skip to content

Commit

Permalink
FIX __resizePhp(): create a thumbnails without extension (and $image-…
Browse files Browse the repository at this point in the history
…>setImageFormat is only for imagick resize method.)
  • Loading branch information
hiryu85 committed Nov 18, 2011
1 parent 04745f8 commit 502775e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions models/behaviors/upload.php
Expand Up @@ -781,10 +781,10 @@ function _resizePhp(&$model, $field, $path, $style, $geometry, $thumbnailPath) {
$destFile = $path . $pathInfo['filename'] . '_' . $style . '.' . $pathInfo['extension'];
}

$thumbnailType = $this->settings[$model->alias][$field]['thumbnailType'];
if ($thumbnailType && is_string($thumbnailType)) {
$image->setImageFormat($thumbnailType);
}
$thumbnailType = is_string($this->settings[$model->alias][$field]['thumbnailType'])
? $this->settings[$model->alias][$field]['thumbnailType']
: $pathInfo['extension'];


$destFile = $thumbnailPath.$style . '_'.$pathInfo['filename'].".{$thumbnailType}";

Expand Down

0 comments on commit 502775e

Please sign in to comment.