Skip to content

Commit

Permalink
fix image save
Browse files Browse the repository at this point in the history
  • Loading branch information
mzhelskiy committed Aug 1, 2014
1 parent da3ff22 commit 7912b5a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions classes/modules/image/entity/Image.entity.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,10 @@ public function save($sFile) {
return false;
}
try {
$sFormat=($this->getParam('format_auto') && $this->getFormat()) ? $this->getFormat() : $this->getParam('format');
$sFileTmp=Config::Get('path.tmp.server').DIRECTORY_SEPARATOR.func_generator(20);
$oImage->save($sFileTmp,array(
'format'=>$this->getParam('format'),
'format'=>$sFormat,
'quality'=>$this->getParam('quality'),
));

Expand Down Expand Up @@ -286,9 +287,10 @@ public function saveTmp() {
if (!is_dir($sDirTmp)) {
@mkdir($sDirTmp,0777,true);
}
$sFormat=($this->getParam('format_auto') && $this->getFormat()) ? $this->getFormat() : $this->getParam('format');
$sFileTmp=$sDirTmp.DIRECTORY_SEPARATOR.func_generator(20);
$oImage->save($sFileTmp,array(
'format'=>$this->getParam('format'),
'format'=>$sFormat,
'quality'=>$this->getParam('quality'),
));

Expand Down

0 comments on commit 7912b5a

Please sign in to comment.